News for hackers. Stuff that matters.
Re:The myth of using Scala as a better Java by agentgt on Thursday March 02, 2017 @10:26AM (#13774668)
> The problem seems to be that Java devs like to create things more complex than they need to be.

This is the biggest myth! Like seriously how does using a particular language make you want/enjoy making things more complex?

Why is Java (ecosystem and language) complex? Because Java has a massive very old ecosystem with organizations that have extremely complicated requirements.

Someone else argued Java is complex because it isn't expressive. This is a myth as well as clearly Go language proved you don't need powerful types or annotations to be simply.

Let me give you an example. The Java JSON parser Jackson. It is beloved and yet It is seriously freaking complicated!

Why is it complicated? Well lots and lots of organizations have different requirements.

Most of the libraries in Java that are mature are extremely complicated! They are this way because of requirements and evolution.

Scala is complex but it hides it (and I guess some would say elegantly). I prefer being explicit and so do many Java programmers consequently the complexity is sadly exposed.

There is another language rapidly evolving on the complexity front: Javascript.

The ramp up time alone with modern Javascript is now close to being worse than Java (the transpiling, tools, etc).

Re:The myth of using Scala as a better Java by ThrustVectoring on Thursday March 02, 2017 @03:08PM (#13777727)
>Like seriously how does using a particular language make you want/enjoy making things more complex?

It's not the language, it's the community that uses the language. It's working with people who tolerate working in that language and with that sort of people. The Java community drives out developers with an aesthetic revulsion for things like a ShoelaceTyingStrategyFactory, and you're left with the dregs.

In short, the causation is backwards - folks who want to or enjoy making things more complex end up using Java more often.

Re:The myth of using Scala as a better Java by agentgt on Thursday March 02, 2017 @04:05PM (#13778209)
> In short, the causation is backwards - folks who want to or enjoy making things more complex end up using Java more often.

That is complete utter nonsense. Developers most likely use Java because

1. they have to which is the case for Android or using existing libraries/code base or

2. because they already know it which is typically caused originally by number 1.

3. The language is still one of the popular language so for many it is a safe bet.

As for ShoelaceTyingStrategyFactory... I have seen that crap in Typescript, I have seen it in C#, I have seen it in Objective C... Its caused by complex annoying needless requirements.

See what happens with Java can happen with any language where you are don't have a proper development process of removing needless requirements. You end up with complexity. And yeah sure some people enjoy solving complex things and making it scale but the neither the language nor the community caused that.

Now if you are talking about the spec writers like the JSR authors... yes those guys actually had it in there interest to make it complex because their company would be the only company that could make a reference implementation (for example Day software with JSR 283). But this is not the Java developer community as a whole.

Re:The myth of using Scala as a better Java by ThrustVectoring on Thursday March 02, 2017 @07:11PM (#13779627)
I'm making the exact opposite point. People use Java for whatever reasons, it's not really a contributing factor. People avoid Java because of ShoelaceTyingStrategyFactory reasons. How likely is the average Java developer to make a ShoelaceTyingStrategyFactory when you convince the vast majority of people who avoid that sort of thing to use a different language?
Re:The myth of using Scala as a better Java by dpc_pw on Thursday March 02, 2017 @03:32PM (#13777914)
> Why is it complicated? Well lots and lots of organizations have different requirements.

A sane culture would produce couple of simple libraries solving different requirements. Insane would throw solutions to all the requirements and a kitchen sink into one big ball of mud mega-library.

It's not that hard to write a JSON parser.

Re:The myth of using Scala as a better Java by agentgt on Thursday March 02, 2017 @05:55PM (#13779102)
> A sane culture would produce couple of simple libraries solving different requirements. Insane would throw solutions to all the requirements and a kitchen sink into one big ball of mud mega-library.

Even Spring doesn't do this. Most Java libraries and frameworks are highly modularized via Maven.

Most complain they are too modularized and want an uber jar.

> It's not that hard to write a JSON parser.

Actually it really is [1]. You know a valid one that handles edge cases... something a lot of Java libraries do really well... handling edge cases requires complexity.

[1]: http://seriot.ch/parsing_json.php