February 26, 2013
On Tuesday, 26 February 2013 at 18:46:09 UTC, Maxim Fomin wrote:
> On Tuesday, 26 February 2013 at 18:22:03 UTC, Kenji Hara wrote:
>> It is definitely a bug. I cannot believe that such horrible bug is still there.
>> If you have a time, could you please file it in bugzilla?
>
> I can't believe you are not aware of that. By the way, I posted similar case to bugzilla and received WONTFIX, but I don't remember the #.

Thank you all for the replies!

Well, it turns out there does not seem to be a universally accepted view on the topic.

I've created an issue in Bugzilla nevertheless: http://d.puremagic.com/issues/show_bug.cgi?id=9597
February 26, 2013
On 26/02/2013 18:41, bearophile wrote:
> Kenji Hara:
>
>> auto return is a little different with others. To infer return type,
>> the method body is aggressively analyzed in compilation.
>
> So that usage of "auto" sounds like something to avoid if you want D
> compiler to compile quickly a lot of code.

I suspect it doesn't matter actually. The semantic analysis of the function body is going to have to happen anyway. It all depends on whether the compiler does an extra pass which it throws away the work of - which seems fairly unlikely to me (having written a couple of Java type resolvers I could have done without having to write xD).
February 26, 2013
Ben Davis:

> I suspect it doesn't matter actually.

As usual benchmarks are our friends :-)

Bye,
bearophile
1 2
Next ›   Last »