On Wed, 10 Aug 2011 12:46:25 -0400, Jacob Carlborg <d...@me.com> wrote:

On 2011-08-10 17:55, Dmitry Olshansky wrote:

After some experience with alias this I had to conclude that it's rather
blunt tool, and I'd rather stay away of it.
Actually I like Steven's opCast suggestion, so that it works in
conditionals.

alias this has lots of problems, but it doesn't mean it's *design* is blunt, just that the implementation of it is not too good.


Oh, I didn't know that it would work implicitly in conditionals. Then I'm happy with opCast :)


http://www.d-programming-language.org/operatoroverloading.html#Cast

Note that it only works for structs (not sure if that return type is a struct or not...)

-Steve

Reply via email to