[e-lang] json in E
Mark S. Miller
markm at cs.jhu.edu
Fri Sep 24 18:47:41 EDT 2004
Kevin Reid wrote:
> On Sep 24, 2004, at 17:37, Mark S. Miller wrote:
>> After writing this, and then having thought about it for a moment, I
>> am inclined to do that. If no one objects, the next release of E ...
> I object.
> Currently, term`x:y` is a term with the tag <x:y>. If this syntax change
> were introduced, then term`x: y` would be surprisingly different from
> term`x:y` (currently, the former is a syntax error).
I agree. This conflict is an adequate reason not to change from '=' to ':'.
David Hopwood wrote:
> Personally I do prefer ':' instead of '=' for key-value pairs.
> ':' is also used by Python, Oz, and YAML (www.yaml.org).
> (Perl, Ruby, and of course E use '=>'; the only language I know of that
> uses '=' for this is Lua.)
I had never heard of Lua. The other languages that use '=', and the reason why
I originally chose '=', are XML, SGML, HTML, etc., for attributes. I wanted
the term-tree embedding of XML to be fairly natural for XML folks. I'm very
gratified to hear that Kevin is actually using this embedding.
Since otherwise JSON is so close to being a compatible subset of term-trees,
and since JSON doesn't have the tags that would cause the above problems, I go
back to thinking it would be nice to have a json`...` as a front-end to
term`...`. If someone created this, I would like to include it in the E
Kevin, thanks for putting an approriate copyright notice on deJSONKit.emaker.
Could you please resend your makePipe and w__quasiParser programs with such a
copyright as well? I'd like to include both in future E distributions. Your
w__quasiParser is a wonderful example for showing off E's support for
Text by me above is hereby placed in the public domain
More information about the e-lang