68 ms·
So basically, it's due to lazy programmers who moan if they have to type or think too hard. Also very very much fashion lead by hipsters who must be using the
by mibbitier 14y ago
So basically, it's due to lazy programmers who moan if they have to type or think too hard.
Also very very much fashion lead by hipsters who must be using the newest coolest untested thing on the planet.
- einhverfr 14y agoI think there is a more fundamental reason. Java, being a compiled language that has traditionally aimed at compile once, run anywhere, offers a significant overhead, but with a development speed of a compiled language. It may or may not be faster to write code in Java vs C++, but it's certainly way faster to write code in Perl, Python, or Ruby. I have always felt that Java was ill-suited to web applications generally, and that the main advantage of using it for web apps was being able to make use of third party libraries written in it. In this regard it's kind of like "why would you write your web app using DCOM on Windows?" Well, maybe because you are recycling VB logic from desktop apps?
- latch 14y agoLaziness, Impatience and Hubris There's no advantage to the need to over-architect. It's purely a bi-product of Java (or static languages in general). Because you can figure out how to properly write a Java program doesn't make you clever, sorry. C/C++ programmers moaned about Java and garbage collectors the same way Java programmers are moaning about dynamic language.
- einhverfr 14y agoStatic languages have some advantages. It's not quite the same thing (Perl being dynamic and all) but I have gone towards Moose in Perl which gives some of the things I see as advantages of static languages (such as the ability to engineer in constraints declaratively, assuming those are enforced by the language. SQL is great this way.) The real reason to use languages like C and C++ is performance. The reason for dynamic languages is rapid prototyping. Java is somewhere in the middle but not really ideal except for where you want to compile your software to run on an imaginary CPU which can be emulated everywhere :-)
- latch 14y agoI'm not saying they don't have their advantages. I want to be clear about that. But for most web apps, the limitations probably outnumber the benefits. Especially since the stateless nature of most web apps allow for easy horizontal scaling, thus negating the performance advantage. As for performance, it really is amazing how fast node.js is. It's like a slow static language rather than a fast dynamic language (by that I mean, the gap between it and Java is smaller than the gab between it and Python). I don't know why that is, but I hope every dynamic language has that potential and that someone manages to unlock it.
- irahul 14y ago> So basically, it's due to lazy programmers who moan if they have to type or think too hard. Typing is a problem. Thinking too hard? Where does the OP imply he is averse to thinking? Being turned off that "fucking XML files are controllers" is being averse to thinking? > Also very very much fashion lead by hipsters who must be using the newest coolest untested thing on the planet. And those untested things would be? Rails is untested? Or Django? Or Flask?
- mibbitier 14y ago> "fucking XML files are controllers" XML has absolutely nothing whatsoever to do with Java the language. Some frameworks might use XML. There might be some built in functions/objects that deal with XML. But that doesn't mean you have to use XML. I certainly haven't in the 12 years I've been using Java.
- irahul 14y ago> XML has absolutely nothing whatsoever to do with Java the language. Weren't we talking about what OP said, and how per you, it's being averse to thinking? > Part of it is a framework issue. Struts is horrible...absolutely, stunningly horrible. Your controller is an XML file (seriously). Freemarker (the main templating language) makes ColdFusion look awesome. Now if some framework has achieved this level of retardation, I would rather not think about it. There are better things to think about. I would be absolutely fine being averse to thinking about it.
- latch 14y agoThe OP asked why Java isn't used for the web. One of the more popular Java web frameworks heavily relies on XML. It has nothing to do with Java, but it has everything to do with what the OP asked about.
- mibbitier 14y agoWrite your own framework. It's actually not rocket science. You can have a pretty good Java web server going in about 200 lines of code. Just write a simple HTTP server in Java, and have it work as you want it to. Without XML...
- derleth 14y agoActually, with Java, I type more than I think. A lot more. Compare this to Haskell, where a single keyword might involve substantial thought, or APL, where one character more or less could represent a pretty fundamental restructuring of part of the program. That Java makes you repeat yourself is not controversial. That being averse to this means you dislike thought is a somewhat bizarre position to hold.
- mibbitier 14y ago> That Java makes you repeat yourself is not controversial. That being averse to this means you dislike thought is a somewhat bizarre position to hold. The English language makes you repeat yourself. I don't see it as a bottleneck. I've never considered <speed of typing> a bottleneck to programming. possibly when programming some assembly routines. But if you're typing too much, you're probably repeating yourself too much, which means you're doing something wrong.
- IsTom 14y agoThings that can be libraries in other languages end up being "design patterns" in Java. It's just not flexible enouth, both Ruby and Haskell are more flexible than it. Both in different ways.
- derleth 14y agoIn Java, I type too much every time I have to deal with the fact int and Integer are two different types. That's a design flaw in Java, not in anything I've ever written using Java. And that's just a trivial example off the top of my head.