[chuck-users] Are array types really classes ?

Michael Heuer heuermh at gmail.com
Wed Sep 2 19:54:07 EDT 2009


Cyrille.Damez at laposte.net wrote:

> I am currently learning Chuck, so I this may sound like a silly question. The
> language specification states that arrays are objects, but I can't find the
> proper syntax to declare a class that extends an array type.
> Since, as far as I understood, float[] is a reference to an array of floats, I
> was not really surprised that Chuck does not accept "class foo extends
> float[]", but what would the proper syntax be, if that is possible at all ?

Seems more likely that foo has-a float[] rather than foo is-a float[].
 I'm curious, what would you want to extend a float[] for?

If you are interested in collections-like stuff, LiCK has List,
ArrayList, FloatArrayList, etc.

http://github.com/heuermh/lick

Contributions welcome.

   michael


More information about the chuck-users mailing list