-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ugens no longer support positional args #377
Comments
Honestly, I've always had the opposite problem - SynthDefs with positional arguments are opaque to me and I have to consult the documentation for every UGen to understand what argument means what in each position. The official SuperCollider docs SynthDefs give me a hard time for this very reason. And, as the maintainer, I don't necessarily make any guarantees about the order staying stable. The fact that the keywords appear in the same order they'd appear in the binary representation of the UGen should be considered a convenient implementation detail. So I'm not super swayed by the legibility argument. Would've swapped to keyword-only arguments years ago if it had occurred to me. I'm sympathetic to the hassle of refactoring, so I'll think about it. But I must warn you that there's even more backwards incompatibilities coming down the pipe regardless as I'm currently re-implementing SynthDefs / UGens from the ground up. Seems easier to handle fewer, spaced-out breaking changes rather than huge bundled ones |
Fair enough. I think that moving to keyword only and having old code break in an obvious way is better than the potentially subtle bugs introduced by reordering args that can be used as positional. I do agree in general about keywords being more legible. On the other hand, there's My synthdef collection in Supriya is pretty small, so it wasn't a huge inconvenience. But realizing how big a job it could have been was my main inspiration for opening this issue. I don't mind adapting to this or future API changes, though I definitely appreciate the heads up. |
FWIW you can test against the upcoming changes via this PR: #378 |
I upgraded from
24.1b1
to24.3b2
and noticed that all of my ugen instantiations were broken because the ugen classes don't accept positional args anymore. Updating synthdefs using positional args for ugens is a hassle because it requires looking up the names of all arguments for each ugen to be converted to keyword args.If support for positional args to ugens can be retained, I think that would be rather nice.
The text was updated successfully, but these errors were encountered: