PDA

View Full Version : C++ sucks



Ben Sprinkle
October 31st, 2006, 03:26 PM
I have tried to learn C++, but it's extremely boring and the layout of the language is really dull. I am going back to Java.

I spent a few weeks trying to learn tis crap but it's just not for me. One, there is gtkmm and gtk. Two, it's not same coding as windows and I use both OS's.

Anyone have any opinions about C++?

_lynX
October 31st, 2006, 03:39 PM
I agree wholeheartedly.

While I cannot deny the fact that C++ is a powerful language, it is far too boring for me to use. I find beauty in the layout and design of code, and I just cannot find that anywhere in C++, so I stick with Ruby.

Ben Sprinkle
October 31st, 2006, 03:46 PM
Never tried Ruby, but I like the layout of Java. I can't deal with **** like this:


cout >> "blah"
cin.get
What the hell is cout?
System.out.println("blah"); makes more sense. :)

highneko
October 31st, 2006, 03:48 PM
I agree completely. But have you tried c++ opengl programming? I had a fun time. Bash ftw!

Ben Sprinkle
October 31st, 2006, 03:51 PM
I'v only done Java, C++, Python, and Visual Basic. (Little bit of C#)
But how is it "powerful" seems like any other programming language.
One thing I don't like about Java's swing is the default blue theme. It's so ugly.

Lord Illidan
October 31st, 2006, 03:54 PM
U find it boring. I find it quite nice. Each to his own. C++ power is unrivalled.

highneko
October 31st, 2006, 03:54 PM
I was following some tutorials from this one site, great site. C++ still sucks compared to bash tho. ;)
http://nehe.gamedev.net/
http://nehe.gamedev.net/lesson.asp?index=01
http://nehe.gamedev.net/lesson.asp?index=10

Ben Sprinkle
October 31st, 2006, 03:57 PM
Well that's your opinion Illidan. Btw warcraft is best. :)

Ben Sprinkle
October 31st, 2006, 03:59 PM
Hmm, actually whille thinking about it, it is alright. I like the feel of the "exe".
How different is gtk and windows coding wise?

Lord Illidan
October 31st, 2006, 03:59 PM
Well that's your opinion Illidan. Btw warcraft is best. :)

But the last statement is a fact, not an opinion.8)

_lynX
October 31st, 2006, 04:03 PM
But the last statement is a fact, not an opinion.8)

It depends on what you're trying to do. I'd debate that the simplicity of Ruby makes it more powerful than the complexities C++ in some situations.

Ben Sprinkle
October 31st, 2006, 04:24 PM
Yes, well I am sticking with Java.

Dual Cortex
October 31st, 2006, 05:21 PM
Never tried Ruby, but I like the layout of Java. I can't deal with **** like this:


cout >> "blah"
cin.get
What the hell is cout?
System.out.println("blah"); makes more sense. :)

Are you serious?
Why the hell would you want to type System.out.println("blah"); instead of cout >> "blah;

cout = C output, not that hard to understand and makes sense to me. I'm devoted to C++ and C#.

Ben Sprinkle
October 31st, 2006, 05:40 PM
Java is better than C++.
Don't like tha layout.

Dual Cortex
October 31st, 2006, 05:50 PM
Java is better than C++.
Don't like tha layout.

Well, good for you. Didn't you already say this in your original post?
BTW: the use of the word 'tha' makes people know how to feel about your opinion.

NoWhereMan
October 31st, 2006, 05:53 PM
I have tried to learn C++, but it's extremely boring and the layout of the language is really dull. I am going back to Java.

AAAAAAAAAAAAAAAARRRRRRRRRRRRRGGGGGHHHHHHHHHHHHH!

hope I was clear :D:D

btw... you can easily use different libs for output if you don't like the >> thing

tseliot
October 31st, 2006, 05:54 PM
Java is better than C++.
Don't like tha layout.

First of all the title of this thread looks like a flamewar bait. Someone else might chime in and say that Java sucks and then a flamewar would start.

This forum is not the right place for this kind of things.

I could have used a title such as "What do you think about C++" and say that you don't like it.

Furthermore, claiming the superiority of one language over another does not make any sense whatsoever , as the choice of the programming language might depend on you purpose or on your personal taste. And of course these 2 reasons won't make a language "superior" to another.

You should say something like "I like Java better because I like its sintaxis, because I need to develop certain apps, etc.".

Otherwise you would only be trolling.

Dual Cortex
October 31st, 2006, 05:54 PM
AAAAAAAAAAAAAAAARRRRRRRRRRRRRGGGGGHHHHHHHHHHHHH!

hope I was clear :D:D

Got it... and I agree.

CapnCook
October 31st, 2006, 05:55 PM
Java is the language that sucks! Other than assembler, C++ is the most powerful language there is!

No comparison between C++ and java really. C++ compiles to native machine code, java to bytecode (yuck).

NoWhereMan
October 31st, 2006, 06:04 PM
Java is the language that sucks! Other than assembler, C++ is the most powerful language there is!

well don't forget C :p


No comparison between C++ and java really. C++ compiles to native machine code, java to bytecode (yuck).

not quite, java has the JIT Compiler which turns the platform independent bytecode into machine code. The real reason for which you could not like java is that's not (still, fully) open (and c# is not too...). Other reasons (for me): it is verbose, sometimes rigid, (still) slow and alien in the GUI (mustang is a great step forward)

btw I like dynamic (aka intrepreted, even they're not really) languages too (ruby, python, etc...)

Ben Sprinkle
October 31st, 2006, 06:05 PM
@eliot:
It's just opinion, not a flame war.

I guess it's really opinion for everyone it's just C++ is getting old for me.

@Capn
Bytecode and machine code are the same thing.

NoWhereMan
October 31st, 2006, 06:08 PM
@eliot:
@Capn
Bytecode and machine code are the same thing.

Not at all! bytecode is platform independent; machine code is not!
btw bytecode if directly interpreted is slower than machine code; that's why they invented the JustInTime compiler...

Arkainium
October 31st, 2006, 06:44 PM
Never tried Ruby, but I like the layout of Java. I can't deal with **** like this:


cout >> "blah"
cin.get
What the hell is cout?
System.out.println("blah"); makes more sense. :)

cout is an object of type ostream, it's predefined for you internally to represent standard output. So I guess it would be the java equivalent of System.out. So instead of println you're using << (http://www.cplusplus.com/ref/iostream/ostream/operatorltlt.html) (insertion), an overloaded operator, to pass arguments to it.

Although my experience with java is quite dated, I remember it looking syntactically similar to C++.

I think you're just nitpicking to back up your opinion.

tseliot
October 31st, 2006, 07:17 PM
@eliot:
It's just opinion, not a flame war.

I respect your opinion. I didn't like the form you used to express your opinion.

Please make clear that it's only your opinion. And I encourage everyone else to do the same.

Ramses de Norre
October 31st, 2006, 07:41 PM
Bytecode and machine code are the same thing.

There is a big difference between bytecode and machine code, but they both have their own advantages.

Search on wikipedia for more info.

WiseElben
October 31st, 2006, 08:31 PM
Never tried Ruby, but I like the layout of Java. I can't deal with **** like this:


cout >> "blah"
cin.get
What the hell is cout?
System.out.println("blah"); makes more sense. :)

cout stands for console out. Java has nice syntax, but no one can deny the fact that C++ is the industry standard.

Lster
October 31st, 2006, 08:52 PM
Well... I like both languages; neither "suck"! I use both, but agree Java is more fun... C/ C++ are far more powerful though...

shining
November 1st, 2006, 01:54 AM
There is a nice C++ section in this amazing book:
http://research.microsoft.com/~daniel/uhh-download.html

skymt
November 1st, 2006, 02:09 AM
C++ for power, Ruby for fun, Java for... ? What is Java for again? ;)

APNelson.L
November 1st, 2006, 02:20 AM
In my opinion C++ may not have the "beauty" of other languages but is still a very powerful language.

rplantz
November 1st, 2006, 04:42 AM
My favorite languages are the several (around 10) assembly languages I've used. I really like computers. Assembly language allows (and forces) me to understand exactly what the computer is doing.

Ben Sprinkle
November 1st, 2006, 02:37 PM
Is Kate, and Gedit etc made in C++?
Hmm you guys have given me reason to go back to C++.

NoWhereMan
November 1st, 2006, 03:21 PM
most of qt-based apps are coded in c++
usually gtk apps are in c, some in c++, or python

Ben Sprinkle
November 1st, 2006, 04:01 PM
Okay then back to C++ for me.

Gustav
November 1st, 2006, 04:11 PM
OK, C++ isn't that nice... but Java... yuck!!!

C or Python are very good languages but when it comes to beauty, nothing can beat Scheme.

edit: these are just my opinions not the "truth".

yaaarrrgg
November 1st, 2006, 04:38 PM
nothing can beat Scheme.

I think Scheme is interesting, although I wish the syntax didn't have so many parentheses (which seems redundant (especially if you are indenting the program ( arg!!! i'm lost in parans! :) ))).

A simple but big improvement would be to borrow a note from Python, and use allow tab based scoping as well.

Course, I'm not the first to think of this, a couple other people have already had the same idea:

http://pschombe.wordpress.com/2006/04/16/lisp-without-parentheses
http://www.lispin.org/

skymt
November 1st, 2006, 06:42 PM
I think Scheme is interesting, although I wish the syntax didn't have so many parentheses (which seems redundant (especially if you are indenting the program ( arg!!! i'm lost in parans! :) ))).

As I'm sure you know, Scheme is based on Lisp, which stands for "Lots of Irritating Spurious Parentheses". If you like the Lisp style, but don't like the ((())), you may want to check out Ruby. I don't have experience with Lisp (other than a little Emacs hacking), but I've seen a lot of people compare the two.

sjf
November 2nd, 2006, 01:06 AM
Are you serious?
Why the hell would you want to type System.out.println("blah"); instead of cout >> "blah;

cout = C output, not that hard to understand and makes sense to me. I'm devoted to C++ and C#.

Anyway it's:

using namespace std;
cout << "blah";
cin.get();

Note the direction of the in/ouyput operators (the pretty angled brackets).

sjf
November 2nd, 2006, 01:09 AM
Well... I like both languages; neither "suck"! I use both, but agree Java is more fun... C/ C++ are far more powerful though...

Finally, some words of wisdom.

jpeddicord
November 2nd, 2006, 01:12 AM
Since Java is interpreted, you need the libraries and there is a speed hit since it is run-time. Since C++ has no overhead, it is one of the fastest languages out there.

wxWidgets is a great solution for cross-platform programming too. It has libraries for almost everything!

Choad
November 2nd, 2006, 01:24 AM
Are you serious?
Why the hell would you want to type System.out.println("blah"); instead of cout >> "blah;

cout = C output, not that hard to understand and makes sense to me. I'm devoted to C++ and C#.
cout means console output not C

