The Joel on Software Discussion Group (CLOSED)

A place to discuss Joel on Software. Now closed.

This community works best when people use their real names. Please register for a free account.

Other Groups:
Joel on Software
Business of Software
Design of Software (CLOSED)
.NET Questions (CLOSED)
TechInterview.org
CityDesk
FogBugz
Fog Creek Copilot


The Old Forum


Your hosts:
Albert D. Kallal
Li-Fan Chen
Stephen Jones

Design a Java Killer

So enough talk about design. Let's dive into it.

What are the design criteria of a programming language to make it a Java Killer?

Bad start:
1) Ruby, Python
No static typing; No threading support.

2) C#
Not cross platform

3) D
Maybe?
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
"Not cross platform"

*cough* Mono *cough*
Almost H. Anonymous Send private email
Wednesday, February 01, 2006
 
 
Marketing hype behind it is all it needs. XML anyone?
Steve Hirsch Send private email
Wednesday, February 01, 2006
 
 
Plus simple enough at the outset for your manager to be able to understand. Like XML.
Colm O'Connor Send private email
Wednesday, February 01, 2006
 
 
"Bad start:
1) Ruby, Python
No static typing; No threading support."

They go all the way while dynamic, Java doesn't which creates problems for when people try to use such features, like dynamic class creation and runtime evaluation of code.


"2) C#
Not cross platform"

Neither Java is so much cross-platform. You have issues of versions incompatibilities with Java, thus if you develop using the latest version of Java you may not be able to deploy it in FreeBSD or MacOSX, because they take a while to sync with the versions of Sun. Cross-platform is ANSI C! :-) And Ruby which makes use of lots of ANSI C.


Java is cross-platform? Can Java live without the 90% of support that it gets from Windows? Can Java withstand the pressure of .Net once it's integrated in Windows? Nope.
Lost in a code jungle
Wednesday, February 01, 2006
 
 
Python doesn't support threading?  *confused*
Patrick Sullivan
Wednesday, February 01, 2006
 
 
Before you can design a "Java killer", you need to identify which needs you're hoping to satisfy.

For example, I recently coded for a client a program that can batch parse documents looking for occurances of key phrases, and return the paragraph those phrases appeared in. Think "Find in Files" on steriods.

Don't need hyperthreading support. Can do it without static typing. It would be nice if it was cross platform but not crucial; the client had no plans to move to Linux or OS X any time soon.

Ruby, Python and C# would all have been suitable alternatives.
TheDavid
Wednesday, February 01, 2006
 
 
Ruby has a bigger problem, which is lack of libraries (relative to Java and Perl). But give it 10 years and it'll have a heavily optimized (and blazing FAST) interpreter like Perl plus lots of libs. With better performance I think the need to type would be overcome for most uses.
a Hack
Wednesday, February 01, 2006
 
 
Oh, since you asked for design criteria instead of fanboism, I thought this might be a humble start, but I don't think it gets at the sort of thing you're looking for:

-No need to manage memory

-No need to compile

-Fast, optimized interpreter

-Lots of available outside packages in an established package management format through an established package distribution system, like CPAN (or apt)

-Design and implementation are Free (as in speech)

-Deep but not religous embrace of OOP
a Hack
Wednesday, February 01, 2006
 
 
Ruby has plenty libraries which are easy to use. Python can have dozens of libraries that do the same thing, Perl can have hundreds of CPAN libraries that can be downloaded and used without much time elapsed. The problem is HOW such libraries are used. For instance, you can expect that 90% of the libraries used of Ruby are used on Unix systems, while with Perl and Python that difference can be much lower, because lots of folks use them on Windows.

So, I have the opinion that we are at the point of thinking HOW to use such libraries, which dependencies one want to have, etc. That is, we don't lack support of tools.

That said, one of the shortcomings of these languages is GUI, and I can assure you that GUI is very difficult to get right, so it's a great investment that only commercial companies can afford, and even for them it's difficult for the investment to pay for itself. It's no wonder .Net will have a big impact on GUI programming once it's integrated with the OS: it will be a big donation of Microsoft to the developers.
Lost in a code jungle
Wednesday, February 01, 2006
 
 
Yeah GUI issues is something I'll give you with Python.  I haven't looked into... GTK+ I think it is?  But I know I haven't found documentation I like yet on wxPython which is more then a little annoying.

