[alexandria-devel] destructuring-case
Jasper
o.jasper at gmail.com
Tue Mar 20 20:34:55 UTC 2012
Hello all,
The `destructuring-case` macro imo is a little different than I would
think it would be upon just hearing the name.
The thing is, i'd have made the clauses to basically the
`destructuring-bind` form, except that a clause is executed if the
'nested lists-shape' matches, and all non-symbols, keywords match. I'd
add `quote` as special, something that also must match exactly, and
maybe `lambda`/`function` to indicate a function that must return
true.(which now i think of it is an idea for the next section.)
(shameless plug)Maybe the reason is that i wrote a `destructuring-regex`
https://github.com/o-jasper/j-basic/blob/master/src/destructuring-regex.lisp
of which the idea is that the variables can simply be written on the
matches/space between the matches.(Further each lisp object can add a
method giving the regular expression for it, and also provide a parser)
It uses the regex package though, is cl-ppcre more commonly used as
dependency?
But basically, i have a `regex-case` for it. Them being regexes and
either matching or not make it obvious how that should work!
Looking at the git log it was added Sep23 2010, so i am probably too
late to change `destructuring-case`? I dont know, i see there are no
official releases, and it might sneakily be that many people are using
the link from the cliki page!(from 2008)
- Ending a hopefully not too inane post, Jasper
More information about the alexandria-devel
mailing list