top | item 37779226

(no title)

danabrams | 2 years ago

The author leaves out what to me is the most compelling argument against static types: it is somewhat at odds with interactive development with a running system, as seen in smalltalk and lisp.

Now, not a lot of developers are really doing this. But it's still a good reason for those who are.

discuss

order

kazinator|2 years ago

The article's author is using Blub static types, in which you're declaring that the variable that captures something from the cache is a Pet handle.

Under a properly modern static typing system, you let that be inferred:

  let var = cache.get("key");
var is of whatever type that the cache object returns. Even clunky old C++ can do this with auto.

That author will most likely die in some statically statically typed corner he painted himself into.