Especially since the only book I've seen on it isn't even out yet.  Feh!
Patrick Sullivan
Wednesday, February 01, 2006
 
 
So what's wrong with Java again?
Jordan Stewart Send private email
Wednesday, February 01, 2006
 
 
Nothing really.

Other than it's owned by Sun :)

Java could be better if Sun is willing to break backward compability...
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
When I say cross-platform I am not implying 'write once run everywhere' and I am not writing off compiled binaries.
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
Then Rick, what DO you mean by cross-platform?
TheDavid
Wednesday, February 01, 2006
 
 
If you're looking for cross-platform, then what Java offers is a virtual machine, and so does .NET. .NET did something else interesting by creating different languages that all compile to the same runtime language (or VM). So maybe look for an alternative VM. Parrot is one possibility. It's a VM optimized for dynamically typed languages (especially the upcoming Perl 6):

http://www.parrotcode.org/
EKB Send private email
Wednesday, February 01, 2006
 
 
Dream language wishlist:

First-class everything: functions, classes, etc.  Reflection and mutability should be built right into the language.

Static, Dynamic, Strong, and Weak typing.  Variables should be allowed to be optionally declared (for quick prototyping, interpretation) but I should be able to be strict if I so desire.  Type-inference would go a long way.

Compilable to native code as well as have an intepreter.  Maybe JIT would be ok, but I haven't seen much advantage from it so far.

Really great library interopt.  .NET has P/Invoke which is great *but* extremely slow.  The .NET accepted solution for performance is to create your own .NET DLL to wrap whatever native functions you are trying to call -- I'd like that all done automatically.

Give up on cross-platform GUI.  I cannot be done.  Give each platform it's own native GUI library and then, if you must, provide a common high-level library on top of that.  That way if you want some measure of cross platform GUI you can code at the high-level and drop down to the platform-specific libraries to do specific work for each platform.  Java's solution, to dumb-down the native GUI to a canvas, is stupid and slow.

Allow some manual memory management -- nothing as coarse as malloc() but allow the developer to be more in control of object lifetimes.

I'm sure I have more but I have to get back to work...
Almost H. Anonymous Send private email
Wednesday, February 01, 2006
 
 
Perl & Ansi C is cross-platform. So is C++.

Perhaps I should say non-proprietary.
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
Have anyone used Smalltalk GUI Applications?

Are they slow?
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
I think I once used a little of Squeak. I didn't like the environment. Since then, I have heard that one of the commercial versions of Smalltalk has created support for native components ala Windows.Forms, so it just confirms that GUI programming needs commercial support and is hard to get right. I think Avalon+XAML will get it right and I hope I'm right. :-)
Lost in a code jungle
Wednesday, February 01, 2006
 
 
I really think the next great language could have been Dylan. Scheme semantics under the hood, a sane, reasonable syntax that still supported LISP style macros, great support for OO, dynamic by default, but could declare static types for optimization later, native compilers...

and then Apple dropped it for Java. <sigh>

http://www.opendylan.org/
Chris Tavares Send private email
Wednesday, February 01, 2006
 
 
Simple: Ada.

- absolutely platform-independent, with test suits to prove so
- compiles to machine language, to .Net or JVM
- excellent integration with C, Cobol and Fortran
- good integration with Corba
- free compiler based on GCC (GNAT)
- commercial support available for same and other compilers
- very good error messages
- Bush interpreter allows to run Ada-code (aka AdaScript) as a scripting language, with weak typing, type inference, implicit
- Bush can be used as a template language
- Ada is similar to PL-SQL
- excellent readability
- best statically and strongly-typed ever
- its tasking (threading) model was an improvement over all later languages, which in comparison are completely broken
- based on ISO-standard (first OO-language to receive that honour)
- object-based, Ada05 is object-oriented
- generics done right
- exception handling done right
- extremely fine control over memory management
- garbage collection possible
- separate compilation is not a hack
- clean separation of interface and implementation
- language of choice when software quality really matters e.g. in aerospace, embedded system and military systems.

