On Wed, 14 Jan 2009 18:31:53 +1300, dsimcha <dsim...@yahoo.com> wrote:

Just curious, why doesn't D, and why don't more statically typed languages in general, support overload by return type? I haven't exactly thought through all the pros and cons, but at first glance it seems like an incredibly useful
thing.  What's the catch that I'm missing?


Templates kind of give you that sort of power. If you weren't taking the return value then it wouldn't work without some extra rules. I think opCast should be changed to allow unlimited availables casts.

Reply via email to