Post increment and decrement

monarch_dodra via Digitalmars-d digitalmars-d at
Thu Mar 12 03:14:02 PDT 2015

On Wednesday, 11 March 2015 at 17:23:15 UTC, welkam wrote:
> Observation Nr. 1
> People prefer to write var++ instead of ++var.

The root of your reasoning stems from this "observation", which I
argue is wrong.

The recommendation has always been to chose ++var, unless you
have a reason to chose var++.

> Because of all this why not make only one increment/decrement 
> operator and have post increment/decrement to be called by 
> template name, because it is a template?

Or, instead of creating a new semantic, simply use the existing
one. It really isn't that complicated.

More information about the Digitalmars-d mailing list