DMD 1.032 and 2.016 releases
Nick Sabalausky
a at a.a
Thu Jul 10 11:58:19 PDT 2008
"Koroskin Denis" <2korden at gmail.com> wrote in message
news:op.ud24ipehenyajd at proton.creatstudio.intranet...
> On Thu, 10 Jul 2008 02:56:29 +0400, Walter Bright
> <newshound1 at digitalmars.com> wrote:
>
>> Sean Kelly wrote:
>>> Clearly this function isn't valid for all types if T can't be a static
>>> array type.
>>
>> Right.
>>
>> Andrei has also pointed out that this lack of consistency is a problem
>> and should be fixed, but at the moment, that's the way it is.
>
> The same goes for Tuple. Honestly, I don't see a reason why tuples can't
> be returned.
> And since Tuple!(char,char,char,char) is no different from char[4],
> I think that static arrays should also be allowed as a return type.
The problem with returning static arrays is that they live on the stack.
Function goes out of scope, bye bye array. Or are you suggesting that the
static array be automatically .dup()ed?
More information about the Digitalmars-d-announce
mailing list