[chuck-users] determining the type of an Object in code

Daniel Zinkevich dzinkevich at gmail.com
Wed Sep 3 18:50:31 EDT 2008


Hi list,

New here, and to ChucK in general, but I'm also working on a similar
collection class. Don't want to step on anyone's toes, Mike, let's talk
dzinkevich at gmail.com

DFZ


On Wed, Sep 3, 2008 at 6:29 PM, mike clemow <gelfmuse at gmail.com> wrote:

> I wanted to write a class that would abstract arrays like the
> Collection class in SuperCollider.  I guess I can't.  I would have to
> write a class for each type of object that I wanted to make
> Collections of.
>
> -Mike
>
> On Wed, Sep 3, 2008 at 5:17 PM, Kassen <signal.automatique at gmail.com>
> wrote:
> >
> >
> > 2008/9/3 mike clemow <gelfmuse at gmail.com>
> >>
> >> Hi list,
> >>
> >> Is there a way to determine an object's type programmatically?
> >>
> >
> > I don't think so, I thought for a moment that we could write a massively
> > overloaded function but then remembered arrays are separate types and
> >
> > int foo[ ];
> >
> > is a different type from
> >
> > int bar[ ] [ ];
> >
> > So we'd need a infinitely overloaded function...
> >
> > I'm not sure why you could need this. I'm not sure in what kind of
> situation
> > you would get a object from somewhere yet be unaware of it's type;
> because
> > of our strong typing I don't think we ever get such objects (which can be
> > nice yet is related to limitations as well).
> >
> > Could you illustrate the issue?
> >
> > Yours,
> > Kas.
> >
> > _______________________________________________
> > chuck-users mailing list
> > chuck-users at lists.cs.princeton.edu
> > https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
> >
> >
>
>
>
> --
> http://semiotech.org
> http://semiotech.org/michael
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20080903/f131053e/attachment.htm>


More information about the chuck-users mailing list