random-state.net

Nikodemus Siivola

<< next | top | previous >>

Trolled #
hacking, May 15th 2012

(set-macro-character #\{ (lambda (s c) (read-delimited-list #\} s t)) nil)
(set-macro-character #\} (get-macro-character #\)) nil)

EDIT: I'm not saying Didier is wrong. He isn't. While readmacros are extremely flexible, the system has some rather obvious shortcomings.

I'm just pointing out that making {foo} read as list is trivial in case someone walked away from his post with the impression that it cannot be done.

If there's something I disagree with, it is his characterization of readmacros as "shaky". Used to do things they can do, in the manner they're designed to be used, they're perfectly robust. Just not as nice or convenient as I would like them to be.

The really interesting bit is his observation that READ-DELIMITED-LIST doesn't support dotted lists, which I hadn't realized before. It isn't specified to, but it would be nice if it did...