On 11/14/24 13:56, IOhannes m zmoelnig 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.

and on re-thinking, you can of course just use send messages directly to the GUI:

```C
pdgui_vmess("load_plugin", "ss",
   "helloworld-plugin", class_gethelpdir(helloworld_class));
```

>> You just hit another downside of Pd messages: no opportunity for error
>> handling


and come to think of it: in this specific case (loading GUI-plugins), there's no way to do error checking anyhow, as the actual loading is done asynchronously in a different process.


i'm not proposing to replace all C API calls with Pd messages.
i'm not even suggesting that /in the future/ we should strive to use Pd messages rather than C function calls.

i just think the Pd message is an appropriately simple solution that can be used by both abstractions and externals.


ghmadsf
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/DRA6TX5PXVFWOX22PPT2AKGUB5IS4BLF/

Reply via email to