libera/commonlisp - IRC Chatlog
Search
3:25:57
seok
I'm jumping everywhere to figure out what each function does while reading a definition of an object, before even trying to figure out how that object is used
8:19:34
rendar
every list when evaluated, the first name is the function name, and the rest are the fn args.. but what about in designing some function like the unix command line, where you have optional arguments out from the main list arguments, e.g. consider this: (rm file1 file2 ..) there is some way in CL to specify optinoals args such as (rm --force file1 file2...) ?
8:20:22
rendar
what you think about having oob data for each list argument, e.g. (rm[force] file1 file2 ..)
8:22:41
rendar
pjb, i know, like the unix rm does, but i was thinking to something more deep: attaching data to every list's argument
8:23:40
rendar
pbj for instance, (rm[force] file1 file2) i'm specifying some information to the first arg here
8:24:15
pjb
rendar: well, if you want to be able to specify your parser with such concise notation, you can do it too.
8:26:06
pjb
CL provides you with a standard syntax for lambda-list. If you don't like it, just use &rest args, and write your own parser.