[PD] curly braces in Pd

IOhannes m zmölnig zmoelnig at iem.at
Sun Jan 8 19:06:37 CET 2023

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(
|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).


-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20230108/a1e45ac0/attachment.sig>

More information about the Pd-list mailing list