What is the programming language of the future?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

b4u

Golden Member
Nov 8, 2002
1,380
2
81
I have a question regarding this C++ vs C# thing ...

I'm interested in start programming games, as a hobby. Now I know C++ is the language of choice when developping games, and the use of graphical APIs like directx ones are a strong way of developping them, with power and ease of use (to some extent :)).

If I want to develop a 3D engine, I'll think C++, if I want to use a free 3D engine available, almost for sure it will run/compile on C++. From that point, developping the other elements of a game is just a matter of mastering the C++ language (well, I'll have to in the first place if I want to use 3rd party free 3D engines available).

Correct me if I'm wrong, but C++ don't see a new release for some time now, and Microsoft is moving forward with C# and .NET platform. Don't get me wrong, it's not that C++ really need some new release, since the community around it was the responsible for it's success and longevity.

But if we move to C#, the way of doing things will change. Or will it? If I make a game with C#, will the .NET Framework have to be installed on the client for it to run the game? Will we start to see "DirectX9.0c required, and .NET Framework 1.1 required" on the boxes? If so, won't that change the portability between platforms? PC vs XBox vs PS2 vs MAC vs ...
 

EagleKeeper

Discussion Club Moderator<br>Elite Member
Staff member
Oct 30, 2000
42,589
5
0
Originally posted by: b4u
I have a question regarding this C++ vs C# thing ...

I'm interested in start programming games, as a hobby. Now I know C++ is the language of choice when developping games, and the use of graphical APIs like directx ones are a strong way of developping them, with power and ease of use (to some extent :)).

If I want to develop a 3D engine, I'll think C++, if I want to use a free 3D engine available, almost for sure it will run/compile on C++. From that point, developping the other elements of a game is just a matter of mastering the C++ language (well, I'll have to in the first place if I want to use 3rd party free 3D engines available).

Correct me if I'm wrong, but C++ don't see a new release for some time now, and Microsoft is moving forward with C# and .NET platform. Don't get me wrong, it's not that C++ really need some new release, since the community around it was the responsible for it's success and longevity.

But if we move to C#, the way of doing things will change. Or will it? If I make a game with C#, will the .NET Framework have to be installed on the client for it to run the game? Will we start to see "DirectX9.0c required, and .NET Framework 1.1 required" on the boxes? If so, won't that change the portability between platforms? PC vs XBox vs PS2 vs MAC vs ...


As Nothingman stated, many will generate a .Net interface for their platforms.
How well it will support everything and how effective if will be will be determined in time. MS had problems with Java & Sun. MS wanted the .Net to counteract Java and to be able to have control/direction of internet applications.

MS may not want to allow strong support for .Net on other platforms - each unit is one less Windows box.
 

Muse

Lifer
Jul 11, 2001
40,875
10,222
136
Originally posted by: BingBongWongFooey
Originally posted by: Brian23
I've spent a lot of time learning C++, and now that I'm getting good at it, everyone wants to change to C# and Java.

Java's been getting hyped since what, the late 90s? It's taken you 5+ years to just start getting good with C++?
C++ is not a piece of cake. It doesn't have built in memory management like Java. I was advised around 5+ years ago to learn Java but by the time I turned my attention to it I started hearing stories (after the .com bust) about how many Java programmers were out of work in the vicinity. I decided that studying Java under the circumstances didn't make much sense.

C# may be the way to go, but I heard from one of the off-beat programming gurus I know that VB.net is actually a lot better, at least for a programmer coming from the FoxPro world such as myself.

 

Muse

Lifer
Jul 11, 2001
40,875
10,222
136
Originally posted by: boran
it took me 2 weeks to switch from Java to VB.net and 3 weeks to learn 90% of cobol, so imho a good programmer should be able to switch programming languages in a snap.

How'd you do it? Recommend a book or course?
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Originally posted by: kamper
Originally posted by: TerryMathews
Originally posted by: Nothinman
or java so they dont even have to recompile

But then you have to put up with java and you're restricted to platforms that Sun supports.

