Alternate String Forms if {...} Becomes An Array Type

Note that triple quotes doesn't help as a new answer for the API example (it makes it exponentially worse if you tried to use them!)

rebElide("print {If braces are given up, how to replace this?}");

Remembering that I'm trying to avoid a lot of ugly API calls like:

rebElide("print \"If braces are given up, how to replace this?\"");

C doesn't have any alternatives there besides quotes. And JavaScript has apostrophe-delimited strings as an alternative, but we use apostrophe a lot inside code so that's not good either.

Rebol is so saturated in its use of symbols that creative choices are unavailable.

obj: (|x: 10, y:20|)  ; for instance, (| "banana clips" |)

We believe | and || are legal symbol in arrays, and (||) is a 1-element GROUP! with || in it, while (| |) is a 2-element GROUP! of two |'s

It's tough here, and <{ and }> so far still seem like a practical answer which allows braces to take on a new role. But we don't really know if that role will pay off yet, so it's worth continuing to think.

1 Like

A tricky decision indeed.
I can see the value of the API use case and it is a very good cause. Would it be an option to support both? That way """ is easier for new users and the <{ }> is great for APIs? I agree that this is still not ideal, but might be worth considering if the implementation effort is low. Thanks, John