[Issue 9821] Smarter conversion of strings to enums
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 26 16:59:44 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9821
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #3 from bearophile_hugs at eml.cc 2013-03-26 16:59:43 PDT ---
(In reply to comment #2)
> Perhaps I'm being naive, but why not modify the current string-to-enum parse()
> overload so that it (1) first tries to convert using enum member names, as it
> currently does, and *only if* that fails, then (2) tries to convert the string
> to the enum base type?
This is a bad idea. It's much better to keep the semantics tidy, to avoid
troubles down the line.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list