4 ms·
100% agree. I don't buy the verbosity argument one bit. Yes it's more verbose than a dynamically typed language but it's not like you get nothing in return for
by ganonm 9y ago
100% agree. I don't buy the verbosity argument one bit. Yes it's more verbose than a dynamically typed language but it's not like you get nothing in return for that verbosity. When working with serious, mission-critical code, the verbosity (and accompanying clarity) is a godsend.
The only part of writing/maintaining code that I've found easier/more pleasant with dynamically typed languages is writing unit tests (due to the fact that mocking an object is as simple as just declaring a hash literal or JSON object). On the other hand, I find that I need to write extra unit tests to verify integrity that would be be verified at compile time in a strongly typed language like Java.
I would strongly recommend people check out DropWizard. It's an opinionated framework for writing Java servers that comes with a handpicked stack. It has many of the convention driven advantages of e.g. Rails but fundamentally you're still writing code in Java (or another JVM language like Kotlin).
- ryandvm 9y ago> I find that I need to write extra unit tests to verify integrity that would be be verified at compile time in a strongly typed language like Java. This is so true and I'm surprised I don't see it mentioned more often. Sure, mocking stuff is way easier in JavaScript, but you end up writing tons of tests to prevent the kind of regressions a smart IDE would be screaming about in a strongly typed language.
- bradleyjg 9y agoI'd go further and say the techniques that trade-off clarity for making unit tests easier to write (e.g. dependency injection) are often a bad idea. We shouldn't let the tail wag the dog.