October 25, 2012
> And what about _transparent substitution_ of AA literals for a custom hash
> implementation?

That would also be an excellent way to sidestep the current issues with AAs. The AA code would have to be heavily refactored, which could clean up the mess and probably get rid of a lot of bugs. It could also make performance tuning easier. Hopefully, this would make other aspects of the compiler and runtime simpler as well.

I'm not sure how the optimizer would like the new system, though. It's likely that it would have to be beefed up, especially in the area of function inlining between compilation units.

October 25, 2012
On Thu, Oct 25, 2012 at 01:40:19AM +0200, Adam D. Ruppe wrote:
> BTW, bearophile, we've talked about runtime overflow checks before. I'm generally against them, but if we had user defined basic types, we could implement them in the library (already possible, though some important optimization opportunities are missed on it right now which is a potential practical problem).

Didn't Andrei give a working example of that in TDPL?


> But then we could make all ints use the special overflow checked type too by changing a line in druntime.
[...]

Yeah that would be neat.


T

-- 
Some ideas are so stupid that only intellectuals could believe them. -- George Orwell
1 2
Next ›   Last »