[chuck-users] heads up for 220.127.116.11
signal.automatique at gmail.com
Sat Sep 9 21:27:15 EDT 2006
> 2. new naming optimal?
I'd still prefer all lower case or even being case insensitive for
everything but user-defined stuff. I admit that my reasons here are mostly
personal; once I get into the frame of mind to use caps in writing I tend to
start lines with a capital which makes the compiler complain which in turn
anoys me. Pilot error, for sure, but it's something that I found happens.
I'd be interested in hearing wether that's just my own little brain or some
more universal patern.
More universally; I don't find caps add any real meaning here though I
suppose using capitalisation for Ugen and class names, then lowercase for
instances might be usefull to those acustomed to that convention, personally
I find it confusing (that might again be just me). Clearly; doing that
*would* break existing code while the current plan won't.
Also; sticking to the STK conventions has some merrits in that it should
make it more clear how some yet under-documented ChucK bits link to the
existing STK documentation.
So; it's not my own first choice but now it's consistent. Being consistent
is good for learning syntax quickly and it decreases confusion.
One area I'd like to include in this is ugen parameters. Right now they are;
for STK ones and
The Ugens that are made up of two words get named with two caps for the
name, and either a cap for the second name for the STK ones and all
lowercase for the ChucK ones.
Flute.startBlowing (from the STK)
SinOsc.sfreq (ChucK, proposed new usage)
Had SinOsc been in the STK then it probably would have been;
This would be more consistent, and probably should be done if we are going
to have consistency based on STK conventions.
Another case is
which also has a different behaviour (but I could only find one example like
that). With that being the only underscore in sight I think I'd propose;
Fortunately this affects only a few ugens since the native ChucK stuff tends
to be basic building block stuff and only a few of the parameters have
complicated two-part names. If we are going to have a wave of making stuff
consistend I think I'd like to include the controll parameters as well.
So, to conclude; I'd prefer all lowercase myself but nobody else spoke out
for that so I might be alone. In that case I'd be very happy with the new
consistencyand clarity and the elimination of the need to keep track of what
bit came from where. I'd also like toput .sfreq and .phase_offset on the
list of things to be unified.
The new filters are great news, lookingforward to playing with them.
All of this is just my own thoughts and I'm dyslexic so basing anything on
my sugestions about writing may or may not lead to explosions, mild nausia,
getting ex-communicated or sudden death.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users