Discussion of Common Lisp
-
Suroy
- Posts: 46
- Joined: Sat Dec 19, 2009 11:20 am
Post
by Suroy » Sun Jan 03, 2010 10:13 am
I was just wondered what others, in their experience with lisp, have often wanted from read macros and readtables. Are you satisfied with what one can do with them now in the current standard or do you wish for something more?
Personally, I would like
(1) Readtables per package rather than a global one
(2) Being able to read backward in the reader macro stream for context

-
ramarren
- Posts: 613
- Joined: Sun Jun 29, 2008 4:02 am
- Location: Warsaw, Poland
-
Contact:
Post
by ramarren » Sun Jan 03, 2010 11:56 am
There is a project to make managing readtables easier:
named-readtables.
-
dmitry_vk
- Posts: 96
- Joined: Sat Jun 28, 2008 8:01 am
- Location: Russia, Kazan
-
Contact:
Post
by dmitry_vk » Sun Jan 03, 2010 12:02 pm
Suroy wrote:I was just wondered what others, in their experience with lisp, have often wanted from read macros and readtables. Are you satisfied with what one can do with them now in the current standard or do you wish for something more?
Personally, I would like
(1) Readtables per package rather than a global one
(2) Being able to read backward in the reader macro stream for context

Personally, I wish for just one thing: dispatch based on a symbol. E.g., something like #!BAR and #!FOO:BAR will dispatch to read macro attached to FOO:BAR symbol.
-
Suroy
- Posts: 46
- Joined: Sat Dec 19, 2009 11:20 am
Post
by Suroy » Sun Jan 03, 2010 2:45 pm
Oh, I have to add to my list
I would like a read-delimited-form which will read everything rather than read-delimited-list which doesn't like cons lists. Thats because I would like to implement a more natural interface to the dot-net framework using RDNZL rather than using brackets. I know, picky, picky

-
Suroy
- Posts: 46
- Joined: Sat Dec 19, 2009 11:20 am
Post
by Suroy » Sun Jan 03, 2010 9:41 pm
So like yesterday and today I copy and pasted sbcl's reader parsing code getting rid of any sbcl-specific code. Dont know if i broke anything cause i only tested it for the very simplest cases. I do know i commented out the #S reader macro definition. I imagine if someone wanted to, though, a better (?) reader macro system using this code could easily be produced which is , err.. better.
http://github.com/Eyaro/cl-reader
Now i shall go check out scheme
