[nem-en] Increment and decrement operators
Philippe Quesnel
philippe.quesnel at gmail.com
Sun Feb 26 12:01:09 CET 2006
the +++ op would be nice for cases where we want to use the value,
but
this solution will probably not help people that expect ++ to return a value
your suggestion of a magical ++ that knows 'how to behave' would be really
nice.
(teach those operators some manners, will you .. so they know how to behave
! ;-)
On 2/26/06, Kamil Skalski <kamil.skalski at gmail.com> wrote:
>
> 2006/2/26, Sergei Tulentsev <sergei.tulentsev at gmail.com>:
>
> To make it clear: I'm thinking about adding new operators '+++' and
> '---', which would return values. Existing '++' and '--' would remain
> the same - they do not return value for purpose:
> if you have code like
>
> foo ();
> ++i;
> bar ();
> ..
>
> it is better to keep it like this and still do not get the warning
> about ignored value (returned by ++i)
>
> On the other hand, having ++ behave as expected by many would be very
> nice - maybe we should have a special case for ++ and -- so that they
> will return void in general, but if expected some value, they will
> return it...
>
> --
> Kamil Skalski
> http://nazgul.omega.pl
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20060226/556e90bc/attachment.html
More information about the devel-en
mailing list