Summary: Remove opPostInc, opPostDec
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD

The postincrement and postdecrement operators should be redefined in terms of
the preincrement operator.

Define x++, x-- as being identical to ++x, --x, 
except that it should be illegal to use the return value of x++.

In effect, this means that internally, x++ will become cast(void)(x+=1);

Currently, overloaded operators for opPostInc, opPostDec() always involve a
potentially expensive creation of a copy of the object, which is almost never
This useless and painful feature inherited from C++ can safely be dropped.
It's likely that there is no extant D code which uses this feature.


Reply via email to