Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kshep9232708yWhen compared to Groovy:
def foo = [bar: 1, baz: "something"]
Java:
Map<String, Object> foo = new HashMap<>();
foo.put("bar", 1);
foo.put("baz", "something");
Imagine doing that for a more complex dictionary. They implemented lambda expressions but won't implement a shortcut API for Maps. -
willol13898y@kshep92 what you're showing is a problem in a script... Not in an enterprise software, and that's what Java is good at.
I far prefer working with the Java verbosity on a real project than Python's (for example) magic -
kshep9232708y@willol script or enterprise app (the latter of which I do write a lot of) I don't want to aggravate my carpal tunnel to communicate a simple idea to the compiler. I find by now there should be an easier way of defining dictionaries in Java.
Related Rants
I HATE dealing with Map objects in Java. Much like everything else in Java, the API is far too verbose. What's more annoying is how Oracle seems unbothered to improve it.
undefined
wk30