"Christopher Wright" <[email protected]> wrote in message news:[email protected]... > Sorry about the name... > > Tomasz Sowiński wrote: >> A blunt one would be screaming out an error whenever the compiler has >> trouble choosing an overload. Would it be too hard to live with? > > For programmers? It would be ugly. > > For the compiler? It would be ugly, and result in a lot of special-casing, > I feel. With current with statements, you start a new scope and add a > bunch of symbols to it. Using this proposed with statement syntax, you > don't create a new scope, so you have to add a step or three to resolving > symbols. > > Also, you'd have to find all possible overloads of a function and do some > semantic analysis on them before you could resolve the arguments. Overload > resolution becomes a lot more difficult. > > And what does the programmer gain? Very little. People seldom use enums, I > think.
I use enums all the time. But I don't mind prepending "MyEnumType." to enum literals. It would be nice to have a shortcut in clear-cut cases, but if it meant a bunch of special casing and such, I can certainly live without it.
