Re: [Scheme-reports] Legacy caar to cddddr
Andre van Tonder 23 Oct 2011 08:11 UTC
On Sat, 22 Oct 2011, John Cowan wrote:
> Andre van Tonder scripsit:
>
>>> It's not obvious why this is better than pattern-matching, though.
>>
>> I thought WG2 had made a preliminary decision to have renaming macros
>> (i.e., no syntax-case).
>
> That's right, but we will have pattern-matching/destructuring as well.
> In any case, syntax-case may get back on the table.
Pattern matching is IMO overrated and is disliked by many programmers,
especially lots of the programmers who are attracted to LISP or Scheme.
Programs with pattern matching are less reusable and generic than programs using
deconstructors. For example, if I deconstruct using C*R and decide to change
the data structure from pairs to something else (e.g. records that have some
extra data), I can simply put the code in a module parameterized over the C*R
deconstructors and the code will immediately work with the new data structure.
This usually cannot be done with an out of the box pattern matcher.
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports