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

From: Chongkai Zhu (czhu at cs.utah.edu)
Date: Sun Mar 9 12:26:40 EDT 2008

Joe Wells 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”.
>
>   

Sorry, but I don't think what you said is true. PLT-match is a superset 
of ML pattern matching, even with out set! and get! pattern. For 
details, please check http://www.cs.utah.edu/~czhu/sml.htm

Chongkai




Posted on the users mailing list.