[plt-scheme] Does anyone use `set!' and `get!' patterns?

From: Joe Wells (jbw at macs.hw.ac.uk)
Date: Sun Mar 9 10:46:49 EDT 2008

"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”.

-- 
Joe


Posted on the users mailing list.