|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 2087] New: Merge stc.typecons.defineEnum with enum
http://d.puremagic.com/issues/show_bug.cgi?id=2087 Summary: Merge stc.typecons.defineEnum with enum Product: D Version: 2.014 Platform: All OS/Version: All Status: NEW Keywords: spec Severity: enhancement Priority: P5 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: arkangath gmail.com I find that nearly (if not) every enum in my code is defined using std.typecons.defineEnum for the toString() and fromString() functionality. I'd suggest moving this into the language itself. Like Objects, an enum will have a .toString property which does exactly what is defined on the defineEnum mixin. The fromString() isn't as important, but since we're at it, why not do the full round? Defining enums with this mixin wrecks chaos on IDE parsers, as I try to use "MsgType" as a variable type and the IDE's parser never knows of it. -- May 09 2008
|