[Newbies] enumerated types

Michael van der Gulik mikevdg at gmail.com
Mon Oct 6 01:38:16 UTC 2008


On Mon, Oct 6, 2008 at 2:19 PM, Mark Volkmann <mark at ociweb.com> wrote:

> Have I summarized this correctly?
>
> Smalltalk doesn't support the concept of enumerated types like in Java 5
> and above. Instead, the Smalltalk way is to:
> <snip>
>


What are you using enums for? I've never found I've needed them, often
because the need for them can be refactored away and you end up with cleaner
code.

Often I just use symbols (i.e. #red, #blue, #green). These are generic
descriptive names for thingies.

Gulik.

-- 
http://people.squeakfoundation.org/person/mikevdg
http://gulik.pbwiki.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20081006/b16e2218/attachment.htm


More information about the Beginners mailing list