3 ms·
The post probably should've mentioned reader macros, since this is how you do this sort of stuff "normally".
by Grue3 12y ago
The post probably should've mentioned reader macros, since this is how you do this sort of stuff "normally".
- jmdavis 12y agoI originally had a section about reader macros but I ended up cutting it since the article was running a little long. Reader macros are great, but they work best when a token can unambiguously be recognized by the reader as using some "special syntax" (usually involves a '#' and then another dispatch character preceding the new syntax). This is great when you're coming up with a brand-new syntax. But if you're trying to match something that already exists, it's not easy
- chaitanya 12y agoFor those wondering about reader macros in Common Lisp, I wrote a tutorial a couple of months back that allows the Lisp reader to understand JSON: https://gist.github.com/chaitanyagupta/9324402 https://gist.github.com/chaitanyagupta/9324402