Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Learn c++ or java ?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
66 posts
  • 1
  • 2
  • 3
  • Next
Author
Message
orangeman12
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Sun Dec 19, 2004 10:18 pm
Location: Chair

Learn c++ or java ?

  • Quote

Post by orangeman12 » Tue Sep 13, 2005 11:11 pm

I have started a little java but I was wondering which language you think would be better to learn . I don't yet know what I want to do but I would like to go with the language that has a better future and more options in terms of want you can do with it.
Orangeman
Top
kimchi_sg
Advocate
Advocate
Posts: 3039
Joined: Fri Nov 26, 2004 11:11 am

Re: Learn c++ or java ?

  • Quote

Post by kimchi_sg » Tue Sep 13, 2005 11:41 pm

orangeman12 wrote:I would like to go with the language that has a better future and more options in terms of want you can do with it.
C++

It has been around longer and compiles on more platforms than Java.

P.S. I program in Java too... for school needs.
Top
neuromancerzero
n00b
n00b
Posts: 63
Joined: Wed Aug 17, 2005 9:30 pm

  • Quote

Post by neuromancerzero » Tue Sep 13, 2005 11:50 pm

i program in c++, but have started to learn java. I would recommend c++ for many reasons. I like it better personally and its been around longer.
edit: also more games are made using it so its useful for cracking software. also more platforms use it.
Top
MHL
Apprentice
Apprentice
Posts: 197
Joined: Tue Jun 15, 2004 1:41 am

  • Quote

Post by MHL » Wed Sep 14, 2005 12:18 am

I think java has future, and c++ is fading out.
also, java is easier to program. platform independent.
nice reference api. and lots of free resource lik IDE.
Top
nbensa
l33t
l33t
User avatar
Posts: 799
Joined: Wed Jul 10, 2002 11:09 am
Location: Buenos Aires, Argentina

  • Quote

Post by nbensa » Wed Sep 14, 2005 12:29 am

Both. Take a look at Python too.
Top
bitwise
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 104
Joined: Wed Apr 20, 2005 4:42 pm
Location: seattle
Contact:
Contact bitwise
Website

  • Quote

Post by bitwise » Wed Sep 14, 2005 2:12 am

yeah, why do you think you should learn one over the other? Java is great for absolute beginners, where as C and C++ have a lot of odd things that can be confusing.

Java is just stupidly simple, and really teaches object oriented design. I recommend learning java first, then C++, then if you still desire, C and assembly. Also, there's nothing stopping you from learning Python and other languages while your at it.
Top
Jeremy_Z
l33t
l33t
User avatar
Posts: 671
Joined: Mon Apr 05, 2004 3:21 pm
Location: Shanghai

  • Quote

Post by Jeremy_Z » Wed Sep 14, 2005 2:22 am

Saburo wrote:yeah, why do you think you should learn one over the other? Java is great for absolute beginners, where as C and C++ have a lot of odd things that can be confusing.

Java is just stupidly simple, and really teaches object oriented design. I recommend learning java first, then C++, then if you still desire, C and assembly. Also, there's nothing stopping you from learning Python and other languages while your at it.
Agreed. C++ requires a bit more of practice and "know what you do".
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Top
dmitchell
Veteran
Veteran
User avatar
Posts: 1159
Joined: Sat May 17, 2003 4:51 pm
Location: Austin, Texas

  • Quote

Post by dmitchell » Wed Sep 14, 2005 2:35 am

Another vote for C++.
Your argument is invalid.
Top
seank
l33t
l33t
Posts: 686
Joined: Thu Jul 08, 2004 1:44 am
Contact:
Contact seank
Website

  • Quote

Post by seank » Wed Sep 14, 2005 4:36 am

C++
Top
Highlands
Guru
Guru
User avatar
Posts: 366
Joined: Tue Apr 22, 2003 3:23 pm
Location: Sundsvall, Sweden
Contact:
Contact Highlands
Website

  • Quote

Post by Highlands » Wed Sep 14, 2005 5:57 am

C++ here too, just because C++ is faster then java because it dont needs a runtime
Top
treat
n00b
n00b
User avatar
Posts: 39
Joined: Wed Jul 20, 2005 1:26 pm
Location: Sweden
Contact:
Contact treat
Website

  • Quote

Post by treat » Wed Sep 14, 2005 6:12 am

