[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: record-mutator vs record-modifier

This page is part of the web mail archives of SRFI 76 from before July 7th, 2015. The new archives for SRFI 76 contain all messages, not just those from before July 7th, 2015.



   Date: Tue, 03 Jan 2006 12:48:25 -0800
   From: Per Bothner <per@xxxxxxxxxxx>

   However, SRFI-76 uses record-mutator where SLIB uses record-modifier.
   Is there any reason for the for this difference?  I think that the
   old name is better than the new name, so why change it?  I gues the
   word "modifier" is somewhat overloaded (it could also be something
   like an adjective or adverb that modifies some other action), but
   at least it's a "real word", unlike "mutator".  The arguments either
   way don't seem strong either way, which argues for using the old name,
   especially given that other record-XXX functions keep the old names.

Aside from the reason Mike gave, there's also the point that 'modify'
often refers to taking the old value of a field, passing it to some
function, and setting the field's value to be whatever the function
returns; e.g., ((RECORD-MODIFIER <rtd> <field>) <record> (LAMBDA (X)
(+ X 1))) might increment <field> in <record>.  This use of the term
'modify' dates at least back to T in the eighties, where there was a
MODIFY macro that worked on its generalized SET.  I'm not fond of the
term 'mutator' either, but I think 'modifier' is no better; I think I
might prefer RECORD-SETTER, but I don't have a really good suggestion.

And I'd rather not have the reflection interface specified at all, or
at least relegated to a different specification.