Re:Rust creator Graydon Hoare is now at Apple working on Swift
by ZephyrP on Tuesday January 31, 2017 @03:23PM
(#13534836)
In some languages, a function can be defined multiple times with different signatures (multiple 'heads'). It will try each clause until it finds one that matches, allowing you to filter or change course on the basis of the value or characteristics of the arguments.
This allows you to easily create special logic for corner cases and is generally extremely useful.
This allows you to easily create special logic for corner cases and is generally extremely useful.