chemdude
Full Member
2B || !2B
Posts: 228
|
C++0x
Mar 15, 2008 5:41:47 GMT
Post by chemdude on Mar 15, 2008 5:41:47 GMT
en.wikipedia.org/wiki/C%2B%2B0xIt seems pretty cool, and I can't wait for it to become the new standard. Has anybody else heard or read about this before? What do you all think about it?
|
|
|
C++0x
Mar 15, 2008 9:37:05 GMT
Post by Avtar on Mar 15, 2008 9:37:05 GMT
It's been running around for over two years now. Heard about it when I read this :
www.artima.com/cppsource/cpp0x.html
So yeah, it's been a long wait, and there's still a lot more waiting to do something tells me.
|
|
|
C++0x
Mar 15, 2008 19:27:32 GMT
Post by Virtuoso on Mar 15, 2008 19:27:32 GMT
Looks interesting. I'm still angsty towards C++ though.
|
|
|
C++0x
Mar 15, 2008 20:48:40 GMT
Post by Avtar on Mar 15, 2008 20:48:40 GMT
What language do you prefer or are you not angsty towards then?
|
|
|
C++0x
Mar 15, 2008 23:49:33 GMT
Post by Virtuoso on Mar 15, 2008 23:49:33 GMT
What language do you prefer or are you not angsty towards then? Anything but CPP. I've tried many times to develop with it, but It's just never clicked with me. I always get to some cross-road and then just stop altogether. I guess I'm used to a short learning curve with languages like JS, PHP, Perl & Python. Or maybe I'm just not used to such a powerful language. I'm experimenting with Java to see if my luck is any better there.
|
|
|
C++0x
Mar 16, 2008 0:00:54 GMT
Post by Dalton on Mar 16, 2008 0:00:54 GMT
What language do you prefer or are you not angsty towards then? Anything but CPP. I've tried many times to develop with it, but It's just never clicked with me. I always get to some cross-road and then just stop altogether. I guess I'm used to a short learning curve with languages like JS, PHP, Perl & Python. Or maybe I'm just not used to such a powerful language. I'm experimenting with Java to see if my luck is any better there. I personally enjoy Java over C++. Ive been working on AI neural networks with it here lately. I have one running but parts of it are from another project I worked with.
|
|
chemdude
Full Member
2B || !2B
Posts: 228
|
C++0x
Mar 16, 2008 0:05:02 GMT
Post by chemdude on Mar 16, 2008 0:05:02 GMT
Virt (or anybody else who doesn't like C++, I guess): It's fine that you don't like C++, but maybe you'd like it a bit more if you tried Qt (the free open source download can be found here). It is a cross-platform development framework for C++ and Java (with bindings for Python and probably other languages as well) that not only has easy-to-use graphical user interface capabilities and a visual what-you-see-is-what-you-get designer, (this is what it's mostly known for, though), but networking, database, XML, and other classes. It also works well with other libraries such as OpenGL for graphics. It pretty much replaces the entire standard C++ library with a much more featureful yet consistent library. So, if part of the reason you didn't like C++ was because it was hard to make a GUI (which seems to be one of the main reasons for most people) or you didn't like the standard library, maybe Qt could help. Also, there are still numerous other libraries to make C++ less of a pain in the butt, but I think Qt is probably more than good enough.
|
|
|
C++0x
Mar 16, 2008 6:41:28 GMT
Post by Avtar on Mar 16, 2008 6:41:28 GMT
Java > C++ in my opinion as well. It might take a bit more time to compile and load and everything, but in my opinion Java is more powerful and easier to use than C++.
Good job on getting linking Qt in here, it's nifty. ;D
|
|
chemdude
Full Member
2B || !2B
Posts: 228
|
C++0x
Mar 16, 2008 17:25:39 GMT
Post by chemdude on Mar 16, 2008 17:25:39 GMT
Not to get too off-topic, but.... Yeah, Java is better in C++ in some ways, and I've done some Java programming myself before. But what specifically do you mean by Java is more powerful than C++? Language features? What it can accomplish? What it routines and such it comes with (but its kind of unfair to compare C++ against an entire virtual machine that comes with a bunch of classes)? Something else? In terms of language features, meaning syntactical abilities and conveniences (such as classes, generics, etc.) I'd say C++ might have a bit more - and this is partially what makes it seem more complicated (but it can make it more flexible too). For example, Java doesn't allow operator overloading, goto and labels, and pointers (I know it has references, but those aren't as...manipulatable). Now there are a few things that Java has that C++ doesn't, such as the for each loop, but these are being added in C++0x. In terms of what it can accomplish, meaning what the resulting programs can do, I'd say it might be about a tie. C++ is much better for writing operating systems and such. Java, on the other hand, can be used to make applets and things like that (although note that sombody could write a plugin and API to write applet-like things in C++...like Active X - this isn't really a good idea though because of C++'s power and non-portability, just saying that it's possible) and can even to be used to make almost a complete operating system (this still uses a tiny bit of assembly code). In terms of what it comes with...that might be kind of unfair. C++ comes with a standard library that is usually sufficient, but it doesn't come with GUI routines and such. Java wins in this case, I guess, but there are countless libraries out there for C++, and them not being standard shouldn't really make C++ any worse of a language. Java is decent and is usually easier to use, but I'm just saying that C++ has its advantages too, and power is probably one of them (I'm not even going to go into performance and program size - see this for more comparisons - it may not be the most well-written comparison, but it should give you a good idea of the differences and similarities of C++ and Java).
|
|
|
C++0x
Mar 16, 2008 17:30:55 GMT
Post by [dmsuperman] on Mar 16, 2008 17:30:55 GMT
C# > Java > C++
To put why I don't _love_ java, I'll use this bash.org quote:
It's supposed to work cross-platform, and we definitely get the extra baggage of all the other platform's code, but it never actually does as it's supposed to.
|
|
chemdude
Full Member
2B || !2B
Posts: 228
|
C++0x
Mar 16, 2008 18:26:39 GMT
Post by chemdude on Mar 16, 2008 18:26:39 GMT
C# is just as about as bloated as Java with its Common Language Infrastructure (CLI) and all (although I do that admit that even though Visual Studio/C#/.NET can be resource hogs and slow, they are still pretty sexy and featureful)..
If somebody were to write a program though in Java/C# and then rewrite it in C++ (probably a large application), the Java/C# version might be faster though because of all of the work and optimizations people put in the JVM/.NET, because it might be harder to optimize the C++ version, and because they might have not used the most efficient compilation options (this is to say that people who just want to as fast as possible write a large application might have better results with Java/C# - I'm trying to remain not biased towards C++).
Optimized C++ code will practically always beat C# and Java, though - it just may be harder to write.
|
|
|
C++0x
Mar 17, 2008 11:05:12 GMT
Post by Avtar on Mar 17, 2008 11:05:12 GMT
Visual Studio packages have to be resource hoggers, they pretty much utilize everything the Kernel has to offer.
And bfr, optimized C++ code could never beat the functionality, compactness and general awesomeness of C#/Java.
|
|
Dogen
Junior Member
Posts: 98
|
C++0x
Nov 1, 2008 21:18:04 GMT
Post by Dogen on Nov 1, 2008 21:18:04 GMT
The main problem with languages like Java though are that you have no low level access to system resources, which in most cases you don't need though. If you really want to get performance though C/C++ is the way to go. With Java you have more steps in the compilation and running than in C/C++. Granted Java will become faster as it runs longer, due to more and more of the code being compiled to machine code, but C/C++ is always in machine code when you run it.
|
|
|
C++0x
Nov 1, 2008 21:28:56 GMT
Post by Avtar on Nov 1, 2008 21:28:56 GMT
The main problem with languages like Java though are that you have no low level access to system resources, which in most cases you don't need though. If you really want to get performance though C/C++ is the way to go. With Java you have more steps in the compilation and running than in C/C++. Granted Java will become faster as it runs longer, due to more and more of the code being compiled to machine code, but C/C++ is always in machine code when you run it. C++ definitely does give the impression of being "quicker" in most cases, however your point about Java not being as close to Machine Code as C++ is correct on a certain level. Both of them being High level languages people would differ, but then C++ does have certain functionality to make it closer to machine code.
|
|
Dogen
Junior Member
Posts: 98
|
C++0x
Nov 1, 2008 21:37:31 GMT
Post by Dogen on Nov 1, 2008 21:37:31 GMT
Well I know for a fact that using low level functions, like making a raw socket, can not be done in Java. And you don't really have a lot of control over memory management like you do in C++, though some would consider that a blessing. And Java compiles to byte code, which is then interpreted by the JVM. This is what allows for it to be cross platform, and the JVM as it runs will compile some of the Java code down all the way to machine code, instead of having to re-interpret it again to boost performance. C/C++ is, after it is compiled, in machine code, which has fewer steps in the execution cycle due to the fact that it does not need to be interpreted.
|
|
|
C++0x
Nov 1, 2008 21:47:52 GMT
Post by Avtar on Nov 1, 2008 21:47:52 GMT
Well I know for a fact that using low level functions, like making a raw socket, can not be done in Java. And you don't really have a lot of control over memory management like you do in C++, though some would consider that a blessing. And Java compiles to byte code, which is then interpreted by the JVM. This is what allows for it to be cross platform, and the JVM as it runs will compile some of the Java code down all the way to machine code, instead of having to re-interpret it again to boost performance. C/C++ is, after it is compiled, in machine code, which has fewer steps in the execution cycle due to the fact that it does not need to be interpreted. On the contrary, I've found garbage collection in Java to be quite good. A simple gc() function takes care of a lot.
java.sun.com/javase/technologies/hotspot/gc/index.jsp
Some good stuff there on the subject.
|
|
Dogen
Junior Member
Posts: 98
|
C++0x
Nov 1, 2008 21:51:20 GMT
Post by Dogen on Nov 1, 2008 21:51:20 GMT
The garbage collection utility is really handy. That is true. And it sure does save you a major headache.
|
|
|
C++0x
Nov 1, 2008 21:57:13 GMT
Post by Avtar on Nov 1, 2008 21:57:13 GMT
If you get the time, go through this page. Explains everything in a nutshell really.
|
|
Dogen
Junior Member
Posts: 98
|
C++0x
Nov 1, 2008 22:02:20 GMT
Post by Dogen on Nov 1, 2008 22:02:20 GMT
No yeah using the Garbage collector is REALLY nice. One of the reasons to use java. I meant memory management as in, at least as far as I am aware, you cannot pre-allocate any memory space in java, like you can in C/C++.
|
|
|
C++0x
Nov 1, 2008 22:07:12 GMT
Post by Avtar on Nov 1, 2008 22:07:12 GMT
No yeah using the Garbage collector is REALLY nice. One of the reasons to use java. I meant memory management as in, at least as far as I am aware, you cannot pre-allocate any memory space in java, like you can in C/C++. Pre-allocating memory space as in Dynamic Memory management?
www.cplusplus.com/doc/tutorial/dynamic.html
That?
|
|