On 11/14/24 13:45, Christof Ressi wrote:


i don't really see why we cannot consider sending a message to a global receiver to be part of the API, at least for procedures that do not return anything.
>
Because this is not idiomatic. I really don't want to assemble a Pd message just to make an API call. Do you know of any other API that is *only* accessible through a Pd message?

tuning dsp on/off?
fast-forwarding?


in the worst case (of an older Pd version that does not yet have the given message), Pd just spits out an error ("unknown message").
>
You just hit another downside of Pd messages: no opportunity for error handling

and in this case, we don't even need error handling.
we can do a runtime check of the Pd version and don't trigger an error in the first place.

if instead we bake it into a proper C function call, then an older Pd version will simply refuse to load the external that "naively" uses the function (without checking whether the function actually exists).
>
That's why we now have sys_getfunbyname() :)

yes.
but with Pd I prefer to be very conservative.
so I'll wait a couple of years to make sure that practically all installations of Pd that might use my externals do have the sys_getfunbyname()

mgfdr
IOhannes

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

 ---
pd-dev@lists.iem.at - the Pd developers' mailinglist
https://lists.iem.at/hyperkitty/list/pd-dev@lists.iem.at/message/LGCJGQIITWEBPYTDINVXMPLU763KLP5T/

Reply via email to