- From: Dan Connolly <connolly@w3.org>
- Date: Wed, 04 Aug 2004 11:49:08 -0500
- To: Sandro Hawke <sandro@w3.org>
- Cc: Tim Berners-Lee <timbl@w3.org>, Jos De_Roo <jos.deroo@agfa.com>, Yosi Scharf <syosi@mit.edu>, public-cwm-talk@w3.org
On Wed, 2004-08-04 at 11:29, Sandro Hawke wrote: > > True. I had been thinking that formulae were too different from lists > > for sets to look like them - but then, formulae are indeed unordered > > sets of statements. > > > > { <a>, <b>, <c> } > > > > works for me, as I also kinda expect {} for a set since high school. > > > > Currently N3 is an LR1 language which can be predictively parsed: you > > know which production is being expanded by looking just at the first > > token. This change would mess that up, in that one would have to try > > both productions to distinguish > > > > { <a> <b> <c> } from { <a> , <b>, <c> } > > > > where <a> could be any path expression. > > Yeah.... Yosi pointed that out to me yesterday. Ugh. > > I'm inclined to let the machine do the work. I'm inclined the other way, in this case. > Prolog DCGs and > blindfold's btyacc parser allow unlimitted lookahead, which gives you > expontial worst case performance problems, but there's no penalty in > the normal case, and I don't think this grammar ambiguity allows one > to construct a bad situation. But it would be an obstacle to N3 > spreading. Yes, I think so... "worse-is-better, even in its strawman form, has better survival characteristics than the-right-thing" -- http://www.jwz.org/doc/worse-is-better.html > > The inelegant but effective solution to that would be > > { , <a>, <b>, <c> } > > which would be consistent with > > {,} > > as the null set and > > {,<a>} > > as a singleton set. > > Is it okay to use { } as both the empty set and the empty formula? My first reaction is "ew" but I can't think of any technical reason why not. I'm partial to {| <a>, <b> |} at this point, though I'd like to be pleasantly surprised by some other alternative. > -- sandro -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Wednesday, 4 August 2004 12:49:01 UTC