Why trailing underscores? i.e.:
~clock = TempoClock(90 / 60).permanent_(true);
Are they necessary? I’ve also seen them in “trig_”
The only thing I can find is getter and setter function in the Writing Classes help document
Thank you
Why trailing underscores? i.e.:
~clock = TempoClock(90 / 60).permanent_(true);
Are they necessary? I’ve also seen them in “trig_”
The only thing I can find is getter and setter function in the Writing Classes help document
Thank you
It’s a shortcut for a setter, but it also allows you to continue appending afterwards:
something.thisThing_(true).anotherThing_(1.0)
With equals signs, the statement is done
Ps. You can, if you like, write:
(Point.new.x = 3.141).x == 3.141
Pps. I wonder about the underscores too. You can, again if you like, write:
+ Point {
x {
arg anObject = 'a distinguished disallowed value';
(anObject == 'a distinguished disallowed value').if({ ^ x }, { x = anObject });
}
}
and then:
Point.new.x(3.141).x == 3.141