• 0

Which is more fun for you, Java or C++?


Question

Recommended Posts

  • 0

Wow. Java and C++ are rarely associated with the word "fun".

Among the mainstream languages - maybe ruby?

I hate the abomination named Java. C++ is much more straightforward to use and has better cross-platform supports.

C++ and straightforward in the same sentence? This thread delivers!

Link to comment
Share on other sites

  • 0

Which is more fun for you to program in, Java or C++?

Java, duh! C++ is good when you're learning basic concepts which should never be ignored. Hell some people even make careers out of the power of C++. Then you reach a certain point in life when you think, "I don't want to live in the stone ages anymore dealing with every last @#!# memory I allocated/de-allocated. All I want to do is create something powerful."

Link to comment
Share on other sites

  • 0

I know you didnt put it in this post, but C# would probably be more 'fun' as it is windows programming and very visual.

if you choose between C++ and Java - Java any day of the week!

C++ to me and a lot of others here do not find it as 'straight' forward as some people might like to post!

C++ does not have better cross platform support than Java if you ask me!

Then you reach a certain point in life when you think, "I don't want to live in the stone ages anymore dealing with every last @#!# memory I allocated/de-allocated. All I want to do is create something powerful."

LOL!

That is what I think!!!!

Link to comment
Share on other sites

  • 0

If Java truly had garbage collection then most programs would delete themselves on the first launch :laugh:

I sincerely believe that every programmer, no matter what his final occupation might be, let it even be HTML, should learn C/C++ and even delve into his/her choice of ASM a bit just so to understand the inner workings of any computer system.

Otherwise we will soon have a generation of programmers who just click sh*t and call the result a program without any understanding of what really happens with the data, and what all the backend code, which is already written for them, actually does.

So C++ it is.

Link to comment
Share on other sites

  • 0

As much as I hate C++ and I consider Java to be more productive, Java is the most boring, one-dimensional language in existence. C++'s expressiveness and quirks make it, in a sense, much more exciting. But waiting for recompiles is not fun. So I guess it balances itself out.

I find C# and Python to be a lot of fun.

Link to comment
Share on other sites

  • 0

out of the choices... C++, I did Java in college.. most boring semester of my life. C# is my favorite language though.

Link to comment
Share on other sites

  • 0

Ok. Thanks. Just to clarify, what I mean by "fun" by what is more rewarding.

out of the two you put up - Java any day over C++!

on that note I think windows .net development is more rewarding - so off topic vote is for C#

Link to comment
Share on other sites

  • 0

Which is more fun for you to program in, Java or C++?

C++ is more fun if you are a sadist and love the STL syntax. I quite like Java personally, not just because of its platform independence, but because of its easy to use libraries.

If I had to pick my three favourite languages, they would have to be C, Python, and Java.

Link to comment
Share on other sites

  • 0

C++ is more fun if you are a sadist and love the STL syntax. I quite like Java personally, not just because of its platform independence, but because of its easy to use libraries.

If I had to pick my three favourite languages, they would have to be C, Python, and Java.

Too bad C is just Pascal with malloc and proper pointers.

Link to comment
Share on other sites

  • 0

Java, duh! C++ is good when you're learning basic concepts which should never be ignored. Hell some people even make careers out of the power of C++. Then you reach a certain point in life when you think, "I don't want to live in the stone ages anymore dealing with every last @#!# memory I allocated/de-allocated. All I want to do is create something powerful."

or you could c++ with garbage collection ;). Or if you don't want the overhead of a complete gc you can always use smart pointers, or ...

Link to comment
Share on other sites

  • 0

Why no C#?

Because he wasn't asking about C#? Besides, it's not even remotely platform independent like C++ and Java. Then there is the Microsoft patent licensing issue.

Link to comment
Share on other sites

  • 0

Wow. Java and C++ are rarely associated with the word "fun".

Among the mainstream languages - maybe ruby?

C++ and straightforward in the same sentence? This thread delivers!

RUBY <3333333333

On topic: I hate C++. Then I prefer C# over Java, but both float my boat, I guess.

Link to comment
Share on other sites

  • 0

Too bad C is just Pascal with malloc and proper pointers.

I did some Pascal at university. Both are cognate in so far as their relationship with ALGOL. Based purely on popularity, C is the clear winner. And having used both languages I can see why. C's syntax is much nicer, and easier to read.

or you could c++ with garbage collection ;). Or if you don't want the overhead of a complete gc you can always use smart pointers, or ...

I have to agree with Jebadiah. If you want all the OO goodness, supporting libraries, GC, etc, you may as well use Java, Python etc. They are far easier and more pleasant to code with. C++ is really C's ****** child. If I want power and performance, i'll use C, it's that simple. Infact, I can use C for anything. I have yet to say to myself, C++ would be a good language to write X in.

Link to comment
Share on other sites

  • 0
If I want power and performance, i'll use C, it's that simple. Infact, I can use C for anything. I have yet to say to myself, C++ would be a good language to write X in.
If you're not going to use GC, you might as well get RAII. With C you get neither.

For all its flaws C++ has the nicest resource management scheme (RAII). C# has the whole Dispose/using thing, which works nicely when implemented but is intrusive and still somewhat error-prone. C has... nothing, so you have to manually ensure through flow analysis that everything gets freed along any path. With C++ you just declare your object and you're done with it, since deterministic destruction ensures the resource will get cleaned up in any situation.

Consider:

void foo() {
    FILE *f = fopen("myFile.txt", "w");
    // some code
    fclose(f);
}

vs

void foo() {
    std::fstream f("myFile.txt");
    // some code
}

Notice that the C++ code is safe regardless of what the commented code is. The same can't be said of the C code. If there's a "return;", for example, the file won't be closed.

Link to comment
Share on other sites

  • 0

If I want power and performance, i'll use C, it's that simple. Infact, I can use C for anything. I have yet to say to myself, C++ would be a good language to write X in.

C is extremely basic and gets so convoluted. I do OS programming and it's in C of course. Having to roll your own for almost everything and get around limitations in the lack of language features and libraries is such a pain in the ass.

My opinion is that if it wasn't for pointers and malloc, C would be as useful as BASIC.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.