I asked about "." on a line by itself and what it should mean: > > foo > > ! a b > > ! . > > ! c > > > > SHOULD it mean that? My ANTLR BNF doesn't do that, it just treats lone "." > > as a period, but we *did* support that previously. > >
Alan Manuel Gloria: > *shrug* I think it's bad style either way (either you use "," as a > symbol, or you use improper lists to structure what is code or > code-like). So either way will do. Can even be "unspecified" as far > as I'm concerned. > > "." as symbol is not a good idea in general in Lisps, and improper > lists in code-like structures is almost as bad. Well, we *need* to be able to handle improper lists in code-like structures, e.g.: (define (values . things) ...) Also, it's important that sweet-expressions be able to handle data as well. That said, that doesn't mean we need to support the dot operator *this* way (as the lone value on a line after the indent). After all, we already support "." inside (...), and on a line for improper lists: a b . c ==> (a b . c) So you can use: define values(. things) ! ... I TOTALLY agree with you that the "." symbol is awkward to handle. But I'd like to be able to define our reader in our own notation, so I think there needs to be SOME way to refer to the period. If nothing else, it is very helpful to be able to refer to '. as something meaningful, so we can write sweet-expression processing in its own notation. Beni Cherniavsky-Paskin has separately made a strong case *for* supporting long "." as the cdr operator, and we *did* support it originally. So I think it's worth considering. But can we support both "." as symbol, and "." as cdr-setting argument?!? I expect we can - though it may be too awkward to do. Maybe if period follows an abbreviation, or is the last item in a list. Hmm, we probably have to think about this. Sounds like some experimentation is needed. BTW, supporting leading "." on a line escapes the following item; I did that to retain consistency with neoteric-expressions. So by intent: . x ===> x Now, having TWO items after any "." is an error, and that is even a specifically noted error in the BNF. However, *detecting* this error is an explicitly-identified TODO in the current implementation :-(, which is why Beni Cherniavsky-Paskin managed to get a rather unexpected answer. We'll get there :-). > > It also has said that lone abbreviation on a line, followed by an indent, > > applies that abbreviation to the body. E.G., this would mean "(quote (aaa > > bbb))": > > ' > > ! (aaa bbb) Alan Manuel Gloria: > It might be *clearer* for the user to write that, in some contexts. > So I think we should support this one at least. Beni Cherniavsky-Paskin: > If it works on the same line: > ' (aaa bbb) > then it should also work with an indent. Consistency, easier to remember, > least surprise... Okay, looks like there's a strong press for that semantic. That *should* be easy (famous last words :-)....). I suspect that will actually be easier in the recursive-descent than in ANTLR. Beni Cherniavsky-Paskin: > BTW, your new implementation supports > ' > a > ==> 'a > which should perhaps be an error instead. > What's worse, what it currently does for quote INDENT is very weird: What's happening is that on initial ' it's reverting to the neoteric-expression reader; all whitespace after ' is being ignored. That is indeed how it's coded, but it sounds like that is *not* what is wanted :-). I said: > > I've tweaked the ANTLR BNF so that initially-indented special comments are > > consumed, with the following hspace consumed too,... Alan Manuel Gloria: > I vaguely remember hacking this change in the previous version (which > is why there's a second entry point for sweet-read). Or maybe > something else, don't remember well. Ah, that makes sense. Is there anything else like that, as best you remember? Now that we're trying to make the spec rigorous, I'd like to make sure we don't lose any important functionality. --- David A. Wheeler ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss