CoffeScript adds a modulo operator %%

Asman01 jckj33 at gmail.com
Mon Feb 3 17:51:52 PST 2014


On Tuesday, 28 January 2014 at 10:55:08 UTC, bearophile wrote:
> The latest changes in the CoffeScript language have added a 
> built-in "%%" operator:
>
>> Correct modulo operator %% (respects negatives)
>
> https://gist.github.com/aseemk/8637896
>
> (In Python the % operator works in this correct way.)
>
> It's the same operator I suggested to add to D.
>
> Bye,
> bearophile

Wouldn't be better if the current implementation just extends to 
work with negatives instead of create a new one?


More information about the Digitalmars-d mailing list