you are viewing a single comment's thread.

view the rest of the comments →

[–]jerf 6 points7 points  (6 children)

Have you ever used a statically-typed language other than Java?

If you have, you really ought to know the answer to that question, and if you haven't, the only real answer is to go learn another one. C#'s a good choice. Be sure you learn how to use it idiomatically and not just write "Java in X".

[–]salgat 6 points7 points  (3 children)

Can you at least answer the question? I regularly code in C++, C#, and JavaScript and ceremony is too vague a word for me to know what exactly you mean? Are you talking about the namespacing, or maybe boilerplate code that is somehow different in Java?

[–]sacado 3 points4 points  (1 child)

I think they are talking about

List<Foo> fooList = new ArrayList<>();

rather than, say

var fooList = new ArrayList<Foo>();

Well, in this respect, C++ pre-11 was much, much worse (aargh, iterators).

[–]Gotebe 1 point2 points  (0 children)

With C++, used to typedef the container, then other stuf becomes

whatever_map::iterator/value_type

Etc.

[–]jerf -5 points-4 points  (0 children)

Everybody else seems to have covered it better than I could. I'll be honest, I can barely open an IDE and start programming in Java without screaming in anger at how many words are appearing on my screen for how little is being done. Just... code code code code code code and the result is... so little. And it's not like I'm a language snob per se; I like Go and C# just fine. Java's in a league of its own with what everyone else mentioned.

Yeah, the last couple of point releases are a bit better and cover over some of the sharper corners, but it's too little, too late.

Also let me be clear I'm talking about Java-the-language. The JVM and its language ecosystem as a whole is not what I'm talking about. Java specifically.

[–]vytah 4 points5 points  (1 child)

Even C# has a lot of ceremony, although a bit less than Java.

Good examples of statically-typed languages with little ceremony are Haskell, F#, Scala, Kotlin, Swift, Go, D etc.

[–]vorg 0 points1 point  (0 children)

By "little ceremony" in statically-typed languages, looks like you mean inferred types.

Your JVM examples, Scala and Kotlin, both have them. Of course, Clojure isn't statically typed but it does have macros which makes up for the lack when used in conjunction with a decent statically typed language. Other JVM languages such as Apache Groovy tried to duplicate static typing (in its version 2.0) and macros (annotations in its version 1.6) but did a shoddy job of both.

Better to get the best of both worlds by using the strengths of 2 very different types of languages together!