[m-users.] Concise syntax for initialising and updating discriminated union types
Volker Wysk
post at volker-wysk.de
Tue Jul 19 18:29:11 AEST 2022
Am Dienstag, dem 19.07.2022 um 04:57 +1000 schrieb Zoltan Somogyi:
> > > You would also want some mechanism to control the names of the generated
> > > predicates, though a naming scheme consisting of {get,set}_<fieldname>
> > > would be a good default.
Yes, that sounds reasonable.
> > You could just use the field name as the predicate name in both cases, since
> > they differ in the arity.
>
> Again, you could, but each line of code is read far more often than in it is
> written, so the wise tradeoff is to make reading easier, even if it costs a few
> keystrokes.
That's true...
Bye,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.mercurylang.org/archives/users/attachments/20220719/4139cd22/attachment.sig>
More information about the users
mailing list