java is boring 8)
Top
Dlareh
Advocate
Advocate
User avatar
Posts: 2102
Joined: Sat Aug 06, 2005 8:33 pm

  • Quote

Post by Dlareh » Wed Sep 14, 2005 6:19 am

Python would be an obvious first choice over C/++ and Java.

But if you need to choose between those two, the answer is clearly Java... no programmers should ever have to do their own memory management unless it is strictly needed or desireable for the task at hand.
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Top
MHL
Apprentice
Apprentice
Posts: 197
Joined: Tue Jun 15, 2004 1:41 am

  • Quote

Post by MHL » Wed Sep 14, 2005 7:29 am

time is money, program written in Java requires less time then written in C++.
so Java Rocks.
Top
Dlareh
Advocate
Advocate
User avatar
Posts: 2102
Joined: Sat Aug 06, 2005 8:33 pm

  • Quote

Post by Dlareh » Wed Sep 14, 2005 7:37 am

MHL wrote:time is money, program written in Java requires less time then written in C++.
so Java Rocks.
Well as someone already mentioned, Java can be quite boring. Python requires even less time to write and is almost always fun to work with...
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Top
tomvollerthun
Guru
Guru
User avatar
Posts: 316
Joined: Sat Mar 19, 2005 2:56 pm

  • Quote

Post by tomvollerthun » Wed Sep 14, 2005 9:08 am

I admit that I disagree with most of the statements here: it's not that java or C++ or ruby are simpler or harder than one of the other programming languages!

If a programming task is difficult or not is almost completely independent of the language you chose to implement: Programming a task-scheduler is always difficult, be it in java, python, bash or ruby, whereas a "Hello world" is always simple and boring.

It's like writing: a book is much more than just it's letters - it has a meaning and so do programs.
A programming language's syntax is just the letters, which of course you must know before you can write a book, but the difficult thing is not the letters itself but to make the book/program mean what you intend.

A programming language's syntax can be learned in about a week of intensive work. Throwing together a not most basic program from available libraries takes maybe another three weeks, and that is the stage many programmers stay in for a very long time.

So if you want to learn, take four weeks to play around with C++, then four weeks of Java. Then you'll know which you like more and can start to learn why the language is insignificant to programming ;)

cu, tom
Computer science is no more about computers than astronomy is about telescopes.
Dijsktra
---------------
Don't believe my "Guru" status!
Top
minskpower
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 94
Joined: Thu Jun 16, 2005 1:09 pm
Location: /dev/null

  • Quote

Post by minskpower » Wed Sep 14, 2005 10:11 am

It all depends on what you wish to accomplish by learning the language. If going for web development, than java (or python) are the choice. For desktop apps or programs that require intense math computation, C++ is better (although java benefits now from good GUI libraries).
Top
Dlareh
Advocate
Advocate
User avatar
Posts: 2102
Joined: Sat Aug 06, 2005 8:33 pm

  • Quote

Post by Dlareh » Wed Sep 14, 2005 10:19 am

The OP indicated he doesn't know what he is going to use the language for, so your points are not helpful.

He just wants to learn, and Python excells at "learnability" (among many other things irrelevant to this discussion).
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Top
dmitchell
Veteran
Veteran
User avatar
Posts: 1159
Joined: Sat May 17, 2003 4:51 pm
Location: Austin, Texas

  • Quote

Post by dmitchell » Wed Sep 14, 2005 5:11 pm

Dlareh wrote:the answer is clearly Java... no programmers should ever have to do their own memory management unless it is strictly needed or desireable for the task at hand.
Stop spreading FUD: C++ doesn't require manual memory management.
Your argument is invalid.
Top
reptile
Guru
Guru
Posts: 363
Joined: Tue Nov 19, 2002 7:14 pm

  • Quote

Post by reptile » Wed Sep 14, 2005 5:26 pm

i would recommend c++ for learning, then use c# or java for programming - the transition is easy, no messing around with pointers, more straightforward development... if you want to do gui-programming. if you want to program hardware or anything closely related to hardware, then go with c++ or even c. just my 2©
Top
30726
Veteran
Veteran
Posts: 1501
Joined: Wed Sep 24, 2003 11:01 pm

  • Quote

Post by 30726 » Wed Sep 14, 2005 5:59 pm

