not sure if this was discussed before: would it make sense for [get], [set] and other pointer-related objects to be template agnostic?
This is already possible. You can use "-" as a template wildcard. This is documented for [set], [get], [element], [setsize] and [getsize].
For some reason, this doesn't work with [append]. I have opened an issue on GitHub: https://github.com/pure-data/pure-data/issues/1506
Christof
On 04.12.2021 16:01, João Pais wrote:
Hi list,
not sure if this was discussed before: would it make sense for [get], [set] and other pointer-related objects to be template agnostic? That means that an object [get mytemplate x y] wouldn't need the "mytemplate" argument, and it would get the fields from any pointer it receives.
This would allow to simplify the programming in some cases. The way it is now, it needs lots of duplicated code when getting elements from different struct templates.
Best,
Joao
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list