Read macros: what do you use them for? [closed]

2020-02-24 23:17发布

I'm trying to get a feel for the parts of Lisp that I haven't used very much up to now. Read macros have caught my attention at the moment. There isn't a huge amount of info about their use and it would help to see what people have done with them, both to get examples of how they work and also to see what sorts of problems can be approached with them. Following on that, are there any guidelines for knowing what constitutes good and bad use of read macros?

7条回答
霸刀☆藐视天下
2楼-- · 2020-02-25 00:13

One particularly common and useful alternative syntax that you can embed with read macros is regex syntax. It's not at all hard to implement it, since it's just reading a string with different escaping rules, but if you use regexes at all frequently, it can really pay off. The CL-INTERPOL library that dmitry-vk mentioned provides this functionality, along with a lot of other features.

查看更多
登录 后发表回答