Struct initializers as expressions
Enamex via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Dec 3 14:30:37 PST 2015
On Thursday, 3 December 2015 at 15:31:49 UTC, Chris Wright wrote:
> On Thu, 03 Dec 2015 06:38:20 +0000, Mike Parker wrote:
>
>> AFAIK, your only option is to use a struct constructor. This
>> is the sort of thing they're used for.
>
> Which brings be back to positional arguments, which means that
> someone wishing to supply a limit on the number of query
> results must also give me the number of results per page, even
> if she doesn't care about the number of results per page.
>
> Is it worth posting a DIP for struct literals of the form
> `Name{fieldname: value}` ?
I asked about that a while ago and was given noncommittal answers
on why it wasn't accepted. I'd support your DIP.
More information about the Digitalmars-d-learn
mailing list