chicken-janitors
[Top][All Lists]
Advanced

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

Re: [Chicken-janitors] #1020: matchable: Add conversion pattern(s)


From: Chicken Trac
Subject: Re: [Chicken-janitors] #1020: matchable: Add conversion pattern(s)
Date: Fri, 12 Jul 2013 13:29:59 -0000

#1020: matchable: Add conversion pattern(s)
--------------------------------+-------------------------------------------
  Reporter:  syn                |       Owner:  ashinn   
      Type:  enhancement        |      Status:  accepted 
  Priority:  not urgent at all  |   Milestone:  someday  
 Component:  extensions         |     Version:  4.8.x    
Resolution:                     |    Keywords:  matchable
--------------------------------+-------------------------------------------

Comment(by ashinn):

 Multiple patterns can be done with an and.  This could
 be made implicit, at which point the only disadvantage is
 loss of portability.

 The -?> is also just a matter of nesting ?:

 (match '("foo" "10")
    (("foo" (= string->number (? values x))) (+ x x)))

 This isn't too much more verbose and no less efficient.

 In general the idea is to do more with less, and try
 to keep the match syntax simple - it's already complex
 enough that people overlook things like the = syntax :)

 If you have real-world examples that show -?> as
 a likely common idiom I can consider it, but I'm more
 likely to just add a single extension mechanism and
 stop adding any new fixed syntax.

 BTW, "field accessor" comes from the original description
 in Wright's paper.  Suggestions for improvement are
 welcome.

-- 
Ticket URL: <http://bugs.call-cc.org/ticket/1020#comment:5>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]