Things that make writing a clean binding system more difficult

deadalnix via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 29 19:49:21 PDT 2016


On Friday, 29 July 2016 at 04:44:16 UTC, Timon Gehr wrote:
> My parser accepts the following:
>
> int function(int,int)ref functionPointer;
>
> I wasn't really aware that this was illegal in DMD. (Other 
> function attributes, such as pure, are accepted.)
>
> In fact, even the following is disallowed:
> int foo(int)ref{}
>
>
> Should I file an enhancement request?

That doesn't fix the above mentioned problem, as ref bind to the 
variable rather than the type.

postfix ref is not accepted because it can only apply to the type 
I guess. This is one more example of design being unprincipled to 
boot.


More information about the Digitalmars-d mailing list