On 1/7/23 03:20, Alexandre Torres Porres wrote:
So, why can't Pd just support this?

in theory it can (of course).

the main reason why Pd does not support curlies is, that they need special escaping on the GUI side (as in Tcl/Tk they are special characters used to group lists or strings), and it was just much easier to completely forbid them than to worry about getting the escaping right.

in any case, as explained in [1] and reproducing here verbati: i don't think we should lightly add "support for curly braces". the fact that curlies (that is: a pair of matching characters) have been forbidden until now is a unique opportunity. it could allow for a simple and elegant way to write structured data in Pd patches without breaking backward compatibility currently our only data structure we can express within a message are lists of atoms. but with curlies we could introduce list of lists.

[list foo {1 2 3} bar(
|
[$1(
|
|list 1 2 3)

I think this is much more interesting that allowing for regexp-groups such as used by OSC or ossia.

note that this is not mutually exclusive; we can have both single curlies denoting some special syntax (like the lists-of-lists above) and curlies within symbols to not carry any specific meaning (so that a symbol like /{foo,bar} can be used as an OSC-path with alternatives, handled by the OSC-receiver).


mfgds
IOhannes

[1] <https://github.com/pure-data/pure-data/issues/505#issuecomment-1374880190>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> 
https://lists.puredata.info/listinfo/pd-list

Reply via email to