Live data from Hacker News

Java for Everything

teamten.com

161–170 of 344 posts

Re: Java for Everything

#161
post #8

I would just add one more thing - I doubt there is another language where you write native apps for Android, iOS and Web sharing 70% of the code: http://arstechnica.com/information-technology/2014/11/how-go...

You can add Windows and OS X to that list.

(Although the Google Inbox team didn't produce a Windows or OS X native client, there's no doubt that such a client could have run the java code shared between Android, iOS and Web)

Re: Java for Everything

#162
post #89

Verbosity matters for reading and maintenance far more than it does for writing. IDEs can make the writing faster, but they can't make the code as easy to comprehend as it would be in a more expressive language. And remember that lines of code is the only proven risk factor for bugs. Most sites are not Twitter. They're not Stack Overflow. They're not even Nanowrimo. I've watched a company spend two years, dozens of d…

> Verbosity matters for reading and maintenance far more than it does for writing.

I would argue that on average verbosity improves readability. Yes it may take you slightly longer to read the code, but verbosity often results in the code conveying more information or expressing it clearer (or both).

Re: Java for Everything

#163

There's the language and there's the ecosystem. A lot of negative feelings that still linger are, IMHO, directed more at some of the painful historical aspects of the ecosystem: J2EE XML configuration hell, EJBs, bloated application servers, XML for everything, JAX-WS, SOAP, ant, classloader problems, maven dependency hell, 10 different logging libraries, etc... A lot of this stuff truly sucked. But I feel things hav…

Ant has a bad reputation? I clearly didn't get the memo - I find Ant to be a great little tool.

Re: Java for Everything

#164
post #143

What he said, but C#. C#'s one of the most versatile languages which can target most of the popular platforms, e.g: iOS/Android (Xamarin), WindowsPhone, Windows, Linux, OSX, Silverlight, PS4, XBox (announced), Unity3D and NaCL. C#/.NET's biggest weakness of sub-optimal cross-platform support should also be resolved in the near future now that .NET's compiler, core runtime and class libraries are OSS and with Microsof…

C# has replaced scripting languages for me. It might be faster to write a python program to do something simple, but the amount of time saved on such small things is minimal.

As soon as a project gets large, it outgrows the scripting language anyway.

Re: Java for Everything

#165
post #81

A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. I can make the same argument for Python _for me_. And for my company too; we have a ton of Python developers already, so it makes sense to write things in Python if possible in case someone needs to change or improve anything. The author also talks about how Java's verbosity is a tr…

Though the lack of noise could also translate to parsing things in my head trying to understand what is happening in this super short code....hence it takes longer to read the code!

Maybe, but what are the examples? "Foo f = new Foo()" takes longer to read than "f = new Foo()". An anonymous class is longer than a lambda and also less readable, as Java folk have thankfully finally realized. "public static void main" does not clarify anything. Getters and setters are the bane of my Java-reading life, because 99.9% of them are the exact same autogenerated four lines, but you still have to read them all in case one of them is different.

Also, there's a huge jump in readability at the point where a method or class fits on a single screen. So if 4 lines of Java = 1 line of Brand X, but it takes me the same amount of time to read 4 lines of Java or 1 line of Brand X - that's still a win for Brand X, because it's much easier to write classes that fit on a single screen.

Re: Java for Everything

#166
post #81

A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it. I can make the same argument for Python _for me_. And for my company too; we have a ton of Python developers already, so it makes sense to write things in Python if possible in case someone needs to change or improve anything. The author also talks about how Java's verbosity is a tr…

> A significant amount of the article is arguing that Java for everything is better because the author and his coworkers already knows it.

Far more of the article is spent on arguments that are valid for any compiled statically-typed language. So much so that he feels the need to point out why Java [as opposed to C#, C++, D, Go] in the penultimate paragraph.

Re: Java for Everything

#167
post #89

Verbosity matters for reading and maintenance far more than it does for writing. IDEs can make the writing faster, but they can't make the code as easy to comprehend as it would be in a more expressive language. And remember that lines of code is the only proven risk factor for bugs. Most sites are not Twitter. They're not Stack Overflow. They're not even Nanowrimo. I've watched a company spend two years, dozens of d…

> Verbosity matters for reading and maintenance far more than it does for writing. I would argue that on average verbosity improves readability. Yes it may take you slightly longer to read the code, but verbosity often results in the code conveying more information or expressing it clearer (or both).

Just repeating the same thing twice doesn't help with anything. The standard examples of Java verbosity - repeating variable types, getters and setters, anonymous classes instead of lambdas, using the visitor pattern to emulate pattern matching - don't make anything more readable or clearer (indeed many people find the Java version more confusing to read).

What features does Java have that you're saying help code convey more information or lead it to be expressed more clearly? I find that my more concise Scala code usually both is clearer (there's just less irrelevant clutter e.g. braces) and conveys more information (because e.g. error handling with Either and for/yield makes it clear which parts of a function could have errors, whereas with try/catch all you know is "there's a function somewhere in this block which throws").

Re: Java for Everything

#168
post #163

There's the language and there's the ecosystem. A lot of negative feelings that still linger are, IMHO, directed more at some of the painful historical aspects of the ecosystem: J2EE XML configuration hell, EJBs, bloated application servers, XML for everything, JAX-WS, SOAP, ant, classloader problems, maven dependency hell, 10 different logging libraries, etc... A lot of this stuff truly sucked. But I feel things hav…

Ant has a bad reputation? I clearly didn't get the memo - I find Ant to be a great little tool.

I've used Ant, Maven, and Gradle, and Ant is the only one that's never given me a minute's trouble. But it's true that it has a bad reputation. It feels harder to use when everything is working right.

Re: Java for Everything

#169
post #28
post #11

Earlier quoted context omitted.

There's no shortage of good libraries for Python. He just chose to not learn about them.

And all the fast ones aren't implemented in Python....

So what? For most problems there are fast, well-designed libraries available with idiomatic python interfaces; why would you care about the implementation details?

Re: Java for Everything

#170
post #133
post #74

I completely buy the idea "write everything in one language", even if I do it with a different language for completely different reasons. In general I think "use the best tool/language for the job" and anyway any tool/language will have pros and cons, nothing is perfect. My context is I was a big ECMAScript fan, then I moved to use something called ActionScript 3.0 and there I just found the "right balance" between v…

interesting,I need to check it out,you should add a link to the project. I definetly like AS3,it's a good compromise between javascript and java.

here you go http://www.redtamarin.com/

and the g+ community https://plus.google.com/communities/111596731002136630496

and yeah it's kind of why I'm doing that, AS3 is for me a good balance

as a side note, the way redtamarin is implemented you have access to almost all POSIX C functions from AS3 which can also be seen as a "Friendly Dialect of C"

Post reply on HN