AltME: Ren - Data Exchange Format

Messages

Andreas
> Do you see some significance of the hash sign in respect to maps?
Yes, but not a strong one. A map is a "hash table", hence the hash.
However, the primary reason I really like the hash sign #[...] notation is that it visually stands out. I experimented with :[...] ("colon block") for a while, but that's just too muted, too easily overlooked.
Andreas
#{...} for construction syntax would certainly be a possibility. But then we'd have to find another syntax for binary!.
Maybe #(...) for construction syntax makes sense? (And #(...) is unused, at the moment.) In a way, construction syntax can be understood to be something "forced", something immediate which somewhat matches the use of paren (....) in other contexts.
Henrik
what happens to serialized values, like #[none] ?
Gregg
It's still there Henrik.
:[] doesn't stand out much Andreas, I agree.
Gregg
I should say that REBOL's construction syntax is still in REBOL. Ren doesn't know anything about it. At least according to the current spec.

DocKimbel
Right, #(...) is what I meant. :-)
Andreas
> what happens to serialized values, like #[none] ?
Those things are called "construction syntax" now. An alternative syntax for construction syntax, under the premise that #[...] would be nice for maps, is what we are discussing right now.
Henrik
OK, thanks
Andreas
Sorry, that maybe sounded a bit gruff -- not intended. Any thoughts would be more than welcome :)

Oldes
There is always the big "back compatibility"question. Mentioned #[none] and similar may be used in many plain text data files, but I guess it's still not late for R3 and Red to change it to #(none) and use #[ ] for maps.
(I can say this as I have not ported any of my R2 scripts to R3 yet!)
DocKimbel
Why wouldn't we use #(...) for maps rather?
Oldes
It does not looks fine to me... btw, why to have special construct for map! anyway? one can always use:
>> #[map![a 2 b 3]]
== make map! [
    a 2
    b 3
]
Which leads to question if this would be considered as nice:
#(#[a 1 b 2])
and...
>> #[map![a 2 b 3] is it ok that I can do this?]
== make map! [
    a 2
    b 3
]
#[#(a 1 b 2)]
DocKimbel
"why to have special construct for map! anyway?" To be able for REN to compete with JSON.
#(...) is probably ok for construction syntax, leaving #[...] for maps.
Oldes
#(#[a 1 b 2]) is not needed anyway, as map! does not support indexes like block! and so it does not have special serialized syntax.
*need*
DocKimbel
Oldes, the syntax would be simply #(a: 1 b: 2) or #[a: 1 b: 2].

Last message posted 408 weeks ago.