Earlier quoted context omitted.
Rigth tool for the right job is key here. I personally like to add Groovy to the devops list.
I think groovy is sensless language. You lost all Java benefits like checked exceptions, robust code... what is about debugging? And you is not faster developing with groovy. You developing faster if you ensure quality and not inline filters or other crap. If you like groovy, look at Python.
Ask HN: Why not Java?
41–50 of 112 posts
Re: Ask HN: Why not Java?
#42I 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.
Re: Ask HN: Why not Java?
#43Earlier quoted context omitted.
Well, for starters the whole idea of programming in XML. That and gems such as http://static.springsource.org/spring/docs/2.5.x/api/org/spr... or http://static.springsource.org/spring/docs/2.5.x/api/org/spr... Of course I can't a priori prove that Spring is garbage, much like I can't a priori prove that it's better to be healthy and rich than to be poor and sick. It is a judgement call, but a judgement call that I be…
You can ditch the xml almost entirely in spring 3, which I've been using for 2 years now. All you need is 50-100 boilerplate lines and the rest is annotations. I agree that 2.x was xml hell, but it is worlds better now.
That answers "Why not Java?" perfectly ;)
Re: Ask HN: Why not Java?
#44Earlier quoted context omitted.
Well, for starters the whole idea of programming in XML. That and gems such as http://static.springsource.org/spring/docs/2.5.x/api/org/spr... or http://static.springsource.org/spring/docs/2.5.x/api/org/spr... Of course I can't a priori prove that Spring is garbage, much like I can't a priori prove that it's better to be healthy and rich than to be poor and sick. It is a judgement call, but a judgement call that I be…
You can ditch the xml almost entirely in spring 3, which I've been using for 2 years now. All you need is 50-100 boilerplate lines and the rest is annotations. I agree that 2.x was xml hell, but it is worlds better now.
Re: Ask HN: Why not Java?
#45Re: Ask HN: Why not Java?
#46Re: Ask HN: Why not Java?
#47I've written two crawlers in Java and found it quite well-suited. I 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.
I am a fan of lots of languages, but recently for anything I am supporting for a long period of time I want static typing to catch massive re-factoring issues. Id rather use C# then Java personally, but Play is an amazing Java framework to use.
Re: Ask HN: Why not Java?
#48Earlier quoted context omitted.
Can you give us some evidence why Spring is "unequivocal and absolute garbage"?
Spring was innovative in 2008. Now, Spring is overbloat, buggy (look at request-mapper) and have old, sensless integration to others modules, see spring-data for NoSQL, or try integrate last version of Velocity with last version of Spring. And additionaly, all, what you can do with Spring, you can do with JEE.
Some of Spring modules seem to be quite stable enough. Others, the newer modules, will take time to be more mature.
Spring's goal have always been to be the 'glue layer' of the Java standards. Of course, now they want to be the 'glue layer' of everything, including Spring-Data for NoSQL (Neo4J and co.).
Speaking of which, your last statement is partly correct if only Spring == Spring Core. There's no MVC (in the sense of ASP.NET MVC or Rails MVC) in JEE yet (yet because things might change in the future). JEE has 2-3 technology covering the "VC" options: JSP, Servlet, and JSF. None of these are similar to that of ASP.NET MVC or Rails MVC.
Re: Ask HN: Why not Java?
#49Earlier quoted context omitted.
Spring was innovative in 2008. Now, Spring is overbloat, buggy (look at request-mapper) and have old, sensless integration to others modules, see spring-data for NoSQL, or try integrate last version of Velocity with last version of Spring. And additionaly, all, what you can do with Spring, you can do with JEE.
I think collectively we should point out the specific Spring modules as opposed to say that "Spring is overbloat and buggy". Some of Spring modules seem to be quite stable enough. Others, the newer modules, will take time to be more mature. Spring's goal have always been to be the 'glue layer' of the Java standards. Of course, now they want to be the 'glue layer' of everything, including Spring-Data for NoSQL (Neo4J…
"Of course, now they want to be the 'glue layer' of everything, including Spring-Data for NoSQL (Neo4J and co.)."
Why do you need this? It's just Java and you can... just use it. Without glue.
"Speaking of which, your last statement is partly correct if only Spring == Spring Core. There's no MVC (in the sense of ASP.NET MVC or Rails MVC) in JEE yet (yet because things might change in the future). JEE has 2-3 technology covering the "VC" options: JSP, Servlet, and JSF. None of these are similar to that of ASP.NET MVC or Rails MVC."
What do you mean with MVC exactly? This is just buzz word. MVC Model 2 Architecture (and now you have Servlet 3) is good replacement for Spring MVC. JSR303 and JPA (or other) is good replacement for 'M' (and of cource, in Spring it's same way). We talk about Spring or Rails/ASP? And of course, here solutions in Play/Play2.
Really, you don't need Spring. It's 'Bug layer'.
Re: Ask HN: Why not Java?
#50You 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.
Java:
List firstNames = new ArrayList();
for(Person p : people) {
firstNames.add(p.getFirstName());
}
addCallback(new Runnable() {
public void run() {
doSomething();
}
});
Python: first_names = [p.first_name for p in people]
add_callback(do_something)
Scala: val firstNames = people.map((p) => p.firstName);
addCallback(() => doSomething());
The Python and Scala versions do exactly what they say, while the Java code has a bunch of boilerplate that you have to mentally filter out before you can understand what it's doing. And the Scala code is fully typesafe; the compiler infers types rather than making you continually repeat them.