even tho i dont know much c++ at all, its very easy to see how awesome it is, by how closely it runs to machine code, yet gives you enough abstraction to be creative

rplantz
November 2nd, 2006, 02:01 AM
even tho i dont know much c++ at all, its very easy to see how awesome it is, by how closely it runs to machine code, yet gives you enough abstraction to be creative

I think I've seen more creative programming in assembly language (essentially machine code) than in any high level language. Not to say that such "creative programming" was always good. :)

I think it's important to know how to program in several languages, and the more different they are, the better. It broadens your perspective on how to approach solving a problem. Also, it makes you more valuable to potential employers.

Jessehk
November 2nd, 2006, 02:30 AM
I personally quite like C++, though I like plain C better.


How's this look? :p :D



#include <algorithm>
#include <iostream>
#include <iterator>

template<typename T, int size>
void print_array( const T (&arr)[size] ) {
std::copy( arr, arr + size, std::ostream_iterator<T>( std::cout, "\n" ) );
}

int main() {
int arr[] = { 1, 2, 3, 4, 5 };
print_array( arr );
}


In actuality, I think it is overly complicated.
There are too many inconsistencies and obscure features. That doesn't stop me
from having fun with it though. :p

amo-ej1
November 2nd, 2006, 07:56 AM
True, one would choose memcpy over std::copy only on for the function names ;)

slavik
November 2nd, 2006, 08:05 AM
what I like about C++ that Java doesn't have?

operator overloading ... all of the sudden, you can make '+' mean something for that new class/struct you just wrote.

Also, when Java was being written, they could look at C++ and smalltalk and make their own decisions. Stroustroup couldn't really do that ...

amo-ej1
November 2nd, 2006, 08:13 AM
What I like the best is this:



e@lap:/tmp# vi HelloWorld.cpp
e@lap:/tmp# g++ -o Hello_cpp HelloWorld.cpp
e@lap:/tmp# vi HelloWorld.java
e@lap:/tmp# javac HelloWorld.java
e@lap:/tmp# time ./Hello_cpp
Hello world

real 0m0.005s
user 0m0.000s
sys 0m0.008s
e@lap:/tmp# time java HelloWorld
Hello world


real 0m0.187s
user 0m0.056s
sys 0m0.056s


No further comments ;)

Dual Cortex
November 2nd, 2006, 03:14 PM
cout means console output not C

even tho i dont know much c++ at all, its very easy to see how awesome it is, by how closely it runs to machine code, yet gives you enough abstraction to be creative

Seems like you are right... oh well... I remember that on the 1st book on C++ that I read, it defined cout as c output. Though Console output makes more sense, but either way it's a lot better than System.Out....

NoWhereMan
November 2nd, 2006, 03:45 PM
What I like the best is this:



e@lap:/tmp# vi HelloWorld.cpp
e@lap:/tmp# g++ -o Hello_cpp HelloWorld.cpp
e@lap:/tmp# vi HelloWorld.java
e@lap:/tmp# javac HelloWorld.java
e@lap:/tmp# time ./Hello_cpp
Hello world

real 0m0.005s
user 0m0.000s
sys 0m0.008s
e@lap:/tmp# time java HelloWorld
Hello world


real 0m0.187s
user 0m0.056s
sys 0m0.056s


No further comments ;)


well that's fun, but it's not a fair confront. You should have compared much longer calculations, as the time for java is just the jvm loading

old but interesting http://dada.perl.it/shootout/craps.html

bye

Ben Sprinkle
November 2nd, 2006, 04:33 PM
I am doing Java, have made up my mind.
See you all later. :)

EdThaSlayer
November 2nd, 2006, 05:53 PM
C++ does sound very boring at the moment! Iam sticking to the sweet and sexy python language.

PatentEater
November 2nd, 2006, 07:42 PM
I've been a C++ programmer for about 5 years now, and I thought there was no other viable alternative in the world of systems programming languages until I heard about the D programming language (http://www.digitalmars.com/d/). After having studied D for 3 months now, I'm really totally in love with it.

If you want to see a comparison chart between C/C++/C#/Java and D then have a look at this page: http://www.digitalmars.com/d/comparison.html

My personal favourite features are:

.) Walter Bright has kept Unicode in mind when designing the language and writing the compiler and the standard library (called Phobos). The source code can therefore be in any Unicode encoding out there and built-in Unicode strings are supported.
.) Modules. Can't stand those include files and include guards anymore. However, the DMD compiler supports generating D interface files (*.di) in case you need to distribute a closed-source library.
.) Garbage Collection. Fortunately, D doesn't force it down your throat, so you can choose between explicit memory management (C malloc functions) and GC. If you're an advanced programmer, you can even write your own GC.
.) Generic Programming. A great deal better than in C++. Recently Walter added the variadic template parameters feature. I bet the boost library developers would love having that in C++ :-)
.) Delegates, function literals, nested functions, typesafe variadic arguments. Array slicing/literals, associative arrays. "Design by Contract", unit testing, scope guards.

