Type inference and overloaded functions

bearophile bearophileHUGS at lycos.com
Tue Dec 17 19:21:45 PST 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();


More information about the Digitalmars-d-learn mailing list