27 ms·
Couldn't you just use Scala as a better Java in that case? Or do you just generally like wasting lots of vertical space on braces & monstrously verbose and spar
by danieldk 12y ago
Couldn't you just use Scala as a better Java in that case? Or do you just generally like wasting lots of vertical space on braces & monstrously verbose and sparsely distributed code chock full of boilerplate?
You must not have used a modern IDE. IDEs such as IntelliJ can fold a lot of boilerplate [1]. Besides that, modern Java IDEs offer so much functionality for refactoring, code generation, etc., that it's often hard to be more productive in other languages (I have used C++, Python and Haskell for years, but I am more productive in Java after using it for work the last 1.5 years).
Scala simply doesn't have the same level of support in IDEs as Java does.
[1] http://confluence.jetbrains.com/display/IntelliJIDEA/Folding http://confluence.jetbrains.com/display/IntelliJIDEA/Folding
- frowaway001 12y agoWhen you are looking for bugs, you still have to read all the code. Whether it was auto-generated or folded by the IDE doesn't give any benefit here.
- nostrademons 12y agoYou don't, really. Bugfixing by whole-program code inspection is incredibly inefficient and quickly because impractical with large codebases. I've found its far better to hunt down bugs using a combination of debuggers, stacktraces, divide-and-conquer, log statements, assertions, and unit tests. I've gotten bugfix rates as high as 5 bugs/day in a fairly complex library (an HTML5 parser in C) using these techniques.
- frowaway001 12y agoLet's just say that I'm happily using a language where I don't really have to search for bugs in the first place ...
- yohanatan 12y agoI think you're missing the fact that you can use all of those same techniques in languages without all the noise. You can also use a plain old editor with such languages (which can be handy if debugging/writing code on a headless server). And, some languages make writing most of that sort of bug nigh impossible to begin with.
- yohanatan 12y agoNo, I've used plenty of modern IDEs. In fact I use IntelliJ for writing Scala and most of the features you list are implemented for it too. But, as others pointed out, even if your IDE can generate ungodly amounts of code for you, you will eventually have to read and maintain that monstrosity (i.e., it's not truly 'hidden').