BS. The specification is out there, anyone who wants to can write their own JVM. As a matter of fact, GNU is working on one as we speak.

Sun's JVM isn't open source, but OTOH it doesn't claim to be. We don't blame Microsoft for not giving us the source to Windows, why do we blame Sun for holding the source to Java?
BS. Many are trying "as we speak" and no non-proprietary endeavours are close. It's simply extremely difficult to produce something as big as an implementation of the java standard. I fully support any group that tries to do it but the lack of freedom/portability just may be the price that java will always have to pay for aiming at the corporate/enterprise market.

And nobody blames microsoft for not opensourcing windows because no one wants to duplicate it ;)

Not to mention alot of Java programs require this or that JVM, but don't use that minior version because that'll make it crash.

Maybe Java is great from a programmers perspective, but it sucks from a sysadmins perspective.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
BS. Many are trying "as we speak" and no non-proprietary endeavours are close. It's simply extremely difficult to produce something as big as an implementation of the java standard.

Not BS, trying is irrelevant from my perspective until there is a working product. And as Sunner said, right now there's not even good compatibility between official JREs from Sun, so how is a team working on an unofficial JRE supposed to keep up?
 

TerryMathews

Lifer
Oct 9, 1999
11,464
2
0
Originally posted by: Nothinman
BS. Many are trying "as we speak" and no non-proprietary endeavours are close. It's simply extremely difficult to produce something as big as an implementation of the java standard.

Not BS, trying is irrelevant from my perspective until there is a working product. And as Sunner said, right now there's not even good compatibility between official JREs from Sun, so how is a team working on an unofficial JRE supposed to keep up?

You're going to have to show me an example of a properly coded program that crashes depending on which version of the JVM you're running it on. I've run code from 1.4.0 to 1.5.0 and there's not even a hiccup.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Ooooo..... Programming Language Food Fight - or at least some folks are eying up their rolls and taters :p

Correct me if I'm wrong, but C++ don't see a new release for some time now, and Microsoft is moving forward with C# and .NET platform. Don't get me wrong, it's not that C++ really need some new release, since the community around it was the responsible for it's success and longevity.

It's not quite the same thing to talk about C++ having a new "release" in the way you talk about a new release for Word or Mozilla. What is C++ is governed by a standards body (ANSI and/or ISO) which periodically adds features, clarifies existing stuff, etc.

Various compiler developers may make several releases in support of a given C++ standard. Not all compilers are fully conforming to the standard. That used to be a big issue, but I think it's gotten alot better. Are any compilers fully standard compliant now?

 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You're going to have to show me an example of a properly coded program that crashes depending on which version of the JVM you're running it on. I've run code from 1.4.0 to 1.5.0 and there's not even a hiccup.

I can't because I'm not a java dev, but I know that some of the software produced by other departments of our company won't run on on all versions of the JRE and most of the developers in that department have to (or at least had to, I haven't been involved with them for a while) have 3 or more versions of the Sun JRE installed for various tools and testing.

 

boran

Golden Member
Jun 17, 2001
1,526
0
76
Originally posted by: Muse
Originally posted by: boran
it took me 2 weeks to switch from Java to VB.net and 3 weeks to learn 90% of cobol, so imho a good programmer should be able to switch programming languages in a snap.

How'd you do it? Recommend a book or course?

class ;) we see VB.net in class, but we skipped all the basics and went right into programming, so the course was mainly like: this is how it's done in java, this is how it's done in VB.net.

and offcourse the whole intricaties with web form posting etc (we hadnt seen jsp so we had to learn the concepts of that)

I dont think we have a book so I cant reccomend one. and our slides are in dutch so I doubt you'd be much with it.
 

Muse

Lifer
Jul 11, 2001
40,875
10,222
136
Originally posted by: boran
Originally posted by: Muse
Originally posted by: boran
it took me 2 weeks to switch from Java to VB.net and 3 weeks to learn 90% of cobol, so imho a good programmer should be able to switch programming languages in a snap.

How'd you do it? Recommend a book or course?

