UFCS in C++

Don via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 14 03:38:49 PDT 2014


On Tuesday, 14 October 2014 at 06:29:01 UTC, Jacob Carlborg wrote:
> On 14/10/14 03:55, Steven Schveighoffer wrote:
>
>> The concept is in D1 for arrays since as long as I've ever 
>> used D.
>
> As far as I recall, it was an accidental feature of arrays and 
> perhaps associative arrays. Might be a bit hard to track down 
> that.

It wasn't accidental. It was one of the classic D easter eggs. It 
was commented in the source, but wasn't documented anywhere or 
mentioned when it was released.
It wasn't documented for at least a year after it was implemented.


BTW the greatest easter egg of them all was the template syntax, 
class Bar(T) {..}
Previously you had to write template(T) { class Bar {} }, someone 
discovered it and then Walter confessed to having done it. Those 
were the days...


More information about the Digitalmars-d mailing list