Destructuring Lists Using CA*D*R vs First, Second, … vs Pattern Matching

This thread discusses the pros and cons of using the CA*D*R functions vs named first, second, third, list-tail, … and so on vs pattern matching for the same task.

I thought that pattern-matching was the best way to do it; and now I’m curious about why CA*D*R is better.

2 thoughts on “Destructuring Lists Using CA*D*R vs First, Second, … vs Pattern Matching”

  1. Pattern-matching is pretty good itself. But there is a problem of introducing it into scheme:
    1. just using it for lists. This will cause a “consistence” problem. Lists have a different way of destructuring from vectors, strings, records …;

    2. fully introducing pattern matching into scheme. This sounds a huge extention/modification of scheme. Is it still scheme?


    I don’t know enough about how people are doing pattern-matching in Scheme to say much either way; although I can say that it is pretty nice in Racket.

    The thread itself discusses various concerns.

Leave a Reply

Your email address will not be published. Required fields are marked *