[chuck-users] Intraspection - an example of what I'm attempting

Michael Heuer heuermh at gmail.com
Tue Nov 9 12:13:57 EST 2010

mike clemow wrote:

> Honestly, I've run into this a lot in the past and I'm familiar with this
> frustration.  I even hacked my own version of chuck in which each object
> responded to a .typeOf(); message that returned a string representation (I
> know, it's ugly) of it's class name.  I used this to make do smart casting,
> which I admit is still a huge compromise.  I still think that each class
> name (reserved word) should be able to represent itself.  Something to the
> tune of:
> if( myUgen.typeOf() == SinOsc ) {    // seems reasonable, right?
>     myUgen $ SinOsc => SinOsc s;
> }

I don't find that ugly, it's a cool hack.  What if the method were
called className()?

I vote for adding such to the git repo and push to get it added upstream.


More information about the chuck-users mailing list