Once you've learnt a language like C++, learning other languages is a breeze.
Top
Mercury
n00b
n00b
Posts: 5
Joined: Fri Aug 26, 2005 3:50 pm

  • Quote

Post by Mercury » Wed Sep 14, 2005 7:19 pm

IMHO, it's not that easy to compare these two, since C++ is a true compiler, while Java is more of an interpreter (generates bytecode and not machine code). I haven't done much java programming, but my neighbour did a lot for college. From what I've seen, when it comes to complex mathematical algorithms, java doesn't stand a chanse compared to C++. Also, I doubt JVM has the ability to use processor specific features like MMX and SSE. I've done some assembly programming with these SIMD instructions and the preformance boost is incredible.

George
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

Re: Learn c++ or java ?

  • Quote

Post by IvanYosifov » Wed Sep 14, 2005 8:18 pm

orangeman12 wrote:I have started a little java but I was wondering which language you think would be better to learn . I don't yet know what I want to do but I would like to go with the language that has a better future and more options in terms of want you can do with it.
I would start with Java. It is easier to learn, and will ( IMO! ) get you a job faster.
If you are really serious about becomming a programmer and understanding the code-world all around you, you will inevitably learn both along with pure C, at least.

In theory Java has the future and C++ is a thing of the past. In practice C and C++ will be in *very* heavy use at least for the next 15 years and Java is far from proven over direct competition like .NET and emergeing competition like Python.
Top
kustos
Apprentice
Apprentice
User avatar
Posts: 168
Joined: Wed Sep 10, 2003 8:10 am

Re: Learn c++ or java ?

  • Quote

Post by kustos » Wed Sep 14, 2005 9:30 pm

kimchi_sg wrote: It has been around longer
Then why not COBOL?
kimchi_sg wrote: and compiles on more platforms than Java.
Yes, a small subset of C++

The biggest points in favor of Java over C++ I see are typesafety and array-range-checking. 50% of all secrurity holes are buffer overflows. This meas there is an immense amount of people out there using C/C++ without understanding it, changes are you won't understand it as well. Bufferoverflows are a big problem. Java programms can not be affected by them. How many C/C++ programms or libs do you know of that have never been affected by a buffer overlfow? If you think this is a minority the you probably don't read "Latest Site News", at the time of posting:
Latest Site News wrote:Python: Heap overflow in the included PCRE library
X.Org: Heap overflow in pixmap allocation
Such a thing would just not be possible with Java.

And there is of course my favorite quote about C++
Tom Cargill wrote: If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?
danmitchell wrote: C++ doesn't require manual memory management
Yeah, sure.

Don't get me wrong, I'm no Java fanboy. I'd recommand Smalltalk, Python or even Ruby over Java. But if the choice is Java or C++, I go Java. But I'd actually say Java is proven. In the last 10 years it has cut so significately into the market share of C/C++ like no other programming language.
Top
Dlareh
Advocate
Advocate
User avatar
Posts: 2102
Joined: Sat Aug 06, 2005 8:33 pm

  • Quote

Post by Dlareh » Thu Sep 15, 2005 5:58 am

danmitchell wrote:
Dlareh wrote:the answer is clearly Java... no programmers should ever have to do their own memory management unless it is strictly needed or desireable for the task at hand.
Stop spreading FUD: C++ doesn't require manual memory management.
It doesn't? When did this happen? Why do tools like IBM Rational Purify or the new OSS Valgrind exist?

Last I checked C++ did not have garbage collection nor anything similar that allows one to not worry about memory allocation at all. That's what I mean by "manual"...
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Top
IvanYosifov
l33t
l33t
User avatar
Posts: 778
Joined: Fri Oct 15, 2004 6:33 pm
Location: Bulgaria

  • Quote

Post by IvanYosifov » Thu Sep 15, 2005 6:15 am

kustos wrote: I'd recommand Smalltalk, Python or even Ruby over Java.
Why would you recommend Smalltalk over Java !? Today Smalltalk stands in the exact same place COBOL does.
Dlareh wrote: Last I checked C++ did not have garbage collection
Well, actually it does. There are libraries that do it ( google).
Of course, whether these collectors are mature enough or usable with any sort of framework that was not build with GC in mind is a different story. In theory, C++ has GC. In practice, no one but researchers is using it.
Top
Post Reply

66 posts
  • 1
  • 2
  • 3
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic