What is the programming language of the future?

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

znaps

Senior member
Jan 15, 2004
414
0
0
This claim is totally wrong.

Servers have limited RAM and CPU resources; writing an app in Java wastes both, particularly RAM. The numbers I've seen (in practice) are typically 10x more RAM required for a Java daemon compared to the equivalent program written in C.

Server-side apps are also limited in terms of the developer time available to work on them.

A verbose, underpowered language like Java won't get you the programmer productivity you'd get from a real functional language like a lisp or an ML, or their hairier descendents Perl, Ruby, etc..
LMAO. Yep everyone writes large scalable, server programs for their website in Perl, Ruby, LISP and ML with their great clustering and failover support.
 

znaps

Senior member
Jan 15, 2004
414
0
0
Is Azureus slow?

Quite. It took nearly 8s to start on my machine (dual 1.2Ghz) and even longer to open the options dialog once it finally started up. Hell even quitting the thing takes longer than I think it should.
I agree startup time is slow for Java apps. If and when it can get more integrated into the OS people will stop complaining about this. MS does this with all their software. I see no problem with the options dialog..the UI is as responsive on my PC as any other app. And it should be since it is a native UI. Any slowness is due to coding decisions, not the language.
Does it look non-native, say compared to Winamp? Yes this is a trick question.

I can't run Winamp on Linux here, but even getting the GTK version of Azureus doesn't make it look like my other Gnome apps because it uses GTK1 which is quite old, everything else I run uses GTK2. And while the main UI of WinAmp may not look like 'normal' Windows apps, it at least uses the same common dialogs so that open, save, etc are standard.
So apart from the file dialog everything is as good as Winamp, or at least has the potential to be. Native file dialogs will be here very soon with the native desktop integration library.
I'd accept your criticism if you were talking about Swing, but Azureus doesn't even use Swing.

No and there's also 8 different downloads on their site for it, I thought Java was write once run anywhere? Not write once per UI toolkit and per OS, hell I could write a more portable app using C and GTK2 on all platforms.

The first one in the list is 'Platform Independent'.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Red and black
Originally posted by: kamper
Java is as capable on the server as any language.

This claim is totally wrong.

Servers have limited RAM and CPU resources; writing an app in Java wastes both, particularly RAM. The numbers I've seen (in practice) are typically 10x more RAM required for a Java daemon compared to the equivalent program written in C.
Java doesn't waste ram, it uses exactly what it needs. You can easily tune the jvm to use less if you like. 10x might be realistic for HelloWorld just due to the overhead of the jvm but for any non-trivial app that's just a stupid number to try quoting. Yes, there will always be a little more ram usage but that's the nature of a virtual machine language. Ram is cheap anyways.
Server-side apps are also limited in terms of the developer time available to work on them. A verbose, underpowered language like Java won't get you the programmer productivity you'd get from a real functional language like a lisp or an ML, or their hairier descendents Perl, Ruby, etc..

Server-side Java is less obviously a bad idea than client-side Java, because it's easier to upgrade the server hardware than it is to upgrade all your clients. :)

But server-side Java is still a bad idea.

Well, it's good for Sun and IBM I guess, since they're selling all that new hardware.

Some people claim that Java is a reasonable tool for having hordes of semi-literate mediocre programmers write buggy business software. That its lack of power and expressiveness is comforting to the unskilled, and makes it harder for them to shoot themselves in the foot. As such, it could be considered as an improvement over VB, I suppose.
Oh n0ez!! It's the old "Java is stupid because it's not a geek-language" argument :roll:

Stop whining about how you require syntactic beauty just to be productive. The majority of the world's software developers are not geeks and would rather get something done right in a powerful language than feeling all warm and fuzzy about writing half the number of lines of code. The power of a language is not measured by the compactness of it's source code but by the capabilities of the executable. Aside from hardware integration and guis, java is as good in this respect as anything and certainly better than any mainstream scripting language. I think languages like python or perl are great but they are not in the same league as java when it comes to really big software.

As for the comment about mediocre programmers, just like the majority of the world's developers are not geeks, you could also classify most of them as mediocre and mediocre programmers need a language too. I'd rather have them write buggy code in java then in c because java is a hell of a lot more forgiving and secure. But of course that's not to say that only non-geeks and mediocre programmers use java.
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Originally posted by: znaps
I agree startup time is slow for Java apps. If and when it can get more integrated into the OS people will stop complaining about this.

It doesn't have to be integrated to anything. The important part is that the VM could be pre-loaded into memory as a daemon, which would keep it modular and userspace.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: NothinmanNo and there's also 8 different downloads on their site for it, I thought Java was write once run anywhere? Not write once per UI toolkit and per OS, hell I could write a more portable app using C and GTK2 on all platforms.
Those 8 downloads are probably only different in their os-integration glue code. Azureus for windows is started by an exe and minimizes nicely to the notification area. Obviously neither of those features can be in the linux installer. I bet you there is a very small amount of platform specific java code in Azureus.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Brian23
so, the bottom line is you all don't like Java.
If all of us didn't like java we wouldn't be having an argument now would we ;)
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: bersl2
Originally posted by: znaps
I agree startup time is slow for Java apps. If and when it can get more integrated into the OS people will stop complaining about this.
It doesn't have to be integrated to anything. The important part is that the VM could be pre-loaded into memory as a daemon, which would keep it modular and userspace.
There are plans for that sort of thing in future java specs, called MVM. The problem is that you start completely reimplementing everything os writers have been doing for years: process management, security, address space... It's nice in theory but at some point you have to take a step back and realize that you have all these things implemented already and you're just creating a duplicate layer.

What seems more interesting than having one super java.exe running on top of the operating system is having an operating system itself host java processes natively in the same way that they currently host executables with their own custom formats with machine code.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: znaps
Any slowness is due to coding decisions, not the language.
That may be true, but if guis written in other languages continue to outperform java guis consistently then it is a problem with the platform. It should be re-architected to make it easier for developers to write fast apps. If swing had a better threading model then the gui could continue to function while your app goes off and talks to the database. That kind of framework may not be easy to create but doing it properly once is better than pushing the responsibility off on the "mediocre" programmers of the world.
 

znaps

Senior member
Jan 15, 2004
414
0
0
I was talking about SWT - it simply doesn't have a slow GUI. Now when we're talking about Swing, I agree.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Is swt multi-threaded? At any rate, I think eclipse is proof that you can create a slow gui in swt too ;)
 

znaps

Senior member
Jan 15, 2004
414
0
0
Well you can create a slow GUI in any language/API :)

SWT is not multi-threaded in that you need to be aware of which thread your code is running in, and update the UI in the correct manner, similar to what you need to keep in mind for Swing.

Eclipse is fast for me - I don't get many slowdowns, but it does use a lot of memory. That's due to the incremental compiler and dependency checking I think.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
If you're not running a large project you can easily cut down on eclipse's memory usage by using the vmargs command line switch. Unless I am doing something big I usually give it a strict limit in the area of 64M and there are no (more) problems. I'm sure you could push it lower.

And eclipse is usually fine, but it's those long pauses that happen every now and then that get me. It's the worst when it's been sitting idle for a long time but it seems to happen unpredictably at other times. Have you been using 3.1.x?
 

znaps

Senior member
Jan 15, 2004
414
0
0
My limit is 512M :) I'm running with a huge number of source files across several projects, and also running an instance of Weblogic and Apache locally. I'm using version 3.0.1. When it sits idle, it gets paged so that's what causes the pausing there. If you set the -xms setting you might be able to stop it from doing that.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Ah well, if you're working with a large project then any ide will use a tonne of memory. All you can do is bask in the lovely features :)

How's integration with Weblogic? Or do you run the two more or less seperately?
 

znaps

