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

I suppose what I was really wondering, but cleverly hid in formulating my comment, was "what are read[er] macros?".

That'd be how you could redefine "{" and "}" to work something like this?

At least I came across the following that seems to indicate that:

http://letoverlambda.com/index.cl/guest/chap4.html

http://jlongster.com/2012/02/18/its-not-about-macros-its-abo...



Reader macros allow you to write parser functions for characters. So you could write a reader macro for { such that it collects all enclosed content until a } character. The it could transform that content and return the transformed result. The result is always Lisp data, not a string. How you transform the enclosed text is up to you.

Common Lisp itself tries to minimize its usage of characters. It is expected that users or libraries want to make use of characters like {, }, [, ], and many others.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: