www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - alias this

reply "Carl Sturtivant" <sturtivant gmail.com> writes:
Subtyping with 'alias this' is superb and easy; it's a tremendous 
simplifying mechanism, one of D's many ingenious and well 
integrated technical simplifying mechanisms that were a big part 
of getting me on board, spreading the word and moving to D. What 
is the design logic behind

364.d(9): Error: alias this compileme364.number.__anonymous there 
can be only one alias this

--- not a complaint, I'd just like to hear opinion of the basis 
of the above restriction from experts.
Aug 30 2012
next sibling parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Thu, 30 Aug 2012 07:48:54 -0400, Carl Sturtivant <sturtivant gmail.com>
wrote:

 Subtyping with 'alias this' is superb and easy; it's a tremendous  
 simplifying mechanism, one of D's many ingenious and well integrated  
 technical simplifying mechanisms that were a big part of getting me on  
 board, spreading the word and moving to D. What is the design logic  
 behind

 364.d(9): Error: alias this compileme364.number.__anonymous there can be  
 only one alias this

 --- not a complaint, I'd just like to hear opinion of the basis of the  
 above restriction from experts.

This is a limitation in implementation. According to TDPL, there will be multiple alias this allowed in the final implementation. See this bug: http://d.puremagic.com/issues/show_bug.cgi?id=6083 -Steve
Aug 30 2012
parent Don Clugston <dac nospam.com> writes:
On 01/09/12 15:16, Carl Sturtivant wrote:
 What is the design logic behind

 364.d(9): Error: alias this compileme364.number.__anonymous there can
 be only one alias this

 --- not a complaint, I'd just like to hear opinion of the basis of
 the above restriction from experts.

This is a limitation in implementation. According to TDPL, there will be multiple alias this allowed in the final implementation. See this bug: http://d.puremagic.com/issues/show_bug.cgi?id=6083

Perhaps you can point me at a way to get a short list of features like this that we might say are "strategically limited" at the moment (perhaps even to the extent of being absent even), but definitely intended for complete implementation eventually.

http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel#Roadmap
Sep 03 2012
prev sibling next sibling parent "Carl Sturtivant" <sturtivant gmail.com> writes:
On Thursday, 30 August 2012 at 12:58:28 UTC, Steven Schveighoffer 
wrote:
 On Thu, 30 Aug 2012 07:48:54 -0400, Carl Sturtivant 
 <sturtivant gmail.com>
 wrote:

 Subtyping with 'alias this' is superb and easy; it's a 
 tremendous simplifying mechanism, one of D's many ingenious 
 and well integrated technical simplifying mechanisms that were 
 a big part of getting me on board, spreading the word and 
 moving to D. What is the design logic behind

 364.d(9): Error: alias this compileme364.number.__anonymous 
 there can be only one alias this

 --- not a complaint, I'd just like to hear opinion of the 
 basis of the above restriction from experts.

This is a limitation in implementation. According to TDPL, there will be multiple alias this allowed in the final implementation. See this bug: http://d.puremagic.com/issues/show_bug.cgi?id=6083 -Steve

Ah, thanks. Glad to hear the eventual outcome is broad.
Aug 30 2012
prev sibling parent "Carl Sturtivant" <sturtivant gmail.com> writes:
 What is the design logic behind

 364.d(9): Error: alias this compileme364.number.__anonymous 
 there can be only one alias this

 --- not a complaint, I'd just like to hear opinion of the 
 basis of the above restriction from experts.

This is a limitation in implementation. According to TDPL, there will be multiple alias this allowed in the final implementation. See this bug: http://d.puremagic.com/issues/show_bug.cgi?id=6083

Perhaps you can point me at a way to get a short list of features like this that we might say are "strategically limited" at the moment (perhaps even to the extent of being absent even), but definitely intended for complete implementation eventually.
Sep 01 2012