You might have already got enthusiastic about D like me when I read about it the first time. Walter has been working diligently on the already highly usable compiler and I think D 1.0 should be out before the end of this year. One of the things D is in dire need currently, is publicity and more dedicated library developers (many projects are hosted at http://dsource.org).

Don't be shy and discuss what you think about the language at digitalmars.D (http://www.digitalmars.com/NewsGroup.html).

NoWhereMan
November 2nd, 2006, 07:55 PM
I had a look at d some time ago. the biggest "drawback" is there is still no gnu stable compiler IIRC (it is in a development stage)
btw it looked interesting

EDIT: http://dgcc.sourceforge.net/

rekahsoft
November 2nd, 2006, 10:00 PM
I enjoy both java and C/C++. Java is a nice language that is good for some things and C/C++ is good for other. Why because each lanaguage is designed with different specifications and for different usages. Therefore no language is "better" than another. I used to say "Java is better than any other langauge" but now that i have been learning C/C++ i found that i liked them both equally...sure C/C++ is more low-level and more "cryptic" and slightly more difficult then java and other langauges but it is not that hard. In closing every langauge is designed for a pupose and is usefull when used correctly. "To each there own". That is all i have to say :)

Lster
November 2nd, 2006, 10:48 PM
@rekahsoft:
Spot on.8)

ironfistchamp
November 3rd, 2006, 11:42 AM
Personally I couldn't stand Java. Gave it a whack but quickly left. C++ on the other hand I stuck around longer until I actually wanted to do something other than test if the user typed a or b. My tiny brain couldn't handle all the complicatedness of C++. I bought a book on it to see if it could teach me but I never got past the third chapter as it was so insanely boring.

Then I found Python and I was actually able to do things. The syntax is so clean compared to C++ and the like. No semi-colons :-D

Well once I am programming Python at a high standard I may go back to C++ or check out D.


Ironfistchamp

Ben Sprinkle
November 3rd, 2006, 02:46 PM
I like the semicolons.
Anyway I have already started learning Java, it's way more fun then C++ was. I don't give a hell about the speed differences. Works fast enough for me anyway.

amo-ej1
November 3rd, 2006, 03:25 PM
which would make you the first computer user which doesn't care about speed ;)

theorem_hunter
November 3rd, 2006, 03:37 PM
D looks like it will be a great language, but for now im debating weather to start learning Ruby or Python. i here they are pretty much the same thing

Ben Sprinkle
November 3rd, 2006, 03:40 PM
Python, or Jython.

curvedinfinity
November 3rd, 2006, 04:04 PM
I learned how to program with Java. I learned how to program well with C++. ;)

Ben Sprinkle
November 3rd, 2006, 05:01 PM
Java for life. :)

_lynX
November 3rd, 2006, 05:31 PM
which would make you the first computer user which doesn't care about speed ;)

There are plenty of people who don't care as much about speed as they use interpreted languages. That isn't the point to every single app.

Relain
November 3rd, 2006, 05:45 PM
what's c++? Isn't java a place? More NEW languages? Oh man! So not only have i had to give up programming on punch-cards, then cobol and i just learnt this amazing new language fortran70.

Hang on, sorry, what are objects again?


Seriously though, the difference between compiled and interpreted code is very small for a huge number of programs. Granted anything mathematically intense, sciencey stuff and i guess games will benefit from compilation. Anything based around text and strings well IMHO you'd be a fool to try and write it in c/c++/fortran. You'd neither notice the speed difference nor have any fun trying to do stuff that ruby/perl/python/whatever can do like <snap>...

Also how can a language be boring? If it's boring you're probably just not doing very interesting things per se. If you want a fun project make an nbody model of the galaxy in an interpreted language and c and see what's more fun. Answer they're both fun but it'll work better in c.

Well there, i've said what everyone else has just said too. great.

_lynX
November 3rd, 2006, 06:29 PM
Also how can a language be boring?

I'm one of those weird people who finds beauty in really strange things, and for me, a language is boring if it isn't visually appealing to me. I've read many a blog where people go on about how beautiful Ruby code is to them compared to other languages, which is one of the main reasons I even started with Ruby.

I just don't find C++, C, and some other languages to be very beautiful when it comes to code layout.

