3 ms·
I’d say the static typing analogue to the workflow I described is perhaps the canonical OO gymnastics and leads to much worse messes, thoughtless regurgitation
by mlthoughts2018 8y ago
I’d say the static typing analogue to the workflow I described is perhaps the canonical OO gymnastics and leads to much worse messes, thoughtless regurgitation of “design patterns” and wasted hours getting some tower of abstraction in place for something that you can just do in dynamic languages and make it perfectly safe and move on.
“The dynamic mess” is mostly a myth we tell ourselves because many dominant languages are predicated on there needing to be actual material benefit to type safety. In reality, bad use of abstraction will cause a mess no matter which paradigm you use, but dynamic languages at least give you the option to eschew the bullshit and just solve the problem, while many mainstream statically typed languages, even functional languages, just give you pattern recipes that gaurantee you’ll get lost in a sea of value-destructive abstraction and end up using a bazooka for every nail.
- clhodapp 8y agoThat hasn't been my experience at all. Indeed, I have gone found static typing to give me superpowers by letting me quickly see what kinds of data and transformations I have access to, constraining out possibilities that I'd otherwise need to test for, and codegenning away boilerplate.
- mlthoughts2018 8y agoA good example of why your experience doesn’t generalize is to compare the severe limitations of breeze linear algebra for Scala with numpy in Python. Breeze’s type safety creates this utterly needless hierarchy of abstraction that severely handicaps you from doing advanced elementwise operations, particularly with automatic broadcasting. With ndarrays in numpy, you can pretty do whatever crazy beoadcasted operations you want with no restriction on manually promoting things to “the right” shape or type. Breeze gives you “safety” at the cost of not being able to do anything with it, and requiring huge pains to refactor generic code to add functionality. I find this is exactly have it plays out with most large statically typed systems, even with fancy type class patterns in FP.