www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - two semantic change proposals

reply davidl <davidl nospam.org> writes:
I believe the following allow the runtime reflection wrapper. Though it  
changes the old semantics, the old one can be implemented on top of the  
new semantics

http://d.puremagic.com/issues/show_bug.cgi?id=2868


-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Apr 21 2009
parent reply "Steven Schveighoffer" <schveiguy yahoo.com> writes:
On Tue, 21 Apr 2009 07:58:32 -0400, davidl <davidl nospam.org> wrote:

 I believe the following allow the runtime reflection wrapper. Though it  
 changes the old semantics, the old one can be implemented on top of the  
 new semantics

 http://d.puremagic.com/issues/show_bug.cgi?id=2868
That's cool. However, you have misunderstood how the opDot function name should be passed via templates. The opDot signature should not take a type as the first argument, but a string. Otherwise, you have no compile-time abilities with the function name: opDot(string methodname, T...)(T args) instead of opDot(U:immutable(char)[], T...)(U methodname, T args) -Steve
Apr 21 2009
parent reply davidl <davidl nospam.org> writes:
在 Tue, 21 Apr 2009 20:21:05 +0800,Steven Schveighoffer  
<schveiguy yahoo.com> 写道:

 On Tue, 21 Apr 2009 07:58:32 -0400, davidl <davidl nospam.org> wrote:

 I believe the following allow the runtime reflection wrapper. Though it  
 changes the old semantics, the old one can be implemented on top of the  
 new semantics

 http://d.puremagic.com/issues/show_bug.cgi?id=2868
That's cool. However, you have misunderstood how the opDot function name should be passed via templates. The opDot signature should not take a type as the first argument, but a string. Otherwise, you have no compile-time abilities with the function name: opDot(string methodname, T...)(T args) instead of opDot(U:immutable(char)[], T...)(U methodname, T args) -Steve
It's said there will be soon "static string" param. I think the prototype might best be refined that time. -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Apr 21 2009
parent Don <nospam nospam.com> writes:
davidl wrote:
 在 Tue, 21 Apr 2009 20:21:05 +0800,Steven Schveighoffer 
 <schveiguy yahoo.com> 写道:
 
 On Tue, 21 Apr 2009 07:58:32 -0400, davidl <davidl nospam.org> wrote:

 I believe the following allow the runtime reflection wrapper. Though 
 it changes the old semantics, the old one can be implemented on top 
 of the new semantics

 http://d.puremagic.com/issues/show_bug.cgi?id=2868
That's cool. However, you have misunderstood how the opDot function name should be passed via templates. The opDot signature should not take a type as the first argument, but a string. Otherwise, you have no compile-time abilities with the function name: opDot(string methodname, T...)(T args) instead of opDot(U:immutable(char)[], T...)(U methodname, T args) -Steve
It's said there will be soon "static string" param.
I first proposed that about 3 years ago. I seriously don't believe it's going to happen any time soon. In fact, IIRC, Walter said that he'd found a problem with it. Maybe in D3.
 I think the prototype might best be refined that time.
We need something that works in D2.
Apr 21 2009