Kurt`
November 3rd, 2006, 06:34 PM
Topic creator clearly doesn't know enough about what he is trying to criticize...

/me files this topic under 'misinformed flamebait'


I like the feel of the "exe".

I rest my case. :roll:

NoWhereMan
November 3rd, 2006, 06:38 PM
btw this thread is so full of funny post that still it's worth for me to keep on reading, lol

IYY
November 3rd, 2006, 06:43 PM
Everybody knows that C++ is not as elegant as other object oriented languages, but to say it 'sucks' is ridiculous. C++ and C are designed for speed, and there are many many cases where speed is essential. Try programming a real 3D game in Java (even a 2D game will feel sluggish). Hell, try programming a word processor: Open Office clearly feels slower and more sluggish than any other mainstream Linux or Windows app because of Java.

Java's and C#'s syntax certainly looks more comfortable, but it's artificially comfortable. It doesn't correctly represent what's happening behind the scenes. If you've ever programmed in assembly, you would have seen just how the C code translates to op codes, and how the op codes translate to ones and zeroes. Not so with Java.

Comparing Java and C++ is like comparing real construction materials. Sure, the lego is easier and more intuitive, but let's see you build a skyscraper with it.

_lynX
November 3rd, 2006, 06:46 PM
Sure, the lego is easier and more intuitive, but let's see you build a skyscraper with it.

:rolleyes:

http://www.nelug.org/gallery/albums/album28/City_Matt_skyscraper.jpg

Zdravko
November 3rd, 2006, 06:47 PM
C++ - boring? I can't believe it! The topic-starter is a troll! C++ is the most beautiful language I've ever found on Earth. C++ is The Way, The Truth and The Life. Java is a misunderstanding, a mistake of nature. No one can compare the power of STL (amen!) to the boring and useless java API.

_lynX
November 3rd, 2006, 06:51 PM
Why does expressing ones opinion make one a troll? Could I call you a troll for your C++ zealotry? :/

shining
November 3rd, 2006, 07:27 PM
C++ - boring? I can't believe it! The topic-starter is a troll! C++ is the most beautiful language I've ever found on Earth. C++ is The Way, The Truth and The Life. Java is a misunderstanding, a mistake of nature. No one can compare the power of STL (amen!) to the boring and useless java API.

Is this supposed to be funny? (sorry, I've sometimes problem detecting that)

Zdravko
November 3rd, 2006, 07:36 PM
Why does expressing ones opinion make one a troll? Could I call you a troll for your C++ zealotry? :/
Yes, you can.

Is this supposed to be funny? (sorry, I've sometimes problem detecting that)
No, but the thread-starter is funny. He never learned the divine language C++. And because of this he decides to write silly things in this forum.

ironfistchamp
November 3rd, 2006, 07:56 PM
Haha love that skyscraper :p

IYY
November 3rd, 2006, 08:07 PM
_lynX: very Java-like. Looks good, was easy to build, but entirely useless. People can't live in this particular skyscraper. If you try to scale your method and make a fully-functional skyscraper, you'd run into difficulties and will never be able to make one as good as a real skyscraper.

Lster
November 3rd, 2006, 08:27 PM
Is it fair to say: C++ for power, Java for fun?

_lynX
November 3rd, 2006, 09:07 PM
_lynX: very Java-like. Looks good, was easy to build, but entirely useless. People can't live in this particular skyscraper. If you try to scale your method and make a fully-functional skyscraper, you'd run into difficulties and will never be able to make one as good as a real skyscraper.

While even I don't like Java, I don't think it is as useless as you give it credit for. Java applications may be slow, but they can still be fully-functional. I guess it could kind of be seen as an old skyscraper. You know, the ones that aren't as big and good-looking, and have the really slow elevator? Even then, they still house offices of many different companies, some of which are important and some of which are unimportant. Okay, so maybe not such a great analogy, but you get my point I hope.

Ben Sprinkle
November 6th, 2006, 04:17 PM
While even I don't like Java, I don't think it is as useless as you give it credit for. Java applications may be slow, but they can still be fully-functional. I guess it could kind of be seen as an old skyscraper. You know, the ones that aren't as big and good-looking, and have the really slow elevator? Even then, they still house offices of many different companies, some of which are important and some of which are unimportant. Okay, so maybe not such a great analogy, but you get my point I hope.
I=synectics.
Some of you offended me. I was just expressing opinion.

Tomosaur
November 6th, 2006, 04:34 PM
I don't know an awful lot of C++, but from what I've done with it, I actually kinda like it. I prefer Java for now, but Swing is really ******* me off lately so that may change.

_lynX
November 6th, 2006, 05:43 PM
I=synectics.
Some of you offended me. I was just expressing opinion.

You quoted me, so I assume you're saying I offended you. I'm sorry if you're offended, but we are only talking about programming languages after all. I'm also not quite sure which part offended you, as I haven't really said anything "offensive".

JayTee
November 7th, 2006, 04:06 AM
First of all the title of this thread looks like a flamewar bait. Someone else might chime in and say that Java sucks and then a flamewar would start.

This forum is not the right place for this kind of things.

I could have used a title such as "What do you think about C++" and say that you don't like it.

Furthermore, claiming the superiority of one language over another does not make any sense whatsoever , as the choice of the programming language might depend on you purpose or on your personal taste. And of course these 2 reasons won't make a language "superior" to another.

You should say something like "I like Java better because I like its sintaxis, because I need to develop certain apps, etc.".

Otherwise you would only be trolling.

Probably the most intelligent post and point of view I've read in this thread. Very well said, T.S.
Saying any one programming language is superior to others in all respects and for every applied purpose only shows a lack of depth and understanding.
Different languages serve some purposes better than others. You wouldn't prune your hedges with a chainsaw or try to chop down a tree with a pair of pruning shears, would you? You pick the right tool for the job. Sticking to only one language is in itself a limiting factor and often inefficient.

Russel-Athletic
November 7th, 2006, 01:12 PM
I can't stand i just have to post.

I recently try to learn java and i can say: Whou. Somethings are really easy.
For example different classes and abstract ones mixed together. In c++ you have to watch out for Header. In java just bam. There it is.
Or ever tried to get a integer out of a string? Easy in java. In C++ you have to use another library or create an stringstream.

But some things are in c++ very nice. For example default values in functions or operation overloading. An i just love << :D

If you programm with c++ you really get the feeling, that this language is old. If somebody would just make some things better i would use it for everything. Even if it has no Garbage Collector.
I wait and hope for C++ 200x.

elettronicha
November 7th, 2006, 02:02 PM
I find this thread very useless, a flame war.
Real programmers know when to use a language and when another one, when a language is useful or not, when a language simplify his life or not, depending on the application, his needs and his skills.

Ben Sprinkle
November 8th, 2006, 04:13 PM
I can't stand i just have to post.

I recently try to learn java and i can say: Whou. Somethings are really easy.
For example different classes and abstract ones mixed together. In c++ you have to watch out for Header. In java just bam. There it is.
Or ever tried to get a integer out of a string? Easy in java. In C++ you have to use another library or create an stringstream.

But some things are in c++ very nice. For example default values in functions or operation overloading. An i just love << :D

If you programm with c++ you really get the feeling, that this language is old. If somebody would just make some things better i would use it for everything. Even if it has no Garbage Collector.
I wait and hope for C++ 200x.

I guess whatever language you first start is probably the one you will stick with, I started with Java and sticking with it. ;)
I like your opinions on Java, but I can't share the same feeling with C++.

@Other guy up top who had issue with Swing:
What was your problem, maby I can help.

boban
November 8th, 2006, 04:16 PM
I guess whatever language you first start is probably the one you will stick with,

... for some time only... Languages change as do people using them- I started programming in Logo and Basic on Atari 65 XE :)

And guess what... I don't use logo any more ;-)

C++/java/c# = very, very, very similar languages...

For a change I would recommend using prolog or ocaml :twisted:

Ben Sprinkle
November 8th, 2006, 05:31 PM
I didn't start with a minor language like VB/QBASIC etc., I started with a major language.
That's what I mean by sticking by it. :)

boban
November 8th, 2006, 05:36 PM
I didn't start with a minor language like VB/QBASIC etc., I started with a major language.
That's what I mean by sticking by it. :)

Basic (+ data lines) was THE language at that time! :mrgreen:

reynoldlariza
November 9th, 2006, 06:38 AM
I find this thread very useless, a flame war.
Real programmers know when to use a language and when another one, when a language is useful or not, when a language simplify his life or not, depending on the application, his needs and his skills.

could be true... but you can't stop em...

it's like one friend of mine said that school sucks, but I love it very much.

....
my opinion? I just happened to learn C with the knowledge that it's the most language used and has a lot of sources and libraries available everywhere. If Im into some troubles, I entered to some forums and get a quick, curious yet reliable answers. Why am I staying in C/C++? well i could actually now write a code just within my head (lol), also syntax of most programming languages are similar to C/C++, so adaptation was easily done without further maneuvers.

FYI:
C/C++ will stay for a lot longer than any other language. Since a lot of popular operating systems are written with it. And that's my intended goal for staying.

Ben Sprinkle
November 9th, 2006, 02:35 PM
Yes but it's not the same coding or libraries for any OS. Meaning you need different compilers for each OS.
Java and C# are Cross-Platform, that's why I mainly don't like C++.

Eric_T
November 9th, 2006, 03:39 PM
I guess whatever language you first start is probably the one you will stick with, I started with Java and sticking with it. ;)
I like your opinions on Java, but I can't share the same feeling with C++.

@Other guy up top who had issue with Swing:
What was your problem, maby I can help.

There's some truth to that. At least it takes a while to "unlearn" a language you've spent a lot of time with. I learned Java very thoroughly in the first years at my University, and I often find myself thinking about ArrayList and stuff like that...

Now I mainly write scientific applications, though, so most of my coding is in Fortran, sometimes using Python as a glue language/GUI framework.

TheGurkha
November 9th, 2006, 03:44 PM
Hmm, actually whille thinking about it, it is alright. I like the feel of the "exe".
How different is gtk and windows coding wise?

gtk is very different to Windows API programming - it is a lot easier.

Can't you get gtk on Windows too? from the gtk website
"Binary packages for win32 will be made available soon."

Ben Sprinkle
November 9th, 2006, 04:00 PM
Oh well, Java is fine for now. I don't really give a hoot for speed right now anyway.

chris hyperstring
November 17th, 2006, 03:48 PM
hey but what ever you java programmers do don't do lisp as its back to front for you guys! im learning it and its great fun full of speed, i've not tried java but i don't want to, but lisp is good if your an all over the place person, and like lists!

skeeterbug
November 17th, 2006, 06:08 PM
I didn't read all of the posts, but "correct tool for the job" anyone?

Luggy
November 17th, 2006, 09:58 PM
Never tried Ruby, but I like the layout of Java. I can't deal with **** like this:


cout >> "blah"
cin.get
What the hell is cout?
System.out.println("blah"); makes more sense. :)

What you like about Java is what I didn't like about it.
I like having the simipler method of writing stuff, going
cout << "hello world" << endl; instead of
System.out.println("hello world");

I guess it's just preference but really you shouldn't say it sucks. I don't like Java as much but I still find it's uses and I'm sure that if you looked you could find uses for C++.

Btw, Qt > Gtk try that library instead.
Programming with Qt is like programming with digital sex!

Ben Sprinkle
November 20th, 2006, 04:14 PM
Did you guys know that Java is actually emulated instead of just plain run like C++ or something? That pisses me off so much, gets emulated by the JavaVM which is dumb, just make is compile to machine code meh. :P

daniel of sarnia
November 20th, 2006, 06:55 PM
U find it boring. I find it quite nice. Each to his own. C++ power is unrivalled.

second that!

autoexec
November 21st, 2006, 05:06 AM
D sounds rather interesting, thanks for the link back there.

IYY
November 21st, 2006, 05:14 AM
Did you guys know that Java is actually emulated instead of just plain run like C++ or something? That pisses me off so much, gets emulated by the JavaVM which is dumb, just make is compile to machine code meh. :P

While I am one of the supporters of C++ in this thread, I believe you don't understand what Java is all about. It was originally invented for the purpose of not having to compile your code for every machine you run it on. This was intended for devices like TVs, cell-phones, etc. For some strange reason, Java became somewhat popular on PCs and only recently is being used in cell phones and other devices.

The point is... Compile once, run anywhere. This adds a lot of simplicity but does, of course, reduce the speed by a lot. More than 4 times, in some cases.

With its disadvantages, Java still has a purpose. Now, C#, on the other hand... Still uses similar technology, but is not portable anywhere (well, the language itself is, but without the GUI toolkits with which C# programs are usually written, it's not all that useful.)

Ben Sprinkle
November 21st, 2006, 02:33 PM
Thanks for that information. I like Java because of just that, can use it on websites also. :)

Ansible
November 21st, 2006, 05:10 PM
I understand the goal of java, being ultraportable and not having to compile it everywhere. Instead you just create one bytecode object file that can be interpreted by a program (virtual machine) on the target machine. What I don't understand is why not have a bytecode-to-exe compiler instead of a JIT 'compiler' (actually interpreter)? That way you lose the overhead of JIT but keep the bytecode portability. Download the bytecode, generate exe, delete bytecode, you're done.

Anyway, re C++, I've used this language for years, and I have to agree that it is a pain in many ways. Although it can be very powerful, I always find myself struggling with some trivial issue, like some weird problem involving types and abstraction, or memory leaks, or some library that refuses to compile on my machine but works for everyone else. Its supposed to be a portable language, but in reality it is far from portable without a lot of hacking around. Sure, 'hello world' is portable, but beyond that...

I have to agree with the 'right tool for the job' philosophy. I think the reason so many 'easy' scripting languages are popular right now is that a lot of applications (internet apps) are bandwidth limited. Because network speed is slow, the computer can process even a slow interpreted language fast enough to keep up. However, when bandwidth is not limited, like in the openoffice case, you notice the slowdown.

I hope a language like D can really take off; the world needs a cleaner high performance language than C++! Maybe the multithreading revolution that's (always?) around the corner will bring another language to the fore for high performance.

dataw0lf
November 21st, 2006, 05:14 PM
The problem in Java lies in the fact that it approaches a problem with one (1) programming paradigm and one (1) only: OOP, or, to be more specific, COP (class orientated programming). When you have no choice but to wrap procedural programming in a container class, you know you have a problem.

C++ sucks too, but the STL makes it (kinda) better.

Just use Python, and the baby Jesus will love you.

Jbloudg20
November 21st, 2006, 05:25 PM
U find it boring. I find it quite nice. Each to his own. C++ power is unrivalled.

Unrivaled? HA how about faaaar surpassed by assembly.

Don't code assembly? What you also drive an automatic transmission automobile?

dataw0lf
November 21st, 2006, 06:27 PM
Unrivaled? HA how about faaaar surpassed by assembly.

Don't code assembly? What you also drive an automatic transmission automobile?


Wow, nice post.

Not.

Modern compilers can provide much, much better assembly in nearly all cases. Do your research. Or actually hack in assembly for a while. Then compare the tedious 50 lines you've come up with to 3 lines in C/C++, and then compare the speed.

Assembly nowadays is pretty much useful only when you're writing an exploit and/or device drivers.

steevk
November 21st, 2006, 08:21 PM
I didn't read all of the posts, but "correct tool for the job" anyone?


Thank you! I like C++, and dislike Java, but sometimes Java has its strong points.

Use whatever's best.

neoflight
November 21st, 2006, 08:42 PM
Thank you! I like C++, and dislike Java, but sometimes Java has its strong points.

Use whatever's best.

i guess me too....

i found this...

http://verify.stanford.edu/uli/java_cpp.html

http://www.cs.wustl.edu/~levine/courses/cs342/c++/javaVcpp-index.html

http://www.kano.net/javabench/

do any of you guys have a (personal) organized comparison study on various aspects of problem solving using c/c++ and java...??

Lster
November 21st, 2006, 08:44 PM
Well I think that Assembly, C and C++ are the best! Java is fun to program in though, although for fun I prefer Python.

Assembly code is marginnally faster than C code and C is a bit faster than C++. I have done some comparisons of assembly code and C code, and well programmed assembly always beats C.

dataw0lf
November 21st, 2006, 09:08 PM
Assembly code is marginnally faster than C code and C is a bit faster than C++. I have done some comparisons of assembly code and C code, and well programmed assembly always beats C.

I'd like to see the comparisons. Information pertinent would be the relevant assembly code, the relevant C code, compilers used, and the problem set involved. I'm going to assume that either your compiler is faulty, or your C code is terrible.

Or we could do something like... hm, hash lookups? You can write yours in assembly, I'll write mine in Python. We'll see whose code is faster.

I got a fitty on my code.

Holla!

slavik
November 22nd, 2006, 02:04 AM
well, C without optimisations will never beat optimised assembly ...

for example:
if (1==2) {} //completely useless and optimisation not even needed to just get rid of the code.

for (int i=0; i<100; i++) { cout<<i; } // this can be expanded into:
i=0; cout<<i;
i=1; cout<<i;
or even into:
cout<<"1";
cout<<"2";

take a guess which is the fastes of the last 3 code samples.

dataw0lf
November 22nd, 2006, 02:07 AM
well, C without optimisations will never beat optimised assembly ...


Obviously not. But C, when compiled, is automatically optimized. You can specify further optimizations, but even without those, the assembler constructed by the compiler is far superior to human written assembler in almost all instances.

po0f
November 22nd, 2006, 02:11 AM
(snip)

gcc > programmer

(You forgot to optimize away the chit-chat.)

slavik
November 22nd, 2006, 06:49 AM
Obviously not. But C, when compiled, is automatically optimized. You can specify further optimizations, but even without those, the assembler constructed by the compiler is far superior to human written assembler in almost all instances.
far superior to any single person but not superior to our collective (don't forget who comes up with optimisations) ... at default compile not much optimisation is done, I don't think that you get loop expansion (can speed up the program a whole lot).

Ben Sprinkle
November 22nd, 2006, 02:19 PM
Guys really getting into it?
I am not one for the power, so I just do Java because it's fun. :)

dataw0lf
November 22nd, 2006, 05:30 PM
gcc > programmer

(You forgot to optimize away the chit-chat.)

hehe.

+1 QOTD

Jbloudg20
November 23rd, 2006, 04:23 AM
Wow, nice post.

Not.

Modern compilers can provide much, much better assembly in nearly all cases. Do your research. Or actually hack in assembly for a while. Then compare the tedious 50 lines you've come up with to 3 lines in C/C++, and then compare the speed.

Assembly nowadays is pretty much useful only when you're writing an exploit and/or device drivers.


Maybe you should reread what was said. Nothing was said about the efficiency of Assembly. I agree with you that C++ is more efficient and easier to write, but I was not talking about that.

The previous member was commenting about the POWER of C++. You must also agree that assembly is more powerful, if you suggest to use it for expoits and driver code.

Do YOUR research with a first grader on how to read. Then you wouldn't look like such an idiot.

_lynX
November 23rd, 2006, 06:57 PM
The previous member was commenting about the POWER of C++. You must also agree that assembly is more powerful, if you suggest to use it for expoits and driver code.

I do not agree. To me, the amount of time one must spend writing all of the Assembly code detracts a massive amount of 'power' from the language, because you can't get nearly as much done as you could in C++ in that amount of time.


Do YOUR research with a first grader on how to read. Then you wouldn't look like such an idiot.

There's NO need to insult anyone. We're all intelligent humans here.

Lster
November 23rd, 2006, 07:25 PM
Assembly has the _potential_ to be faster than C/ C++. If the programmer uses any language poorly it wont be as fast as it could. Personally my (small) programs that I have written in assembly seem faster than the C/ C++ equivalent.

Basically, as C/ C++ compile into assembly (and then machine code) C/ C++ cannot ever be faster than assembly... only slower or the same.

Jbloudg20
November 23rd, 2006, 09:59 PM
I do not agree. To me, the amount of time one must spend writing all of the Assembly code detracts a massive amount of 'power' from the language, because you can't get nearly as much done as you could in C++ in that amount of time.
Although I agree that it takes much longer to write assembly code, it doesn't reduce the amount of power the language has. That just makes the language a poor choic to use in certain situations. If I'm writing a quich databse interface, there is no way I would use assembly over Java, but if I'm writing a (windows, lol) exploit, those language might not have that ability to do so.



There's NO need to insult anyone. We're all intelligent humans here.

You are right. I apologize. I took offense to being told to "do my research", and went down to is level.

Freddd
November 23rd, 2006, 10:00 PM
I learned how to program with Java. I learned how to program well with C++. ;)This is so true!

cogitordi
November 23rd, 2006, 10:09 PM
I have tried to learn C++, but it's extremely boring and the layout of the language is really dull. I am going back to Java.

I spent a few weeks trying to learn tis crap but it's just not for me. One, there is gtkmm and gtk. Two, it's not same coding as windows and I use both OS's.

Anyone have any opinions about C++?

Do you mean valuable opinions or more of the sort that you have expressed? :p

Ansible
November 24th, 2006, 01:25 AM
Of course whether a language is 'powerful' or not depends on your definition of the power of a language. One definition of a powerful language is one that can accomplish a great deal with very little programmer effort. This is the most commonly accepted definition of a powerful language.

Assembler is not a language that can do that; scripting languages are. In that sense assembler is the opposite of a powerful language, it can take a great deal of code to accomplish something very simple.

However, another definition of a powerful language is one that can produce very fast object code, and do so in a very flexible way. Theoretically at least, assembler is as fast and flexible as it is possible to be. You have to really know what you are doing though... and its quite powerful at shooting yourself in the foot.

Jbloudg20
November 24th, 2006, 04:56 PM
However, another definition of a powerful language is one that can produce very fast object code, and do so in a very flexible way. Theoretically at least, assembler is as fast and flexible as it is possible to be. You have to really know what you are doing though... and its quite powerful at shooting yourself in the foot.

Very well put!

I agree wholeheartedly.

addicted68098
November 25th, 2006, 12:20 AM
I agree, but it is important to know the language (or Assembly) because of its speed compared to languages based off of C/Assembly.

skelooth
November 25th, 2006, 12:28 AM
I absolutely love and adore C++. To me it is the perfect blend of readability, scalability, power, and speed. Java makes a nice RAD language when using swing, but I feel constricted by the language.

But what it really comes down to is not what your or I like or want to use. What it comes down to is two things: a) The right tool for the right job. As in you would not write code in C++ from scratch to parse and format text files when you have Perl available, and b) Whatever your employer wants you to use.

po0f
November 25th, 2006, 12:33 AM
... when you have Python available, ...

I corrected your typo for you. ;)

skelooth
November 25th, 2006, 12:54 AM
I corrected your typo for you. ;)
haha, an arguement older than time, of which that has no resolve. ;)

codecaine
November 25th, 2006, 05:41 AM
by the way its cout<<"whatever"; Maybe is your coding skills you late not the language itself :).

cantormath
November 25th, 2006, 05:44 AM
I have tried to learn C++, but it's extremely boring and the layout of the language is really dull. I am going back to Java.

I spent a few weeks trying to learn tis crap but it's just not for me. One, there is gtkmm and gtk. Two, it's not same coding as windows and I use both OS's.

Anyone have any opinions about C++?

You should probably learn c++ before you make such a blanket statement.

Remember, with C++ you can fly the space shuttle....not so much with java.

If you would like something easy, try VB.