freenode/#lisp - IRC Chatlog
Search
23:35:47
kagevf
in CL could you write a reader macro to do the same thing? to make [] and {} act like ()?
23:36:40
kagevf
ok, that's what I thought ... do they exist as part of the standard, or in a library?
23:37:28
fiddlerwoaroof
There's also things like this that port the good bits of Clojure's syntax: https://github.com/joinr/clclojure/blob/master/reader.lisp
23:38:11
fiddlerwoaroof
So, technically, libraries aren't supposed to use these characters in the standard readtable
23:38:38
fiddlerwoaroof
However, libraries are free to provide their own readtables, and named-readtables exists to make that process nicer
23:39:06
fiddlerwoaroof
Also, personally, I tend to think "whatever a library can do should be left out of the standard as much as possible"
0:53:42
Bike
{} and [] are reserved in the sense that the implementation can't use them. there's no restrictions on programmer users, library writers or not. named readtables is probably still a good idea tho.
1:24:33
aeth
You'd probably want #[...] and #{...} instead of just [...] and {...} to make it really clear that it's a reader macro
5:45:33
fiddlerwoaroof
Bike, I'm confusing two things, it's interesting that #{} and #[] aredescribed this way: "The combinations marked by an asterisk (*) are explicitly reserved to the user"
5:46:32
fiddlerwoaroof
While [] and {} are defined this way: "The characters marked with an asterisk (*) are initially constituents, but they are not used in any standard Common Lisp notations. These characters are explicitly reserved to the programmer."
5:47:47
fiddlerwoaroof
It seems to me that there's an attempt here to distinguish characters that end-users might define reader macros on from characters that non-end-user programmers might define reader macros on
5:48:19
fiddlerwoaroof
Of course, in retrospect, it seems to me that NAMED-READTABLES is the right solution to this sort of problems