From the D Blog: Crafting Self-Evident Code in D
Walter Bright
newshound2 at digitalmars.com
Thu Oct 26 03:25:37 UTC 2023
On 10/5/2023 10:21 AM, angel wrote:
> I don't mind if it does not compile without the `ref`, but it should be on the
> table - WYSIWYG.
It's a good point. Consider the refactoring angle. If I wished to switch from a
struct to a class, and vice versa, and can just change the definition. If `ref`
was needed everywhere, I'd have to refactor a lot of code.
This is also why D uses `.` instead of `->`. Easier to refactor.
More information about the Digitalmars-d-announce
mailing list