Arne Babenhauserheide: > as I was writing this, I just tested it in guile and realized that (+ ' 1) is > the same as (+ '1), so they cannot be used for sublists.
Right, that's actually required by the Scheme language spec. The sweet-expression grammar even has a few special definitions (e.g., differences in "head" and "rest", and terminals such as QUOTEH) specifically to make sweet-expressions do this as well when they're not in the initial position, specifically to make it maximally similar to traditional notation. I said: > > A lone ":" could, as far as I know, be used as a marker. I kind-of hate to > > use it that way, though, because ":" is a pretty plausible user symbol for > > various operations. > Hm, yes. The emacs source contains 41 instances of "(: " but only 6 instances > of "($ ". > > But it has no instance of "(: (" that is the syntax which would become > impossible via pure sweet expressions using ":" for group. Well, not impossible; you can always escape any marker using {...}. So you can write the symbol "$" as {$}, and it won't be interpreted the same way. But we want to make escaping a very rare event. > And the emacs source contains 603 instances os "(group " and still 139 > instances os "(group (", which could not be written in SRFI-49 style. So > those 41 instances of "(: " are pretty tame, I think. I agree that using "group" as the marker was a bad idea for a long list of reasons. That said, SRFI-49 was a great step forward, and it's heavily influenced our work, so I don't want to beat on it too much :-). I think 41 instances of ":" and 6 instances of "$" actually gives "$" the edge, not "$", since that suggests that "$" requires fewer escapes. But that's only a tiny tendancy, and it'd be more interesting if we analyzed a large set of Lisp programs. My bigger concern with ":" is potential problems with various Lisps, including not only the diversity of Scheme dialects, but also Common Lisp, ACL2, etc. The ":" is often used for keywords or package/namespace-control in various Lisps, and this might complicate things. For example, in Common Lisp, something beginning with ":" is in the KEYWORD package (namespace), per: http://www.lispworks.com/documentation/HyperSpec/Body/02_ce.htm For example, in clisp (a Common Lisp implementation), a lone : is interpreted as || (the empty symbol) in the KEYWORD package. Other Lisps that have leading ":" for special purposes include gcc MELT (MiddleEndLispTranslator), SMT-LIB, and the original BitC. That doesn't mean that ":" is necessarily a bad idea. In fact, it's one of the better alternatives to "$". But we need to look at all the angles. > > While "$" already has a history for the meaning currently given > > I don’t really count Haskell as widespread language, so I don’t think that > this makes much difference for adoption - at least less than the penalty for > readability… Well, to be fair, neither is Scheme :-). The TIOBE January 2013 ranking here: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html ranks Scheme as #27 (0.433%), while Haskell is #32 (0.331%). Please take the TIOBE rankings with an ocean of salt, but still, they're useful as a starting point. Not really much of a difference popularity-wise. Perhaps more importantly, there's a fair probability that a programmer who knows one will also know the other. Haskell is a lazy functional language, while Scheme is often used as an eager functional language. > (also keep in mind that $ is common in the USA, but in the rest of the world > people don’t see the dollar-sign all the time, so the reception might be > quite different) I think that that's rather unlikely in the programming world. Many languages, like Perl, Bourne shell, and make, are essentially impossible to use without some plausible punctuation being displayed for the "$" sign. For good or for ill, everybody has learned how to deal with ASCII even if it's not their native locale, and ASCII is a subset of ISO 10646/Unicode, so it's here to stay. > > , ":" does not. Spelling the GROUP_SPLIT operator as ":" instead of "\\" > > does have some appeal, in particular, it does look reasonable as the SPLIT > > operator. But I worry about making another single-character symbol > > unavailable to users; it's pretty unlikely that they're using \\, and > > one-character symbols are really handy. > > They are handy, but on the other hand it is important to have elegant > core-syntax. Absolutely. And now, while there are few programs that depend on the spelling, is the right time to discuss it. It's trivial to CHANGE in our implementations, but once there are many programs in sweet-expression notation it'd be hard to make a change like that. > It would be nice to have more info how much ":" is used in real-life scheme > packages. Sadly I can only check emacs (and there it’s pretty rare). More data would be great, especially on Scheme and Common Lisp. Anyone have more data to play with? --- 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. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122912 _______________________________________________ Readable-discuss mailing list Readable-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/readable-discuss