Re:Diminishing returns of static typing
by fulafel on Monday October 02, 2017 @01:06PM
(#15385656)
There have been references to Clojure, Elixir, Smalltalk, Common Lisp in the comments here, what makes you think just Javascript & Python?
[ Parent
| on HN ]
Re:Diminishing returns of static typing
by yellowapple on Monday October 02, 2017 @01:54PM
(#15386132)
It's worth noting that Elixir (by descent from Erlang) can emulate at least a basic static typing system pretty easily through pattern matching. You miss out on some features common in more traditionally-object-oriented languages (namely: subtypes), but tagged tuples and structs do provide a lot of the same safety benefits in runtime (and tools like Dialyzer can - last I check - use such pattern matching as a basis for static verification).
Elixir and Erlang still lack the ability to typecheck any process behaviors because messages can take any type anywhere.
Re:Diminishing returns of static typing
by yellowapple on Monday October 02, 2017 @09:01PM
(#15389240)
You can still pattern match when receiving, though (in fact, 'receive' in both Erlang and Elixir does pattern matching already in the same vein as 'case'); just match messages based on a tagged tuple or a record (Erlang) / struct (Elixir) signature or however else you want to define your "types".