To Almost H. Anonymous: Ada + Bush meet all your requirements.
Karel Thönissen Send private email
Wednesday, February 01, 2006
 
 
I guess for 90% of all projects Python + C/C++ is good enough.

For the rest we have Ada.

But to make a living I have to use either Java/C#.
Rick Tang Send private email
Wednesday, February 01, 2006
 
 
"- language of choice when software quality really matters e.g. in aerospace, embedded system and military systems."

I think the Eiffel guys might disagree with you on that one.
Chris Tavares Send private email
Wednesday, February 01, 2006
 
 
Ada used to be the language of choice in the aerospace & defence industry but it's not anymore.  Ada is no longer mandated for system development and new development is being done in C++.
Moobar
Wednesday, February 01, 2006
 
 
Moobar,

Friends in aerospace report there is demand for Java too. I hope that is for design and general IT software and not for the on-board computers.
dot for this one
Wednesday, February 01, 2006
 
 
"Ada is no longer mandated for system development and new development is being done in C++."

There is currently no language mandated for new system development by the DoD.

A lot of new development is being done in C and C++. The reliability and on-time deployment statistics are beginning to build for those systems. The results are longer development times with decreased reliability compared to Ada.

Most current DoD development projects specify stringent hardware reliability requirements while completely ignoring software reliability. Somebody is bound to eventually figure out that software failures are at least as catastrophic as hardware failures for the broad set of systems the DoD classifies as "weapons systems". Studies will then make it clear that C and C++ can be made reliable, but the cost of such an effort is much much higher than the cost of equivalent reliability using Ada.

Look at the statistics for development using SPARK, which is a subset of Ada that supports proof of correctness through static analysis of code. The defect rates for SPARK projects are 1% the defect rates for comparable C and C++ code. The development time required using SPARK to achieve this level of reliability is 20% of the time needed to produce the less reliable C and C++ code. Most of the time savings is realized in testing. Static analysis of the source code greatly reduces the testing effort at the back end of the development cycle.

Jim Rogers
Jim Rogers Send private email
Wednesday, February 01, 2006
 
 
Static analysis implies that a number of programming techniques can't be used.  You can't have general methods that perform on different kinds of classes, where the types are determined only at runtime and anything that modifies its own running using function pointers would also seem to be out.

In these cases I guess you have to fall back onto code coverage and test cases designed to get into all the corners.
Simon Lucy Send private email
Thursday, February 02, 2006
 
 
In systems where static analysis is desired, run-time determined behaviour (e.g. dynamic dispatching) is very much avoided. Same goes for using function pointers.

There is a price to pay for safety and reliability, and with software it is the lack of run-time flexibility.
-L Send private email
Thursday, February 02, 2006
 
 
Step #1: Lose the hate. If you focus on being a "Java killer" you're motivated by entirely the wrong reasons.

Step #2: If you are unsatisfied with Java (or other languages), then identify the shortcomings and address them while retaining the stuff you do like.

Philo
Philo
Thursday, February 02, 2006
 
 
Or you could try http://www.ubercode.com (which I developed):

"-No need to manage memory"

Memory management is fully automatic.

"-No need to compile"

In Ubercode you still have to click the 'Run' button in the IDE to compile and run the program.

"-Fast, optimized interpreter"

Fast optimized compiled code in Ubercode.

"-Lots of available outside packages"

Well it includes run time libraries for most tasks, and the IDE is written in Ubercode as well.

"-Design and implementation are Free (as in speech)"

You can download a free Trial Pack. But I believe a pre-requisite of good language design is the design is done by one person.

"-Deep but not religous embrace of OOP"

Ubercode classes stored in separate files, with Private and Public elements. Also it supports DBC like Eiffel.
William Rayer Send private email
Thursday, February 02, 2006
 
 
Java is the language it is because it was marketed heavily when people were buying into the hype at a greater rate than they are now.  They spent crazy amounts of cash marketing the language.

Today it holds its place because "it's the corporate standard", at least that's what I'm told when when Java is picked to solve a problem.  So the Java killer would have to win the hearts and minds of the suits, it has nothing to do with technical prowess.

