Function Overloading or Pattern Matching of functions in Ecma
bishwenduk029 at gmail.com
Wed Oct 17 05:23:59 UTC 2018
The language is steadily closing the gap to ideal functional paradigm. One
of the things that I have liked the most about languages like
Erlang/Elixir/Haskell is their ability to define functions with same name
and different airty. The decision of invoking the correct function-argument
pattern is dependent on the invocation of the function. Implicit pattern
matching in aforementioned languages helps avoid costly cognitive loads
introduced by explicit if/else based pattern of logic flow branching.
The greatest power of the pattern matching which amazed me was, dropping
the whole of looping construct, altogether. Elixir/Erlang have no LOOPS.
strikes me as a very powerful programming model that not only increases
readability of code but also promotes immutability of the data structures
in use. The loops would continue to exist but more modern codes can be
pattern-matching of functions can fit right in perfectly, thereby taking
Looking forward to your response.
Thanks & Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss