Re: Adding setComment on SFieldMeta

Franck Routier <[email protected]> Mon, 05 Oct 2009 12:08:42 +0200
Newsgroups gmane.comp.java.orm.simpleorm
Organization Axège sarl
Message-ID <1254737322.13563.12.camel@franck-laptop>
Hi Anthony,

> 
> Hmm, I think you just made a good argument for not using the Enum!
> 
Well, I don't get you here...
You seem to assume everybody expects that keys in Maps are String, and
that no one will notice that SFieldProperty.PROMPT and "PROMPT" are not
the same objects !

I think on the contrary that using an enum object as the key for the
library's own "user" properties makes it perfectly clear that they are
internal to the library and will ensure that they won't conflict with
the user namespaces (be they "clever" Strings or any other object).
Moreover, users will use the setPrompt / getPrompt shortcuts, so they
will probably never notice what the key is.

> I suppose that different aps could use different enums, but the
> potential for confusion is high.
> 
On the contrary, enums are the perfect namespaces for Maps. Using
Strings with prefixes to try to mimic what enums do perfectly seems odd
to me...

What do you think I'm missing ?

Regards,
Franck






------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/