class ;) we see VB.net in class, but we skipped all the basics and went right into programming, so the course was mainly like: this is how it's done in java, this is how it's done in VB.net.

and offcourse the whole intricaties with web form posting etc (we hadnt seen jsp so we had to learn the concepts of that)

I dont think we have a book so I cant reccomend one. and our slides are in dutch so I doubt you'd be much with it.
Yes, I've learned a lot from books but never made such fast progress as in programming classes, the intensive every-day ones especially.

 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0


Originally posted by: MuseC++ is not a piece of cake. It doesn't have built in memory management like Java.

Well no kidding, but that doesn't answer my question at all. C++ is a complex bastard of a language, but if it took you 5+ years to just START to get good with it, then uh, that's not a good sign.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
You're going to have to show me an example of a properly coded program that crashes depending on which version of the JVM you're running it on. I've run code from 1.4.0 to 1.5.0 and there's not even a hiccup.

I can't because I'm not a java dev, but I know that some of the software produced by other departments of our company won't run on on all versions of the JRE and most of the developers in that department have to (or at least had to, I haven't been involved with them for a while) have 3 or more versions of the Sun JRE installed for various tools and testing.
Then your programmers are idiots. It's not hard to write decent cross version java (although it's not uncommon to require at least a certain version for certain apis and such, but something written for 1.3 should run no problem on 1.4). Sun works very hard on backwards compatibility.

But there are two issues here, versions and vendors. As we've been arguing, cross-version compatibility isn't that hard but it's the programmer's responsibility. Cross-vendor compatibility is when you take a different vendor's jvm of the same version. Java is very good at cross-vendor compatibility when the implementation passes the TCK (which it has to do to officially be declared "java". I think TCK stands for technology compatibility test or something). I've seen very large java projects involving open source components from many different sources mixed with alot of proprietary code moved from sun's jdk to bea's and ibm's and they ran perfectly with no pre-testing and no modifications.

But it's very hard to pass the TCK and that's why I was calling BS on TerryMathews. I agree with you, an open source jdk that almost passes the tck is useless
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Then your programmers are idiots

I have no doubts that is true, but the fact that other commercial tools like Oracle ship thier software with a JRE on the CD and don't support running the software with another JRE tells me that it's not just us.

As we've been arguing, cross-version compatibility isn't that hard but it's the programmer's responsibility

In most cases it should be the vendor's responsibility, they shouldn't be changing semantics in minor revisions of their JVM.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: BingBongWongFooey
Originally posted by: Armitage Are any compilers fully standard compliant now?

http://boost.sourceforge.net/regression-logs/

This is not a test of C++ conformance per se, but I am pretty sure that a compiler that conformed to the C++ standard 100% would also pass these tests by 100%.

edit: damn, it only shows gcc. it used to show a ton of different compilers. wonder what happened?

My guess is that an EULA got em. Many pieces of commercial software have licenses that prohibit publishing unauthorized reviews, benchmarks, etc., which may include the results of such a regression test.
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: Nothinman
Then your programmers are idiots

I have no doubts that is true, but the fact that other commercial tools like Oracle ship thier software with a JRE on the CD and don't support running the software with another JRE tells me that it's not just us.

As we've been arguing, cross-version compatibility isn't that hard but it's the programmer's responsibility

In most cases it should be the vendor's responsibility, they shouldn't be changing semantics in minor revisions of their JVM.

I've had similar experiences regarding needing a specific vendor or version of a JRE when trying to run various open source java projects. A coworker has had JRE issues going from MS -> Linux as well, though I don't know specifically what they are. In general, it's to much of a PITA, so I avoid java projects when I can. I formed that opinion probably a few years ago - maybe it's changed?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
Then your programmers are idiots

I have no doubts that is true, but the fact that other commercial tools like Oracle ship thier software with a JRE on the CD and don't support running the software with another JRE tells me that it's not just us.

As we've been arguing, cross-version compatibility isn't that hard but it's the programmer's responsibility

