Idea: swap with multiple arguments
ixid via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 24 02:21:07 PDT 2016
On Tuesday, 24 May 2016 at 01:18:05 UTC, Jonathan M Davis wrote:
> Hmmm. And I would have assumed that it rotated in the other
> direction. This is really going to need a very specific name
> like rotateLeft or rotateRight in order for it not to be
> error-prone.
>
> - Jonathan M Davis
Why would you assume it would rotate left? As a general rule to
avoid verbosity we could have a default assumption of things
moving in one direction and the inverse gets named. So we would
have rotate and rotateLeft.
More information about the Digitalmars-d
mailing list