If you want to use Java (e.g.: you know it already and don't like learning other things), who cares? Why is this an issue where you have to challenge other people's opinions of Java? Use it if you want to.
Ask HN: Why not Java?
31–40 of 112 posts
Re: Ask HN: Why not Java?
#32You can always do the speed-critical parts in C and link that from your Python code. Or, if your analysis is something already done, use a library already written in C (such as NumPy). Another approach could be Jython (or any other JVM language closer to the desired level of abstraction) and Java. I don't have much love for Java the language. It's not much easier to program than with C, isn't faster and is very verbo…
Re: Ask HN: Why not Java?
#33I am curious about what, specifically, you find easier to do in Java syntax than Python syntax. Seriously, there is a fairly direct translation from any Java you might want to write to completely equivalent Python. Sure, Python offers more complex techniques such as list comprehensions and iterators. But you don't need to use them. You can just write Java-like Python.
Re: Ask HN: Why not Java?
#34I am curious about what, specifically, you find easier to do in Java syntax than Python syntax. Seriously, there is a fairly direct translation from any Java you might want to write to completely equivalent Python. Sure, Python offers more complex techniques such as list comprehensions and iterators. But you don't need to use them. You can just write Java-like Python.
Re: Ask HN: Why not Java?
#35You can always do the speed-critical parts in C and link that from your Python code. Or, if your analysis is something already done, use a library already written in C (such as NumPy). Another approach could be Jython (or any other JVM language closer to the desired level of abstraction) and Java. I don't have much love for Java the language. It's not much easier to program than with C, isn't faster and is very verbo…
I noticed a lot of criticism of Java's verbosity in the comments and I'm a bit curious what people are referring to? I work primarily in Java, but also do quite a bit of Javascript and Perl, and I don't notice Java being especially verbose. Maybe internally I'm giving it a break because it isn't a scripting language? I'm honestly curious to see what you guys think.
I also forgot about file i/o, which I don't do much of in web applications.
Re: Ask HN: Why not Java?
#36> Is there any other language that fits this role Go?
Re: Ask HN: Why not Java?
#37I think most people on HN who hate Java are talking about creating websites, and for good reason. Back in the bad ol' days, people would use Java frameworks like Struts for web apps, and it was quite painful.
For my latest project I'm using Play Framework for front-end Java, and it's quite delightful.
Re: Ask HN: Why not Java?
#38It's perfectly fine to use Java for this kind of software. The hate against Java comes from using Java for application development: this is largely due to the kinds of applications that are typically written in Java (line of business software) and (this is the most important reason) accidental complexity and low quality of APIs like Spring or J2EE. Recipe for programming happyness is to use the right tool for the job…
However, I also think it is a biased caricature based on "common sense" that isn't all that well founded.
Most of these languages are entirely usable in areas far outside the prescribed areas you have given for them.
If you are working on a few domains like embedded or OS stuff, low-level graphics or signal processing - or you need to interact with a specific system that is pretty language-specific like Rails or iOS - then your options narrow a lot. A few tasks are just a little forced unless your level of comfort is very high (doing 1-minute shell script jobs in C++, for example).
But it would be very hard to overstate the degree of overlap, in 2012. It no longer usually makes sense to write things in ASM for speed, for example...
In the rare situations where your favorite higher-level language is somehow not good enough for a given project, it is rare that you cannot make a mongrel project which drops to another level just where necessary. If your language does not support this then it is broken in a generally important way.
If you are not really ready or willing to fill in gaps and just want to glue existing things together, that changes things slightly - then your primary consideration is not the language but the available libraries.
The major differences between languages are mostly matters of custom and ideology rather than niche suitability.
Re: Ask HN: Why not Java?
#39This probably is a consequence of the verbosity of Java-the-language, which made heavy tooling support a necessity. And then Eclipse, which provides one of the tightest language integration with Java of any IDE ever.
The sad thing is that this is not really the fault of Java-the-language or Eclipse. It did spawn a whole caste of very mediocre programmers and libraries though, which can make for a very unpleasant culture.
Used correctly, Java can be a great tool, though.
Re: Ask HN: Why not Java?
#40I am curious about what, specifically, you find easier to do in Java syntax than Python syntax. Seriously, there is a fairly direct translation from any Java you might want to write to completely equivalent Python. Sure, Python offers more complex techniques such as list comprehensions and iterators. But you don't need to use them. You can just write Java-like Python.
Interfaces.