Let's get the semantic around closure fixed.

deadalnix deadalnix at gmail.com
Wed May 19 11:06:29 UTC 2021


On Wednesday, 19 May 2021 at 07:53:49 UTC, Walter Bright wrote:
> On 5/19/2021 12:36 AM, deadalnix wrote:
>> This is where attacking the problem from first principles 
>> helps. It is not about the pointers, it is about the 
>> invariants. If the compiler can find a better way to implement 
>> these invariants given a set of conditions, then great.
>
> The thing about metaprogramming is users can build things by 
> aggregating simpler pieces (like pointers). If the compiler has 
> special semantics for a higher level type that cannot be 
> assembled from simpler pieces, then the language has 
> composability problems.
>
> (This problem has shown up with the special semantics given to 
> associative arrays.)

Composability comes from the invariants you can rely on, and more 
precisely, the fact that these invariant do not impose 
constraints on each others.


More information about the Digitalmars-d mailing list