Re: Whence came UFCS?

2018-07-27 Thread Meta via Digitalmars-d
On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote: During our Boston D Meetup today, we went through and deconstructed Walter's wonderfully elegant blog post from 2012 called "Component Programming in D"

Re: Whence came UFCS?

2018-07-27 Thread Jesse Phillips via Digitalmars-d
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

Re: Whence came UFCS?

2018-07-27 Thread Sameer Pradhan via Digitalmars-d
Wow! I am glad to see so many responses! Thanks for your indulgence. So, to summarize, the concept (no pun intended) has been around for a while in D---originally in the context of arrays. It just might have been a bug, or an unintended side-effect. I intend to read the archival posts and

Re: Whence came UFCS?

2018-07-27 Thread H. S. Teoh via Digitalmars-d
On Fri, Jul 27, 2018 at 03:41:29AM +, Sameer Pradhan via Digitalmars-d wrote: [...] > Whence came UFCS? [...] As far as I know, UFCS came about from a particular interpretation of TDPL (Andrei's book). Andrei was talking about the range API, and inserted a little note about how native

Re: Whence came UFCS?

2018-07-27 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 27, 2018 8:09:02 AM MDT Simen Kjærås via Digitalmars-d wrote: > On Friday, 27 July 2018 at 13:38:26 UTC, Steven Schveighoffer > > wrote: > > On 7/27/18 7:24 AM, Simen Kjærås wrote: > >> Arrays' .reverse, .sort and others were added in 0.24, but I > >> can't find a download for

Re: Whence came UFCS?

2018-07-27 Thread Steven Schveighoffer via Digitalmars-d
On 7/27/18 10:09 AM, Simen Kjærås wrote: On Friday, 27 July 2018 at 13:38:26 UTC, Steven Schveighoffer wrote: On 7/27/18 7:24 AM, Simen Kjærås wrote: Arrays' .reverse, .sort and others were added in 0.24, but I can't find a download for anything before 0.50. Reverse and sort were properties

Re: Whence came UFCS?

2018-07-27 Thread Mike Parker via Digitalmars-d
On Friday, 27 July 2018 at 14:31:24 UTC, Mike Parker wrote: This is the earliest thread I could find in the archives, based solely on searching for "array" in the title. I almost fell down the rabbit hole reading some of those old threads, as the ones I did look at tickled my memory.

Re: Whence came UFCS?

2018-07-27 Thread Mike Parker via Digitalmars-d
On Friday, 27 July 2018 at 14:12:53 UTC, Mike Parker wrote: On Friday, 27 July 2018 at 14:09:02 UTC, Simen Kjærås wrote: From what I recall, UFCS for arrays were essentially a bug - an unintended side effect of how the properties were implemented. But it's been 15 years, so I can't really

Re: Whence came UFCS?

2018-07-27 Thread Mike Parker via Digitalmars-d
On Friday, 27 July 2018 at 14:09:02 UTC, Simen Kjærås wrote: From what I recall, UFCS for arrays were essentially a bug - an unintended side effect of how the properties were implemented. But it's been 15 years, so I can't really trust my memory. :p You're not alone! That's how I

Re: Whence came UFCS?

2018-07-27 Thread Mike Parker via Digitalmars-d
On Friday, 27 July 2018 at 13:38:26 UTC, Steven Schveighoffer wrote: Reverse and sort were properties (compiler built-ins), not extensions. If it existed in 2002, it's safe to say it was there pretty much from the beginning. -Steve I came to D in 2003. I recall this coming up in the

Re: Whence came UFCS?

2018-07-27 Thread Simen Kjærås via Digitalmars-d
On Friday, 27 July 2018 at 13:38:26 UTC, Steven Schveighoffer wrote: On 7/27/18 7:24 AM, Simen Kjærås wrote: Arrays' .reverse, .sort and others were added in 0.24, but I can't find a download for anything before 0.50. Reverse and sort were properties (compiler built-ins), not extensions. If

Re: Whence came UFCS?

2018-07-27 Thread Joakim via Digitalmars-d
On Friday, 27 July 2018 at 05:22:17 UTC, Joakim wrote: On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote: During our Boston D Meetup today, we went through and deconstructed Walter's wonderfully elegant blog post from 2012 called "Component Programming in D" [...] Extension

Re: Whence came UFCS?

2018-07-27 Thread Steven Schveighoffer via Digitalmars-d
On 7/27/18 7:24 AM, Simen Kjærås wrote: On Friday, 27 July 2018 at 10:30:07 UTC, Jonathan M Davis wrote: It evolved out of D's member function call syntax for arrays - basically, for years before we had UFCS in D, we had UFCS for arrays. However, when and how that was added to arrays, I don't

Re: Whence came UFCS?

2018-07-27 Thread Simen Kjærås via Digitalmars-d
On Friday, 27 July 2018 at 10:30:07 UTC, Jonathan M Davis wrote: It evolved out of D's member function call syntax for arrays - basically, for years before we had UFCS in D, we had UFCS for arrays. However, when and how that was added to arrays, I don't know. I don't recall it ever not being

Re: Whence came UFCS?

2018-07-27 Thread Jonathan M Davis via Digitalmars-d
On Friday, July 27, 2018 03:41:29 Sameer Pradhan via Digitalmars-d wrote: > In the end I thought I might as well dump my thoughts on the D > forum and hear straight from the horse's (or horses') > mouth(s)---so to speak. It evolved out of D's member function call syntax for arrays - basically,

Re: Whence came UFCS?

2018-07-26 Thread Joakim via Digitalmars-d
On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote: During our Boston D Meetup today, we went through and deconstructed Walter's wonderfully elegant blog post from 2012 called "Component Programming in D" [...] Extension methods were added to C# 3.0 in 2007, UFCS was discussed

Re: Whence came UFCS?

2018-07-26 Thread Arun Chandrasekaran via Digitalmars-d
On Friday, 27 July 2018 at 03:41:29 UTC, Sameer Pradhan wrote: During our Boston D Meetup today, we went through and deconstructed Walter's wonderfully elegant blog post from 2012 called "Component Programming in D" [...] I remember reading somewhere that it's inspired from Nim. I might be