Senior member
Jan 15, 2004
414
0
0
Separately, I run Ant tasks from within Eclipse to build and deploy to my Weblogic dir, but that's about it. I've used WSAD before and am not too keen on too much AppServer integration beyond starting/stopping/console integration.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
LMAO. Yep everyone writes large scalable, server programs for their website in Perl, Ruby, LISP and ML with their great clustering and failover support.

Slashdot is all mod_perl and they seem to handle loads that most commercial sites can't take.

I agree startup time is slow for Java apps. If and when it can get more integrated into the OS people will stop complaining about this

If it gets more integrated it won't be cross-platform any more.

So apart from the file dialog everything is as good as Winamp, or at least has the potential to be. Native file dialogs will be here very soon with the native desktop integration library.

No, because WinAMP isn't ass slow.

The first one in the list is 'Platform Independent'.

And yet they still spent the time making 7 other ports? If you're going to waste time writing platform-specific code, you might as well switch back to C or C++ and get an app that runs decently too.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
LMAO. Yep everyone writes large scalable, server programs for their website in Perl, Ruby, LISP and ML with their great clustering and failover support.

Slashdot is all mod_perl and they seem to handle loads that most commercial sites can't take.
Hooray for Slashdot. You can't cite one example and claim that perl is just as good as java for such situations. I'm sure many people have done good websites in perl and many have done bad ones in java.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Hooray for Slashdot. You can't cite one example and claim that perl is just as good as java for such situations. I'm sure many people have done good websites in perl and many have done bad ones in java.

It's just the obvious one that popped into my head, especially since most sites still don't properly handle the "slashdot effect".
 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: Nothinman
LMAO. Yep everyone writes large scalable, server programs for their website in Perl, Ruby, LISP and ML with their great clustering and failover support.

Slashdot is all mod_perl and they seem to handle loads that most commercial sites can't take.

Perl is a good choice for a MySql driven message board site. I would use that or PHP personally.

I agree startup time is slow for Java apps. If and when it can get more integrated into the OS people will stop complaining about this

If it gets more integrated it won't be cross-platform any more.

huh? You're confusing something here. For every platform Java runs on, there is a speciifc JVM to install. If a JVM was started when the OS boots up then your Java apps would start faster.

So apart from the file dialog everything is as good as Winamp, or at least has the potential to be. Native file dialogs will be here very soon with the native desktop integration library.

No, because WinAMP isn't ass slow.
Neither would an MP3 player written using SWT in Java. It would take longer to start up though, and use more memory.

The first one in the list is 'Platform Independent'.

And yet they still spent the time making 7 other ports? If you're going to waste time writing platform-specific code, you might as well switch back to C or C++ and get an app that runs decently too.

See Kamper's answer to that point.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
huh? You're confusing something here. For every platform Java runs on, there is a speciifc JVM to install. If a JVM was started when the OS boots up then your Java apps would start faster.

By more integrated I thought you meant closer interaction with the host OSes libraries. And if the JVM is a daemon now it's got to have it's own process management, memory management, etc which is a huge duplication of things that already exist in every modern OS.
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: Nothinman
huh? You're confusing something here. For every platform Java runs on, there is a speciifc JVM to install. If a JVM was started when the OS boots up then your Java apps would start faster.

By more integrated I thought you meant closer interaction with the host OSes libraries. And if the JVM is a daemon now it's got to have it's own process management, memory management, etc which is a huge duplication of things that already exist in every modern OS.
As per my previous post, I agree with you on the daemon thing. But it's going to happen anyways. If the java community has a fault, it's insisting on reinventing everything in a vacuum (the N-I-H syndrome).
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: znaps
Separately, I run Ant tasks from within Eclipse to build and deploy to my Weblogic dir, but that's about it. I've used WSAD before and am not too keen on too much AppServer integration beyond starting/stopping/console integration.
I'm working with Visual Age right now. Aside from the fact that it's so hard to code in compared to eclipse, I do like it for it's integration with websphere. I like how I can keep the server running and do hot code swaps instead of shutting down the server, running a build, starting back up and trying to set up my test again. I think I've even corrected errors right from the debugger view and stepped right on over the new code just like how you'd expect (not sure if I remember it correctly, I'll have to try it again).
 

