Disappointing inflexibility of argument passing in D

deadalnix deadalnix at gmail.com
Tue Feb 11 16:01:41 PST 2014


On Tuesday, 11 February 2014 at 16:38:41 UTC, Andrei Alexandrescu
wrote:
> Hmmm... very interesting. I was thinking of the same these days 
> because we have qualifier(T[]) automatically change to 
> qualifier(T)[] upon passing to a function. However, there is no 
> way for the user to specify such type change for a user-defined 
> type.
>

This is the #1 problem right now.

> Adding some sort of opPass would help solve the current problem 
> we have with passing const ranges into functions. (Currently 
> they won't work unless they're built-in slices).
>

Is is not simply for functions. It is for any user defined type
that embed a parametric types.

This is why can't have a nice container library.


More information about the Digitalmars-d mailing list