logoalt Hacker News

DonaldPShimodatoday at 12:25 PM2 repliesview on HN

There is no consistent definition of the term "weak typing". Do you mean implicit coercion?

> Most people who think they have a problem with dynamic typing actually have a problem with weak typing.

Ironically, I would counter that, in my experience, most people who have a problem with static typing actually have a problem with verbose type systems, like Java's or C++'s — or Rust's. (Rust is at least gaining something for its verbosity.)

Type inference is a neat way to bridge the gap. OCaml, Haskell, and Swift (to name a few) all feature distinct type inferencing that give you the benefits of static types without as much syntactic overhead.


Replies

gwerbintoday at 1:18 PM

Nim type inference was a joy to use although I haven't touched the language in several years due to the language community seeming to collapse a bit.

QuadmasterXLIItoday at 1:01 PM

I deeply deeply want to love OCaml but its inherent lack of dynamic dispatch for int / float / complex is brutal