If you just want a technically better language take your pick:  Python, Perl, C, Ruby.

Just don't pick Common Lisp or you'll forever be frustrated that the language you're paid to work with won't let you do the things you want to do.
Lance Send private email
Thursday, February 02, 2006
 
 
Java has done a pretty good job killing itself.  Heh.  The question is who comes next. 

Java as a language seems decent, and it's served me well over the years.  It's the complexity that killed my enjoyment.  Over the years, I learned the basics, then servlets and jsp, then JDBC, then Struts and Hibernate.  Plus Ant, of course.  And then along came Spring. 

What depressed me so much about Spring is that it is a good framework that I realized I needed to learn.  The thing is, it's hard to shake the feeling that this is just another way of doing the same thing I've been doing year after year after year.  Yet another way to do CRUD.  Yet another way to program a round-trip from a client to a server to a database back to the server back to the client as an HTML page, just like we were doing years ago.  The customer, who already has trouble distinguishing between a sparkling new Java/Spring/Hibernate/Struts app and a classic ASP page written in vbscript, certainly doesn't feel any buzz.  To them, it all seems the same as it was before 2000 or even earlier. 

I'm pretty sure this is why ruby on rails generated so much enthusiasm, especially when you consider the possibilities of AJAX.  It promises to get the utterly boring CRUD work out of your life, and let you focus on business logic and better interfaces - and I don't mean prettier screens or frills like flashing lights, I mean functional interfaces that will actually do something new, useful, and exciting, that will make a 2006 web application noticably better than a 2004 web applicaion *to the end user*.  Something that will actually get a buzz from the audience like we used to get when they started to see their apps go on-line almost a decade ago. 

The new environment that can do this will be the Java killer.  No reason this can't still be Java.
Geoff B
Thursday, February 02, 2006
 
 
No, I don't hate Java. And I disagree with others saying Java is all hype.

If it's all hype, IBM, Google, Ebay etc would not use it.

Most Java problems have been fixed by C#. Unluckily C# is from Microsoft.

No, I don't hate MS either :)
Rick Tang Send private email
Thursday, February 02, 2006
 
 
No Python Ruby Perl are technically better. Just different.

Learn Beanshell. Then you can program Java like those scripting/programming language.
Rick Tang Send private email
Thursday, February 02, 2006
 
 
if anyone wants it...i'll give you my j-- libary. its the java lib ported to c++; i got most 80% done. i add onto it what i needed.  supports mysql; and i'm adding ssl now.
Lemon Obrien from portable Send private email
Thursday, February 02, 2006
 
 
+1 Philo. Rick, even though you say you don't hate Java, the goal of designing a "Java Killer" is coming from the wrong angle. But most of the responses have been on the topic "what's my dream language", so I guess it turned out OK anyway.
EKB Send private email
Thursday, February 02, 2006
 
 
Where I am at, C# already killed Java.  I am sure it is live and well somewhere, but I don't hear about it.  I like the .NET framework because you can program in it with such a variety of languages, everything from Python.NET to Nemerle (nemerle.org) ot VB.NET.  Once we get a Lisp interpreter in  there (is there one of these under production?) then we pretty much have everything covered.  (FYI: Nemerle has macros, functions as first class data, and dynamic typing.)

Yes, the downside is that it is proprietary (Microsoft), but from what I have been reading the Mono project is doing quite well.  Also, how proprietary is proprietary when the architecture it demands is on 95% of all desktop computers in the world?
Josh Volz Send private email
Friday, February 03, 2006
 
 
It is not about my dream language.

Design Criteria :)
Rick Tang Send private email
Friday, February 03, 2006
 
 
Actually, +1 Philo and +1 TheDavid

Somehow I can't give up static typing. It doesn't feel like programming, for someone like me who first language is Pascal.
Rick Tang Send private email
Friday, February 03, 2006
 
 
"It is not about my dream language.

Design Criteria :)"

Very well. But I still think Philo was right :) But then so do you, it seems... In any case, it's an interesting thread.
EKB Send private email
Friday, February 03, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz