[plt-scheme] Does anyone use `set!' and `get!' patterns?
"Robby Findler" <robby at cs.uchicago.edu> writes:
> No, I don't think so -- get and set patterns aren't just that. They
> bind mutators and gettors to some place down inside some value.
Is this like Common Lisp setf/getf?
--
Joe
> Sam
> isn't proposing to get rid of the ML-like dereferencing ref cells.
>
> Robby
>
> On Sun, Mar 9, 2008 at 8:46 AM, Joe Wells <jbw at macs.hw.ac.uk> wrote:
>> "Sam TH" <samth at ccs.neu.edu> writes:
>>
>> > Currently, "plt-match.ss" and scheme/match (in v4) provide `set!' and
>> > `get!' patterns, which bind mutators and accessors for the matched
>> > locations, respectively. While these look clever, they complicated the
>> > implementation of match, and don't seem to be used. In particular,
>> > I've searched the entire collections hierarchy, and they don't seem to
>> > be used at all. Given this, I'd like to remove the implementations.
>> > Does anyone else use them in their code, or have any reason that they
>> > would want to?
>>
>> ML has this feature in pattern matching (in SML a pattern like "ref x"
>> dereferences a mutable cell and binds its current contents to x). So
>> presumably PLT can claim to implement a superset of ML pattern
>> matching. Without this feature, ML fanboys could say "but you don't
>> have mutator patterns, so our language is better, ha ha ha".