3 ms·
> For a dynamically typed language, a REPL ends up being essential. In a lot of ways, REPLs can be a superior form of programming. Those are often much harder t
by leshow 7y ago
> For a dynamically typed language, a REPL ends up being essential. In a lot of ways, REPLs can be a superior form of programming. Those are often much harder to get to work with static type languages (often too much ceremony around the types).
Haskell has probably one of the best and most useful REPLs around.
> But further, whether or not your type is a Foo with a name field or a Bar with a name field or an Named interface simply does not matter, you just want something with a name field.
This is perhaps an argument for a structural type system, IMO. Though I completely disagree with it.
> Well, now you need to talk about generics. But what if you want to catch instances where things are strictly "addable?" now you are looking at constrained generics. But what if you want a specialized implementation? Now you are potentially talking about doing method overloading
Those same invariants are still in your dynamic code, it's just now they are invisible to everyone and will crash at runtime if broken.
> It is no wonder dynamic typing has it's appeal. Dynamic languages are generally low on ceremony and cognitive burden.
There is a low cognitive burden on the writer, but for every refactor afterwards, and anyone who wants to change your code later, the cognitive burden is higher.
Dynamic typing does have an appeal, but it seems to be shrinking these days while people wake up to the benefits of static types. And it's no wonder, they just make sense from a pragmatic perspective.
Thanks for your post. I mean, I disagree with almost everything you said, but it's interesting to hear the perspective.