On Sunday 30 January 2011 04:02:14 Trass3r wrote:
> > Reading this newsgroup revealed that D uses some kind of thing called
> > 'lowerings' for optimizing high level features.
>
> Haven't heard of that.
Examples would be how
date += duration;
becomes
date.opOpAssign!"+="(duration);
or how
{
//... code1
scope(exit) { /* code2 */}
//... code2
}
becomes something along the lines
{
//... code1
try
{
//... code3
}
finally
{
/* code2 */
}
}
Some of the newer features are "lowered" into more code using more basic
features. This makes them much easier to implement. Andrei discusses it a bit
in
TDPL. I'm not sure that it really helps optimize anything though. It just makes
it easier to implement new features by defining them in terms of older, more
basic, already implemented features.
- Jonathan M Davis