Second Draft: Turn properties into first class accessors
12345swordy
alexanderheistermann at gmail.com
Mon Feb 10 00:31:44 UTC 2025
On Saturday, 8 February 2025 at 02:45:58 UTC, IchorDev wrote:
> On Wednesday, 5 February 2025 at 20:37:30 UTC, 12345swordy
> wrote:
>> Per request via email, I managed to port it to a markdown
>> document.
>>
>> https://github.com/12345swordy/Public-Documents/blob/main/properties.md
>>
>> Destroy!
>
> This is cool but
> 1. Can you define how exactly does this interact with operator
> overloads? Especially how with regards to op[Index/Op]Assign,
> opCall, and opDispatch?
> 2. Do you think the current ‘getters should be O(1)’ rule in
> the spec should remain or be abolished? (I’m in favour of the
> latter, since I frequently find that getters are great for lazy
> evaluation)
1. Good question. I was thinking about the interaction with
arrays and the opindex/ opIndexAssign are the ones that pop in
mind. I was thinking about custom syntax for get/set function
when it comes to the array index using [].
2. Removed. That should be an implementation defined by the
programmer, not language defined.
More information about the dip.development
mailing list