B.13 Thematic Takeaways
While a goal of the functional style of programming is to bring programming closer to mathematics, ML and its syntax, as well as the responses of the ML interpreter (particularly for tuples and functions), make the connection between functional programming and mathematics salient.
Native support for pattern-directed invocation is one of the most convenient features of user-defined functions in ML because it obviates the need for an if–then–else expression to differentiate between the various inputs to a function.
Use of pattern-directed invocation (i.e., pattern matching) introduces declarative programming into ML.
Pattern-directed invocation is not operator/function overloading.
Operator/function overloading (sometimes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access