2 ms·
I'm trying to decide how I feel about the naming convention. On the one hand, I don't want there to be two conventions for no reason. On the other hand, I think
by mumblemumble 7y ago
I'm trying to decide how I feel about the naming convention. On the one hand, I don't want there to be two conventions for no reason. On the other hand, I think I see a reason: `getProp()` is a method that might do _anything_, up to and including making some I/O call that might fail. With a record's `prop()` call, though, I can expect that it's just getting a value. And I sure wouldn't mind having a convention that `valueName()` is a lightweight getter, whereas the 'get' in `getValueName()` is a warning to be on guard for side effects.
To the first two, it sounds like maybe you just don't want what it's offering. The autogenerated equals, etc can only work sensibly if instances are immutable. And if instances are immutable, enforcing a value-level comparison so that you can have predictable, standardized semantics around one of the pricklier bits of how a datatype is defined makes a fair bit of sense.