On Tue, 20 Sep 2016 13:20:26 -0700, David Walther
<[email protected]> wrote:
> Hi, nice work on sweet expressions.
Thanks! And thanks for contributing to this mailing list.
> Could you add a newlisp mode for sweeten?
I'm fine with adding a new mode for sweeten... but I'm kind of hoping that *you*
would provide those improvements. But I'd be happy to help you get there.
BTW, you probably want to improve "unsweeten", not "sweeten".
> The main issue is that the # character in newlisp is treated as "comment until
> end of line", and there are no #! (or #|?) style multiline comments.
Several things probably need parameters, e.g., the characters for
comments to the end of line, and multiline comments are supported.
Supporting Clojure has similar issues - there should be a few parameterizations.
There's already basic support for a Common Lisp mode. In Common Lisp
it's probably better to use the implementation specifically for Common Lisp,
but for generic data processing modifying "unsweeten" might be easier.
> # has no other special meanings, it isn't a prefix for special data types.
Again, this sounds like something needing parameterization.
> ; means the same thing as it does in regular LISP.
So *both* # and ; begin comments? Interesting.
But that's not a big problem.
> Also there are a few things from bbcode, like [cmd][/cmd], and [text][/text]
> tag pairs. [cmd][/cmd] is only used in interactive mode, but both tag pairs
> can be considered as literal multiline strings without escaping.
Another parameter, no big deal.
> Also, newLisp uses {} to delimit a literal string. I am ok with {} literal
> strings being turned into quoted "" strings. newlisp "" strings are escaped
> just like C and JavaScript.
Okay. Clojure uses {...} for hashes, so newLisp isn't the only Lisp where {}
has another meaning. The question is, how should infix be handled?
It really needs some paired characters, and (...) are spoken for.
Does newLisp already assign [...] a meaning?
If so, the best approach may be to use
«x + 1» : Left/right-pointing double-angle quotation mark, U+AB/U+BB. These are
very well-supported (e.g., they are used for French quotations and are in
Latin-1), and in many cases are the easiest to enter. There is a risk of them
being too similar to the comparison operators < and >, but this doesn't seem
too bad. Nested example: fact«n * «n - 1»»
I discuss this here:
https://sourceforge.net/p/readable/wiki/Clojure/
> Also, newlisp source code is in UTF-8. Is sweeten UTF-8 compatible?
It's *supposed* to be, as long as the underlying Scheme is. It probably hasn't
been adequately tested that way, but if it's not, it's a bug and needs to be
fixed.
--- David A. Wheeler
------------------------------------------------------------------------------
_______________________________________________
Readable-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/readable-discuss