Re:Ask HN: How to be fluent in functional language speak?
by waltpad on Wednesday May 06, 2020 @01:36PM
(#23093925)
I suppose that you mean that it should be "checking types dynamically", rather than "checking dynamic types"?
Re:Ask HN: How to be fluent in functional language speak?
by jolux on Tuesday May 05, 2020 @06:33PM
(#23085915)
I don’t think many people programming in dynamic languages would die on that hill. Avoiding types is kind of the allure, I think?
Re:Ask HN: How to be fluent in functional language speak?
by bojo on Tuesday May 05, 2020 @06:55PM
(#23086084)
At the expense of having to write more tests that a type system could have solved at compile time, and likely catch more runtime logic bugs as well.
For the record I am a convert. Types have made my developer life much happier, especially working with unfamiliar code across multiple projects/teams. When you treat your builds as long term proofs your confidence level increases dramatically.
What they believe is that "dynamic types" is a misnomer, and if you think your program is checking dynamic types, it is in fact doing runtime pattern matching over a variant record. There's nothing wrong with pattern matching and variant records; but conflating them with types is just nutty, and using them pervasively as part of the ordinary flow of code is no different than programming in old-style VB.