These are chat archives for Ren-data/Ren/map

Jun 2015
Jun 20 2015 11:49
@gregirwin No, I can't think of any other language that has a datatype like hash!, though I'm far from knowing all languages. That's a good question to ask, I think.
Funny: From the first time I used Rebol 2, I've always subconsciously pictured hash! in my head as having this syntax #[...], even though it never actually had a literal form, AFAIK. Perhaps, I was thinking “hashed block”, and so I was thinking “hash” (#) + “block” ([...]).
It pleases me then, that map! does start with a “hash” symbol in Red's #(...). More than ever, I still can't help thinking of hash! being #[...], as the syntax is halfway between block! and map!, as though #[...] is a “hashed block”, and #(...) is a “hashed... something else”... OK, so the analogies had to stop somewhere. :)
Last I checked, @dockimbel was planning to merge hash! into block!, but still needs a convenient syntax to do this. Maybe #[...] for hash! could be it (although it probably isn't a sweeping solution to store metadata for other types). Then it could be used in Ren, and if other languages don't have any datatype corresponding to hash!, they could read #[...] as a list, and it would still behave the same way everywhere (just faster in Redbol).
Then construction syntax would have to change, of course, but IMO it should change anyway. I think it should, at the very least, change from #[object! [a: 1]] to object!#[a: 1] (or object!@[a: 1], \object![a: 1] etc.). Yes, I went there.
Maybe such can also drop the !, and maybe those not needing extra data can drop the brackets, like none# (or none@, \none, etc) as discussed here.
Jun 20 2015 11:54
Anyway, back to the topic: As you can probably guess, I like #A the best. Followed by #E, as that's how other languages would probably implement it.
I do question the value of (...) for lists, though, but perhaps I'm still a bit confused about the mission.
I'd like to hear what others are thinking.
Gregg Irwin
Jun 20 2015 13:49
My reason for adding (...) was more complete Redbol support. Without it, parens couldn't pass through Ren. I thought of hashlist as a shorter name for 'hinted list' and that the name could be thought of like hashtag rather than hash!, so a merged hash/block type in Redbol would still be compatible I think.