Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The post probably should've mentioned reader macros, since this is how you do this sort of stuff "normally".


I 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


For 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: