Struct initialization, implicit conversions and delegates

2012-01-16 Thread Nicolas Silva
Hi, I have two syntactic difficulties when initializing structs: 1) Say I have a struct StringHash that represents the hash code of a string. struct StringHash { this( string str ) { computeHash(str); } void computeHash( string str ) { hash = 0;

Re: Struct initialization, implicit conversions and delegates

2012-01-16 Thread Trass3r
StringHash sh = SomeString; // ok That's the only thing that works. An @implicit tag for constructors to allow all implicit conversions would really be helpful. In general we need finer control of implicit conversions. Just have a look at ProxyOf: