On Thu, 28 Oct 2004 13:47:45 -0400, lex@cc.gatech.edu wrote:
An issue with enumerated types is that they are hard to extend. What if you make a subclass, and want to have an extra choice available in the enumerated type? With raw symbols this is fine. With class-per-state this is fine. But with a Pascal-like or C-like (or ML-like!) enumerated type, you can only extend it by editing the original definition.
I feel like saying "And this is =my= problem somehow?" but:
-> I would be happy just to have it private to a class.
-> If it were exposed, why would extending it be so challenging? They're just integers underneath, eh? I guess there'd be some issues with passing an enumerated type. Hmmm.
Chuck is good at finding all the symbols that are available in an enumerated type. Point to a variable which holds the Squeak equivelant of an enumerated type, and, if Chuck can figure out what the code is doing, the type of that variable will be the list of possible symbols.
What is Chuck? What is the Squeak-equivalent of an enumerated type?