C is Brittle D is Plastic
Quirin Schroll
qs.il.paperinik at gmail.com
Wed Mar 25 13:20:16 UTC 2026
On Sunday, 22 March 2026 at 12:23:28 UTC, Sergey wrote:
> On Sunday, 22 March 2026 at 11:56:00 UTC, Dennis wrote:
>> You don't need to change `.end` into `.end()`, `.end` works on
>> both fields and methods.
>
> Some languages consider this as a downside. Because of clarity
> for human or llm who is reading the code - which is trying to
> understand what is it method or field, structure or pointer to
> the structure..
That’s an odd take. C# and Kotlin have properties since day one
and it’s considered a win for each. Neither human nor AI should
care if it’s a property or a field. The whole point of properties
is being largely equivalent to fields when used. The rather
annoying thing about D is that properties aren’t really
first-class, but piggy-backed on functions.
More information about the Digitalmars-d
mailing list