[chuck-users] Intraspection - an example of what I'm attempting
signal.automatique at gmail.com
Tue Nov 9 13:08:42 EST 2010
2010/11/9 mike clemow <michaelclemow at gmail.com>
> Yes, I like this. Or a new type: Class.
> As long as the method of comparison is safe (as safe as the typing system,
> anyway), it makes tons of sense to do it.
I think it'd be safe; the "==" operator is only overloaded to deal with
identical types, I think. That is excepting the automatic and implied
casting of ints to floats, I believe.
> If we used className() and it returned an array of strings, would we get
> the entire hierarchy? I mean:
> a: Object
> a: UGen
> a: SinOsc
Yes! I think that makes at least some sense; it doesn't require any new
concepts, it's simple and it seems powerful. I also want that for UGen
connections. Iterating and -where needed- recursing as a way of dealing with
trees is very, very powerful. It might be more of a Lisp-style strategy than
a Java/C++ one but as far as I can see it can't do any real harm here and
it's not especially inconsistent with anything we have so far.
Of course I'm just making stuff up here, stuff I've had on my mind for quite
a while (especially the bit about the UGen Graph) but there may well be huge
holes it. By all means open fire on the plan and we'll see what bits keep
standing. Let's just blurt out ideas and let Ge do the sorting :¬)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users