Red and black

Member
Apr 14, 2005
152
0
0
Originally posted by: kamper
Oh n0ez!! It's the old "Java is stupid because it's not a geek-language" argument :roll:
Do you actually know any "geek-languages"?

Originally posted by: kamper
Stop whining about how you require syntactic beauty just to be productive.

I can, and have, written difficult programs in Java, and made them work. I have also written programs in ocaml. It was way way easier to write programs in ocaml. Here are a couple simple examples:

1. Use ocaml variant types and pattern matching instead of java inheritance
2. Use ocaml function values instead of java callback objects
3. Use ocaml "option" types instead of suffering from java NullPointerExceptions

Originally posted by: kamper
Aside from hardware integration and guis, java is as good in this respect as anything and certainly better than any mainstream scripting language.

This is an exceedingly broad statement. What languages are you including when you say "as good as anything"?

Originally posted by: kamper
As for the comment about mediocre programmers, just like the majority of the world's developers are not geeks, you could also classify most of them as mediocre and mediocre programmers need a language too. I'd rather have them write buggy code in java then in c because java is a hell of a lot more forgiving and secure.

Yes, having mediocre programmers write in C is a disaster. No argument there.

Originally posted by: kamper
But of course that's not to say that only non-geeks and mediocre programmers use java.

Actually, I'd say that sounds like a pretty accurate statement.

 

znaps

Senior member
Jan 15, 2004
414
0
0
Originally posted by: kamper
Originally posted by: znaps
Separately, I run Ant tasks from within Eclipse to build and deploy to my Weblogic dir, but that's about it. I've used WSAD before and am not too keen on too much AppServer integration beyond starting/stopping/console integration.
I'm working with Visual Age right now. Aside from the fact that it's so hard to code in compared to eclipse, I do like it for it's integration with websphere. I like how I can keep the server running and do hot code swaps instead of shutting down the server, running a build, starting back up and trying to set up my test again. I think I've even corrected errors right from the debugger view and stepped right on over the new code just like how you'd expect (not sure if I remember it correctly, I'll have to try it again).


Wow, I didn't think anyone was using Visual Age anymore. I used to use it, and it was great, but doesn't it only support JDK <= 1.2 ? The VAJ debugger was great has yet to be improved on. Actually, I remember you posted about the ENVY code repository system it uses - do you still hate it?
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: znaps
Originally posted by: kamper
Originally posted by: znaps
Separately, I run Ant tasks from within Eclipse to build and deploy to my Weblogic dir, but that's about it. I've used WSAD before and am not too keen on too much AppServer integration beyond starting/stopping/console integration.
I'm working with Visual Age right now. Aside from the fact that it's so hard to code in compared to eclipse, I do like it for it's integration with websphere. I like how I can keep the server running and do hot code swaps instead of shutting down the server, running a build, starting back up and trying to set up my test again. I think I've even corrected errors right from the debugger view and stepped right on over the new code just like how you'd expect (not sure if I remember it correctly, I'll have to try it again).
Wow, I didn't think anyone was using Visual Age anymore. I used to use it, and it was great, but doesn't it only support JDK <= 1.2 ? The VAJ debugger was great has yet to be improved on. Actually, I remember you posted about the ENVY code repository system it uses - do you still hate it?
I have some respect for the repository idea, especially the seamless branching capabilities. I completely loathe the way that it is used as it makes coding quickly a nightmare. Java is accused of being too verbose and slow to code it and vaj just makes it worse instead of easier, like an ide should. I could write an essay on how it pisses me off but no sane development teams could possibly be using it anymore so I doubt anybody cares to hear :p