Implicit enum conversions are a stupid PITA
Nick Sabalausky
a at a.a
Thu Mar 25 12:43:25 PDT 2010
"Walter Bright" <newshound1 at digitalmars.com> wrote in message
news:hogavk$2ll7$1 at digitalmars.com...
>
> Good point. As I recall, we expended an enormous amount of effort working
> on template syntax, and I certainly feel that
>
> octal!"177"
>
> is far better than, say:
>
> octal<"177">.value
>
> but when I compare it to
>
> 0177
>
> that's just hard to beat. A customized syntax is always going to be better
> than a generic one.
I agree that "A customized syntax is always going to be better than a
generic one", all else being equal (hence my distaste for the enum-related
mixin stuff in other branches of this thread).
But I still very much fail to see how anyone can consider being able to
change a number's value simply by adding (or removing) a leading zero to be
anywhere remotely near "hard to beat". Though I suppose we've already tread
this ground 64 times before (oops, I mean "a hundred").
More information about the Digitalmars-d
mailing list