[m-dev.] record syntax
schachte at cs.mu.OZ.AU
schachte at cs.mu.OZ.AU
Fri Dec 8 00:09:15 AEDT 2000
On 7 Dec, Ralph Becket wrote:
> I don't actually find the need to write
>
> :- func field_a(T) = foo. :- func 'field_a:='(T, foo) = T.
> ...
>
> to be that big a deal. It certainly wouldn't be hard to write a small
> shell script (or Emacs function, if you're that way inclined) to knock
> out the boilerplate for you.
If you start feeling the need to write code to generate boilerplate for
you, that's a hint that you need a better abstraction. The problem
with boilerplate isn't just that it's boring and a waste of time to
write, but that it's boring and a waste of time to *read*, it hides the
interesting, important code, and makes maintenance boring, time
consuming, and more error prone.
--
Peter Schachte The use of COBOL cripples the mind; its
mailto:schachte at cs.mu.OZ.AU teaching should, therefore, be regarded
http://www.cs.mu.oz.au/~schachte/ as a criminal offense.
PGP: finger schachte at 128.250.37.3 -- E. W. Dijkstra
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list