30 points · by fogus · 17y ago · 74 comments
You're having a blast hacking together your dynamic stuff without a care in the world. You love how you can type 3 less characters and get the same work done! Woo! High five! You have your repl setup so you can edit (and break) your website on the fly. Static typing? who needs it. Lets write our own type checking all over the code.
Meanwhile, people who don't care what is fashionable, are making awesome stuff in whatever language they assess does the job best.
For anyone who hates Java, I'd recommend:
* Ignore everyone who writes Java commercially.
*especially* corporates doing their massive TomCat
beans getter/setter XML over engineered crap.
* Do NOT use an IDE. You don't need to. It makes you
output more code, and worse code.
* Figure out your own concise style, and figure out
the absolute strengths of Java (There's many).
I know it's ridiculous that at some point programmers may figure out that languages are largely irrelevant, but I hope it happens one day.Talking of languages "Dying" is also quite ridiculous. Languages are 'alive' as long as people use them. Guess what? If a new JVM is never released, it still solves a massive class of problems.
A good programmer beats a good <language> programmer IMHO.
</rant>
Static typing? who needs it. Lets write our own type checking all over the code.
You have to write your own type checking in Java, since any value can be either of the declared type or null. You know NullPointerException? That, my friend, is a runtime type error. (C# and Haskell both avoid that.)
Anyway, I could go on and on about language features that Java needs. But Scala implements them, so just look there.
One can't "figure out" that which isn't true ;P
As a proponent of language-oriented programming I can only disagree strongly with your statement. Languages are supremely relevant. However it is true that with respect to a specific problem, the expressive difference between almost any two general-purpose languages pales in comparison to the difference between a general-purpose language and a domain-specific language specifically tailored to the task at hand.
In my as-of-yet-unreleased Common Lisp web framework, I have DSLs for:
- HTML ("building", rewriting and outputting) - CSS (building and outputting) - Form validation - Error message specification and customization - Declarative configuration management (loading and dumping, eventually modifying too) - and probably others I'm forgetting at the moment, plus a bunch of others I'm planning to do
I'm sure Java has equivalent stuff, the problem is that their solution has to fit in a rigid mold (object-oriented, java syntax) so there's a lot of cognitive resources wasted in translating back and forth between your mental model of what you want to do and how you must express it in Java.
Personally, I don't think so.
So I guess you completely missed my point.
Static vs Dynamic: I guess both have pros and cons. But even for static types java seems to lose out now.
A good programmer beats a good <language> programmer IMHO.
I heartily disagree with this statement. I seriously doubt a good programmer can step into, say, C++ and work as effectively as they might in Java. They don't know how to manage memory well. They won't understand a lot of the nuances with pointers. They won't use a lot of the more subtle syntaxes a "good" C++ programmer will know. The same is true with Java or Python or (and I know this one from a good bit of experience) Ruby.
Knowing your tools well is essential. Being a generalist is great until you actually have to do something.
If a language solved a problem 5 years ago, it'll solve the same problem today. It won't die unless something else is found that solves the problem in a better way.
He has taken the unfortunate, but popular, definition of a dead programming language: one which has stopped evolving. Of course, such a language is no more dead than sharks.
In my point of view Java is just the tool to create new domain specific languages that solve these new problems.
But, general languages that just make just a bit shorter or less verbose (as everyone who likes to dismiss Java uses quite often), to create a class won't do it for me to change language/platform.
If no, then look elsewhere , may be even at one of the languages running on the JVM. End of.
http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m...
http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m...
on the LL-1 list seem to shed light on why Java has a hardwired "new".
It doesn't sound like a particularly clever design decision, because even very early on Java had static "newInstance" methods which rather seem to defeat the point. But I can see the reasoning behind it now, even if that reasoning wasn't very well thought through.
Mibbit backend is about 20k LOC, and 72 lines of xml to get ant to do something useful.
When was the last time Sun updated the bytecode format? I seem to remember it has been quite a while, like 1.3. I don't know, I haven't been steeped in Java for the last 3 years.
I've had to move heaven and earth for an upgrade from 1.4.1 to 1.4.2 when Java 6 was just around the corner, and I hear that there are still many teams using Java 1.4.
As the article said, Microsoft has proven with C# that you can take a language and evolve it over time for the better. If Java the language wants to be viable and keep up with what programmers want from a language, then it's going to have to release an update with changes like the ones outlined in the article. I think the article hit the nail on the head with some of Java's biggest problems (though not all). These changes would make it so that Java could be used in the way a lot of people want to use it.
Not only does it level some valid criticism, it also proposes (for the most part, omitting 'new' would break too much code) workable solutions.
Java thrives in environments where stability is a prime concern and Sun's commitment to maintaining backwards compatibility would inspire confidence.
The new languages that are being developed to run on the jvm reduces the need for Java to evolve as rapidly as some would like. If it is proven that these new languages solve problems better than java then it's only a matter of time before developers make the switch.
At this point when it's obvious what features are really desired then it Sun/Oracle may decide that adding those features to the Java language are appropriate.
In this way the new jvm languages sort of act like a research lab to test out new ideas to see which work better.
On top of that I can see one immediate benefit in implementing some of these, which is that to my eyes all java persistence layers are kludges, simply because of the way the language is structured.
This could make writing such software a lot easier and more reliable.
Hopefully not. :)
I'm no 'fan' of the platform, but like any other programming language you can write anything in it, it simply has a 'niche' where it is a good tool when properly applied.
As weird as it sounds, in that world java's lack of 'neat constructs' and tendency to solve things using 'boilerplate' is actually an asset, for the same reason that COBOL used to be an asset.
I've inherited a bunch of java code about 10 months ago now, so I've been more or less forced to come to terms with it, and even if I can't get over how tremendously kludgy it feels I would have a hard time getting this kind of performance out of other platforms on the exact same hardware.
Call it grudging admiration, I personally would have never thought that you could do this and more with Java before being forced to get in to it.
There isn't a day though that I don't curse the language designers for making me go the long way around on just about anything that I could do in half the code (or less) in pretty much any other language that I have under my belt with the exception of assembler.
At this point in time, my main gripes with java are verbosity and an absolutely terribly kludgy feel to the interface with other parts of the library, it feels like wearing a straightjacket.
And it is exactly for that reason why enterprise types much really love it, my 'creativity' is limited to the point where anybody else facing the same problem would probably write more or less the same code.
Since joining this project I've basically just been busy condensing code and removing 1000's of lines of boilerplate by replacing it with the appropriate abstractions.
And by doing that I'm doing two things, I'm making the work marginally more interesting, secondly the other guy working on the project is slowly starting to see that cut&paste is not the way to go.
But that's my 'toolmakers' hat that I'm wearing, I'm pretty sure the that people that lead this project would rather have me work on 'features' because that is more productive in their eyes, my kind of 'productivity' will start paying off in the longer term.
Time will tell how it is all goes, for now my conclusion is that it is probably not the language that is 100% at fault, it is likely in large part attributable to the people that use it and promote it. And it will be a long time before I will be one of them, if ever.
If you've ever used UCSD-P with the dreaded P-code then you know roughly what I feel like about this job :)
Java got to be the COBOL of the 21st Century because of the boilerplate & etc, not despite it.
Immoral MegaCorporations like Java because they can segment large jobs and have armies of drones work on the small segments. Immoral MegaCorporations don't innately like productivity, they innately like Control Over Employees.
The most important purpose of higher-level programming languages is to remove accidental complexities.
I can give you dozens of examples where Java fails to do that ... as opposed to other languages, some of them mainstream. Some examples ... nullable references, checked exceptions (which are a class of their own), no compile-time code contracts (the type-system is way too weak), concurrency based on shared state and mutexes, public/protected instance variables (with a god-awful getters/setters convention), no real closures (an anonymous class instantiation only captures final locals), no multi-dispatching (this could take care of half of all possible Java-related gotchas, at least), no pattern-matching operator (switch doesn't count). And the list can go on and on.
I've also worked on "big" code-bases written in Java. Some Java open-source libraries are truly beautiful, but these particular projects were not. On one of them it took one whole month to fix a bug that escaped us because of all the layers and all the boilerplate that was executing. This particular bug only happened like once a month, and debugging multi-threading Java code is a nightmare (I guess it could be worse).
Sorry, but this argument doesn't fly. I work in a Perl shop and not all programmers here are in "the top 10%" (I don't think either of us are). But with enough training and clear code-conventions (many of them coming from our community) ... our code base is quite manageable.
PS: I don't have anything against Java or Java programmers. I actually like it because of the available tools, libraries and because of the JVM, which is state-of-the-art.
Java won. It wanted to become the Enterprise language. Initial concerns over speed have mostly been addressed with JIT compilers. Java = COBOL.
Java is so firmly entrenched in the Fortune 500 enterprises.
Because Java won, stuff like Grails (Groovy + Java) has a much better chance of getting corporate adoption than Ruby on Rails.
Having worked in corporate environments for a long time, people risk their jobs when they push (relatively) new technology (like Spring, over J2EE).