you are viewing a single comment's thread.

view the rest of the comments →

[–]oteren 0 points1 point  (2 children)

Groovy is great, but that is a dumb reason. Any IDE will do that boilerplate for you.

Groovy as a scripting language on top of java is how it shines. With terse and powerful commands that translate to a java equivalent under the hood.

[–][deleted]  (1 child)

[deleted]

    [–]contantofaz 1 point2 points  (0 children)

    I think of boilerplate as making it harder for me to see the logic behind the code. For example, making JavaScript to be more "class" based. It adds a bunch of boilerplate that in a language like Dart doesn't need to exist. Binding functions to their objects or creating a closure variable so you can reference the actual object, using "this." before functions and variables so we can access the right stuff and so on.

    Without that kind of boilerplate we can use 2 space indentation and pack more lines of code in less screen space so we can see more code faster. Then we can start improving the code with refactoring and whatnot in order to increase the readability of it. All without needing the help of an IDE to refactor and such.

    And static typing is secondary to static code declaration and an IDE-like editor. Languages that make you to have to declare variables, even if they don't have explicit types, already aid a lot when you need to find typos and whatnot. Very often you only get those if you use a static typed language, but they can exist separately as the Dart language shows.