Tango Conference 2008 - MiniD talk by by Jarrett Billingsley.

Jarrett Billingsley jarrett.billingsley at gmail.com
Thu Oct 9 05:49:33 PDT 2008


On Thu, Oct 9, 2008 at 6:48 AM, ore-sama <spam at here.lot> wrote:
> bearophile Wrote:
>
>> This:
>> global x, y, z = freep() // they are 1, 2, 3
>
> this also seems dangerous to me.
> Some language has syntax
> (x, y, z) = freep()
>

How is it dangerous?  It has precisely one meaning.  It's a perfectly
well-defined area of the language and does not incur any performance
penalty.

And if you really, really want to put multiple values into an object,
use an array.

local xyz = [freep()]
somefunc(freep.expand()) // somefunc called with 3 arguments


More information about the Digitalmars-d-announce mailing list