Subject: Re: writing out expressions prepended by #. From: Erik Naggum <erik@naggum.net> Date: Mon, 30 Apr 2001 00:54:15 GMT Newsgroups: comp.lang.lisp Message-ID: <3197580855623450@naggum.net> * Kent M Pitman > The only problem with this is that there is a convention (not sure if > it's documented or not) that #<char> should be followed by exactly one > readable token, for the case of making #- skip the right number of tokesn > in a place where the object is not implemented. I do not agree with this. Input to the reader that use these notations either have an in-syntax form at the top to establish the readtable, and that would fail before #- would fail, or operate under an assumption made explicit elsewhere if not in the input stream that such readtables are employed. > The other advantage of the #S approach is that if the parser is > proprietary for things like an IP address or a URL, it's easier to > conjure a "parser" for #S-style structures (since it's just an > application of GETF) than for the other notations you suggest, even if > they are more compact. Compactness is not the driving concern. The driving concern is the ability to register types (or whatever else is suitable) so that the syntax is _not_ open-ended as far as the reading process is concerned, such as #. is. #. also returns objects of type t, whatever is returned as the primary value of the form evaluated, which may be a strain on the human reader of the code. #/.../ would return objects of a known type, identified by name. #S has this feature, but it requires a parsed-out list of arguments. There are good reasons we invent new syntaxes, such as for pathnames, symbols-with-packages, etc, even though they have some costs: e.g., #S(symbol :name "FOO" :package "BAR") is conceptually the same as bar:foo. #:Erik -- I found no peace in solitude. I found no chaos in catastrophe. -- :wumpscut: