Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Wouldn't it be non-deterministic in certain edge cases? (not a specific converter's behavior, but the general principle) Commented May 19, 2015 at 21:28
  • 1
    -1 Adding a third-party library that may not be what you want for basic String formatting may be overkill. Commented May 21, 2015 at 15:35
  • 1
    @user949300 copy the code, write your own or what ever. You're missing the point. Commented May 21, 2015 at 15:54
  • Can you elaborate on "the point"? "Let an enum be an enum and a string be a string" sounds good, but what does it really mean? Commented May 21, 2015 at 18:24
  • 1
    Enum provides type safety. He cannot pass "potatoe" as a color. And, perhaps, he includes other data in the enum, such as thr RGB value, just doesn't show it in the code. There are many good reasons to use an enum instead of a string. Commented May 21, 2015 at 20:33