Re: auto type for defaulted arguments? [Repost]

2013-06-29 Thread bearophile
In the meantime I have opened an enhancement request: http://d.puremagic.com/issues/show_bug.cgi?id=10491 Henning Pohl has written a patch: https://github.com/D-Programming-Language/dmd/pull/2270 And Kenji has written some comments in Bugzilla, explaining why he doesn't like this ER. I usuall

Re: auto type for defaulted arguments? [Repost]

2013-06-27 Thread Maxim Fomin
On Thursday, 27 June 2013 at 20:24:46 UTC, Nick Sabalausky wrote: but auto can be used in paramenters too. It can? Cool! Actually I meant "dmd does not support the feature now, but I see no reason for not supporting it".

Re: auto type for defaulted arguments? [Repost]

2013-06-27 Thread Nick Sabalausky
On Thu, 27 Jun 2013 19:58:58 +0200 "Maxim Fomin" wrote: > On Thursday, 27 June 2013 at 17:42:14 UTC, bearophile wrote: > > (This is an extended repost of a message that I have put in > > D.learn.) > > > > Sometimes I have code like this: > > > > struct VeryLongNamedStruct {} > > void foo(in Very

Re: auto type for defaulted arguments? [Repost]

2013-06-27 Thread Maxim Fomin
On Thursday, 27 June 2013 at 17:42:14 UTC, bearophile wrote: (This is an extended repost of a message that I have put in D.learn.) Sometimes I have code like this: struct VeryLongNamedStruct {} void foo(in VeryLongNamedStruct x = VeryLongNamedStruct(1)) {} void main() {} Or even: void bar(in

auto type for defaulted arguments? [Repost]

2013-06-27 Thread bearophile
(This is an extended repost of a message that I have put in D.learn.) Sometimes I have code like this: struct VeryLongNamedStruct {} void foo(in VeryLongNamedStruct x = VeryLongNamedStruct(1)) {} void main() {} Or even: void bar(in TupleFoo x = TupleFoo(TupleBar(2), TupleSpam(3))) {} In thos