5 ms·
I've had professional jobs writing both Python and Haskell. My Python code has to be far more verbose and complex than my Haskell, and the Python's harder to m
by tome 9y ago
I've had professional jobs writing both Python and Haskell. My Python code has to be far more verbose and complex than my Haskell, and the Python's harder to maintain too!
> Type bugs just aren't that painful.
You haven't learned the true power of a decent type system then.
- bayesian_horse 9y agoFew seem to have learned the "true" power of a "decent type system". Which seems to be only Haskell... And yes, Haskell is terse. Other popular statically typed languages (Go, Kotlin, TypeScript, Dart) are not.
- tome 9y ago> "decent type system". Which seems to be only Haskell... Haskell, OCaml, Elm, Purescript, arguably Scala although I don't like it personalyl.
- dllthomas 9y agoWhile certainly Haskell lets you do more, you can get some interesting help from even the C type system. For instance, I was able to enforce "this can only be called from the main thread" with no runtime overhead.
- gnaritas 9y ago> You haven't learned the true power of a decent type system then. Conversely you haven't learned the true power of dynamic types or like coding with handcuffs to keep you safe. What static types offer me is not as useful to me as what they forbid me from doing, so no it isn't an issue what what I don't know, but rather of what I do. And Haskell, no thanks, I'm not a masochist. > and the Python's harder to maintain too! That's an issue with Python, not with dynamic types. My Smalltalk code is a joy to maintain.
- tome 9y agoAnd what exactly do static types forbid you from doing? (For the sake of argument let's consider state of the art static type systems such as those found in Haskell, OCaml, Elm and Purescript)
- gnaritas 9y agoState of the art is hardly relevant, what's relevant are languages in demand by employees that dynamic language are actually in competition with so no I don't accept that restriction for the sake of the argument as it's moving the goalpost. However plenty of meta-programming techniques including the use of dynamically interpreting message sends to methods that don't exist in the context of the receiver, i.e. Smalltalk's doesNotUnderstand or Ruby's method missing are but one example. Look, I get it, you like static typing, how about accepting that we all don't; we value different things from a language, and extreme late binding in all things is something we value more than being protected from ourselves with a type system. Don't assert to others what they have or haven't learned just because their preferences differ from yours.
- tome 9y agoI think you're responding to an argument I didn't make. You claimed "Type bugs just aren't that painful". Haskell allows you to make all sorts of bugs into type bugs, from SQL well-formedness, through certain concurrency guarantees, to guarantees that your HTTP routing is correct. So yes, type bugs can be very painful, and that's a good thing!