Thread overview | ||||||
---|---|---|---|---|---|---|
|
December 16, 2014 Variable-length delegates? | ||||
---|---|---|---|---|
| ||||
Is it a good idea to introduce in D a "fat delegate" that has a variable length (but its length is known at compile-time), able to contain two or more context pointers and/or one or more values or references, avoiding both some heap allocations of the closure and allowing coding patterns that require two or more context pointers? Bye, bearophile |
December 16, 2014 Re: Variable-length delegates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Tuesday, 16 December 2014 at 13:26:56 UTC, bearophile wrote: > Is it a good idea to introduce in D a "fat delegate" that has a variable length (but its length is known at compile-time), able to contain two or more context pointers and/or one or more values or references, avoiding both some heap allocations of the closure and allowing coding patterns that require two or more context pointers? > > Bye, > bearophile http://wiki.dlang.org/DIP30 |
December 16, 2014 Re: Variable-length delegates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | deadalnix:
> http://wiki.dlang.org/DIP30
It seems DIP30 proposes a struct with a pointer as second field. Are the delegates of DIP30 usually @nogc? They don't seem variable-length structs.
Bye,
bearophile
|
December 16, 2014 Re: Variable-length delegates? | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Tuesday, 16 December 2014 at 14:13:23 UTC, bearophile wrote:
> deadalnix:
>
>> http://wiki.dlang.org/DIP30
>
> It seems DIP30 proposes a struct with a pointer as second field. Are the delegates of DIP30 usually @nogc? They don't seem variable-length structs.
>
> Bye,
> bearophile
The first element can be a struct with 2 pointers.
|
Copyright © 1999-2021 by the D Language Foundation