From: David A. W. <dwh...@dw...> - 2013-05-15 12:50:29
|
(I posted a longer version of this on comp.lang.lisp, but I suspect not everyone saw it there.) FYI: I've just released a Common Lisp library called "readable". It adds a new abbreviations to the Common Lisp reader for data and programs (by modifying the readtable). It provides 3 notational tiers, which are cumulative. Here's a summary: 1. Curly-infix-expressions (c-expressions): Add a Lispy infix notation, so {a op b op c ...} => (op a b c...). No precedence, by intent. 2. Neoteric-expressions (n-expressions): An e(...) maps to (e ...), and e{...} maps to e({...}). 3. Sweet-expressions (t-expressions): Parentheses are deduced from indentation. Unlike practically all past efforts to improve Lisp readability (such as M-expressions), these notations are general, homoiconic, and backwards-compatible with well-formatted s-expressions. Macros, quasiquoting, special forms, and so on work just fine. You can mix them with traditional s-expression notation, too. You can get the Common Lisp tutorial (which includes install instructions), download the code (open source software using the MIT license), and get other information from: http://readable.sourceforge.net If you're a Scheme user, the first two tiers are defined in SRFI-105; the third tier (sweet-expressions) are defined in draft SRFI-110. If you think s-expression notation came from the gods, well, this library isn't for you. If you have an open mind, check it out. You might also view: https://sourceforge.net/p/readable/wiki/Retort/ Constructive comments welcome. --- David A. Wheeler P.S. Installing and enabling it looks like this, per the tutorial: ./configure --prefix make make install run_your_common_lisp_implementation (require 'asdf) (asdf:load-system :readable) (readable:enable-sweet) ; Or whatever tier you want --- David A. Wheeler |