Hacker Newsnew | comments | show | ask | jobs | submit login

Agreed, it's easy to look back now and consider Java negatively, but 15+ years ago (which is a long time in our field) it caught on for a reason.

I suggest that Java mostly caught on for two reasons (from a purely technical perspective):

1. It had automatic garbage collection.

2. It had a batteries-included approach to its standard library.

In practice, both of these had caused much pain for C and C++ programmers for a long time, and a platform where things Just Worked was very appealing for a lot of those programmers. That in turn led to non-technical advantages that drove the widespread adoption of Java for server-side/enterprise programming.

I don’t see that either of those technical advantages has much to do with the type system, though. In fact, of all the programming languages and type systems I’ve used, Java’s is probably still the worst by almost any interesting measure.

I don’t really accept the original premise that static typing is making a comeback; it never went anywhere. However, if it’s gaining renewed interest in certain parts of the industry, I suspect that has more to do with increasing experience of where dynamic typing can have disadvantages as more projects using it grow larger and are maintained for longer, and perhaps to some extent with aspirational statically typed languages like Haskell showing that some of the perceived disadvantages of static type systems are not inherent problems.




I think even today, but especially many years ago, my experiences using Java code both in the form of web applets, and in the form of standalone applications has been far from "Just works".

It is better these days, but even today Java programs tend to have more distribution issues than other languages.

In the olden days, besides the awful Swing GUI that made it immediately recognizable, gray squares and/or stack dumps when trying to execute Java applications or applets were common.

-----


One of my major ongoing web projects still uses a Java applet, so I’ll be the first to agree with you that it doesn’t always just work. Having said that, if you look at the kind of tools we have for packaging and distribution in say Python or JavaScript, it’s clear that even popular languages today can still have a very long way to go in this respect.

I would love to have a mainstream development stack with the kind of programming tools and expressive power that plenty of modern languages and libraries now offer, but which ultimately produced compiled and statically linked executables the old-fashioned way at least by default, without necessarily relying on package managers or heavyweight virtual machines or run-time linking or writing code just to describe how to install my code. Unfortunately, I doubt that such a language/tool chain exists today, though I’m optimistic that sooner or later someone’s promising niche language will break through.

-----


Don't get me started on the pains of #ifdef everywhere to manage to write portable code...

-----




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: