I wrote: > > * Scheme doesn't define what "-" and "+" followed by other stuff > > mean if they aren't a number. The obvious extension is to consider > > them symbols, and doing so is important for a Scheme shell (it makes > > it easy). One gotcha: "-i" is negative sqrt(-1), but that's also a > > valid flag (in particular, it's grep's case-insensitive flag).
On Thu, 23 May 2013 23:59:40 -0400, John Cowan <co...@mercury.ccil.org> wrote: > More precisely, R5RS does not. In R6RS, -g is a lexical syntax error, > and in R7RS it's a valid identifier. Ah, thanks for the correction. R7RS's ability to use a "-" followed by letter or "-" as a valid identifier should make any Scheme-based shell much easier to implement portably. With the exception of "-i" of course. > > * The latest Scheme now defines |...|. Which is nice, but that means > > that scsh's mappings for | and || probably need tweaking. > > Yes, we recognized that | was going to be problematic: it has to be > typed as |\|| now. || is fine, though; it's the result of > `(string->symbol "")`. I realize that || is *legal*, but I think it'd be confusing to actually use ||. The notion of defining something whose real name is the empty string just somehow seems wrong :-). Maybe not, since it can be read and written, though any users of symbol->string for debugging better be prepared. I suspect that "pipe" would be a more pleasant name to use than "|\||", even though it's the same number of characters. --- David A. Wheeler ------------------------------------------------------------------------------ Try New Relic Now & We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, & servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss