Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Labeled parameter values clobbering in-order values should produce a warning #61

Open
lnihlen opened this issue Dec 21, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@lnihlen
Copy link
Member

lnihlen commented Dec 21, 2021

(
var f = { |a = 2, b = 5, c = 7| "a: % b: % c: %".format(a, b, c).postln; };
f.value(3, 4, 5, a: 1, b: 2, c: 3); // posts a: 1 b: 2 c: 3
)

The labeled parameter values in the call to f clobber the in-order values of the same. Whether this is the best choice for the language or no is a separate discussion. But I think a warning to the programmer might help prevent some subtle bugs.

@lnihlen lnihlen added the enhancement New feature or request label Dec 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant