[chuck-users] a few language questions

Michael Heuer heuermh at gmail.com
Fri Nov 9 14:48:50 EST 2007


Hello,

I have a few chuck language questions:

Is it possible to define a "growing" array?  The associative portion
of the array grows without bounds but I can't see how to do that with
the indexed portion.

Object @ list[];
for (0 => int i; i < 100; i++)
{
  Object o @=> list[i];
}

Is it possible to check a reference against null?

Object @ list[100];
0 => int size;
for (0 => int i; i < list.cap(); i++)
{
  if (list[i] is null?)
  {
    size++;
  }
}

Is there a "String toString()" or similar method on Object?  I wish to
override  "Expressions which represent an object will print the value
of that object's reference address".

Do reflective methods exist on the base Object type (its "Class")?
e.g.  Function[] getFunctions(); ...

Thanks,

   michael


More information about the chuck-users mailing list