December 18, 2013
Namespace:

> No, not currently. But it is an interesting idea. Maybe I will implement this.

A use case:
https://d.puremagic.com/issues/show_bug.cgi?id=11757#c3

Visible in this line:
key2[0 .. digestSize] = key.md5Of;


But my suggested syntax is not that good, here $ has already a meaning, that is the whole length of b, So some different idea is needed here :-(

b[0 .. $] = foo();


Otherwise you have to write code like:

b[0 .. ReturnType!foo.length] = foo();
December 19, 2013
On 12/17/2013 07:21 PM, bearophile wrote:

> But my suggested syntax is not that good, here $ has already a meaning,
> that is the whole length of b, So some different idea is needed here :-(
>
> b[0 .. $] = foo();

Sorry, I can't resist... Golden rule of system programming language syntax: When in doubt, reach for static:

    b[0 .. $tatic] = foo();

Done! :p

Ali

1 2 3 4 5 6 7
Next ›   Last »