October 10, 2012 Re: "Best" way of passing in a big struct to a function? | ||||
---|---|---|---|---|
| ||||
Posted in reply to thedeemon | On 10/10/12 09:12, thedeemon wrote:
> On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis wrote:
>> Making sure that the aa has been properly initialized before passing
>> it to a function (which would mean giving it at least one value) would
>> make the ref completely unnecessary.
>>
>> - Jonathan M Davis
>
> Ah, thanks a lot! This behavior of a fresh AA being null and then
> silently converted to a non-null when being filled confused me.
Yes, it's confusing and annoying.
This is something in the language that we keep talking about fixing, but to date it hasn't happened.
|
October 10, 2012 Re: "Best" way of passing in a big struct to a function? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Don Clugston | On Wed, Oct 10, 2012 at 10:40:24AM +0200, Don Clugston wrote: > On 10/10/12 09:12, thedeemon wrote: > >On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis wrote: > >>Making sure that the aa has been properly initialized before passing it to a function (which would mean giving it at least one value) would make the ref completely unnecessary. > >> > >>- Jonathan M Davis > > > >Ah, thanks a lot! This behavior of a fresh AA being null and then silently converted to a non-null when being filled confused me. > > Yes, it's confusing and annoying. This is something in the language that we keep talking about fixing, but to date it hasn't happened. How would it be fixed, though? T -- Let X be the set not defined by this sentence... |
Copyright © 1999-2021 by the D Language Foundation