Whence came UFCS?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Fri Jul 27 19:39:30 UTC 2018


On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote:
> Therefore, after reading the word "Extension" in three 
> different contexts, I started wondering and various questions 
> came to mind, starting with---Whence came UFCS?

The answer I always say back in the day for the functionality was 
that it was a bug for arrays. The term UFCS though is much newer 
and just comes from discussion for applying the array bug to all 
types. Who started it, why it caught on  I don't know.

The use of the term Extension I believe is because of the 
implementation/syntax approach used to describe this behavior in 
C#. In C# you don't have free functions, so instead you need a 
new class with static methods. This makes the new class act as an 
"extension" of another object. D having free functions and the 
functionality working on more than objects means "Extension" 
wouldn't be a good term to describe it.


More information about the Digitalmars-d mailing list