In most cases it should be the vendor's responsibility, they shouldn't be changing semantics in minor revisions of their JVM.
They don't change semantics in any revisions of the JVM. There are methods in the jdk that have been marked as deprecated for many years but Sun won't remove them in case someone is still using them. That doesn't mean that there aren't undocumented behaviours that can change from release to release but those are just that: undocumented, it's very bad practice to use such functionality and it's not all that difficult to find out if you are.

As for the Oracle thing, have you tried the software on more recent versions? I suspect "don't support" means just that they won't guarantee it but that it will actually work. If it does in fact require that specific version than that's unfortunate. I hope I will never have to use such products :(
 

Brian23

Banned
Dec 28, 1999
1,655
1
0
Originally posted by: BingBongWongFooey


Originally posted by: MuseC++ is not a piece of cake. It doesn't have built in memory management like Java.

Well no kidding, but that doesn't answer my question at all. C++ is a complex bastard of a language, but if it took you 5+ years to just START to get good with it, then uh, that's not a good sign.

Give him a break, maybe he's not consistantly working on it the whole 5 years.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: Nothinman
Not BS, trying is irrelevant from my perspective until there is a working product. And as Sunner said, right now there's not even good compatibility between official JREs from Sun, so how is a team working on an unofficial JRE supposed to keep up?

There is good compatibility between different JRE versions. Most Java apps should run on any version over 1.4. Some require 1.5 if they were coded against that release, but to say there is bad compatibilty is just wrong.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
As for the Oracle thing, have you tried the software on more recent versions? I suspect "don't support" means just that they won't guarantee it but that it will actually work. If it does in fact require that specific version than that's unfortunate. I hope I will never have to use such product

We have many Oracle boxes, but luckily since I'm on the IS side the only thing I end up seeing from them is the installer. I know it might run even though Oracle says they don't support it, but if they won't support it that means they must have had instances where people have had problems using other JREs. And no, I haven't looked recently because I'm not a DBA nor am I one of our unix admins, I'm on the security team but I do end up working with our unix admins pretty regularly.

And on a side note, since Oracle switched their installer to Java it now requires that all unix Oracle serververs have X installed because the text-mode installer is gone. How's that for one huge step backwards.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Yes, and that's Oracle's fault, not java's. They could have written a graphical installer in any language and they could have written a text installer in java.

For the jre version thing, I'd still bet that either Oracle has deliberately used a non-standard feature, limiting them to a certain jvm or they just aren't willing to put up the testing to make sure that their app works on different jvms, even though it probably will. Version incompatibility is the programmer's fault and fixing it won't be any harder than porting any other application to run in different versions of it's environment.

And I'm curious, since you're in security: how often do you patch java systems for security vulnerabilities compared to systems in other languages?
 

Red and black

Member
Apr 14, 2005
152
0
0
Java and C# are crap. C++ is still useful for those applications where GC is inappropriate for whatever reason.

The good statically typed languages with garbage collection are the ML-derived ones. The two good, free ML compilers are MLton (for Standard ML) and Ocaml (for the Ocaml dialect of ML). They allow you to combine the terseness of Perl with speed and memory footprints comparable to C++.

The only real drawback of Ocaml is that its runtime is single-threaded -- that is, only one thread can be running Ocaml code a time in a given process. This allows the GC system to be much simpler ( and therefore faster and more predictable ), but may cause you to have to code up some IPC to fully exploit SMP machines.

For a comparison of various programming languages, check out:
http://shootout.alioth.debian.org/
 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: Nothinman
Then your programmers are idiots

I have no doubts that is true, but the fact that other commercial tools like Oracle ship thier software with a JRE on the CD and don't support running the software with another JRE tells me that it's not just us.

It might also be due to their team testing and validating that their code works against a specific JRE, and for legal and fincancial reasons, their best bet being to distribute the JRE that they've fully tested against. My last contract was for a bank and we shipped a Jave app with a specific 1.3.1 JRE which we had fully tested against, even though it worked fine (and faster) with 1.4 and 1.5 versions of the JRE.