5 ms·
Erlang & Elixir have a very interesting approach to typing. The support for pattern matching in function definitions provides a kind of structural typing for fu
by dgllghr 9y ago
Erlang & Elixir have a very interesting approach to typing. The support for pattern matching in function definitions provides a kind of structural typing for functions. And they both embrace typespecs for type analysis through a separate program analyzer. So a lot of the benefits of static typing are there without the static types.
- keymone 9y agoclojure has destructuring, which isn't quite pattern matching but it does help to detect wrongly shaped inputs. also dialyzer is amazing and i wonder if clojure.spec can be used like that.
- DigitalJack 9y agoclojure has pattern matching too. As a library. Much of the interesting functionality of clojure comes from libraries. (core.async, core.spec, core.match, etc..) The matching library is good. I wouldn't use it in a tight performance loop, but as a productivity booster it's very nice.