[chuck-users] Problem with chuck language specification
Ge Wang
gewang at CS.Princeton.EDU
Fri Sep 16 01:25:13 EDT 2005
Hi Robin and all,
> Problem: Chuck language definition uses cap(), when it should use
> size().
This is a good point to bring up. For now, we use cap() instead of
size(), because cap() means capacity whereas size() may have more than
one interpretation. However, size() is on the way. We plan to support
push_back() and pop_back() operations on arrays (as you saw in the
source), which would increment/decrement 'size' and manage the capacity
automatically. For this case, size() would make sense (and would be
more consistent with STL).
If this naming turns out to be undesirable, we may modify it for a
future version.
Another problem: we are trying find a good solution for to get the size
of the associative array, and maybe a way to iterate through the map.
Ideally, this would be concise, clear, and does not conflict with
operations dealing with the vector portion of the array. Thoughts
anyone?
Best
Ge!
More information about the chuck-users
mailing list