[nem-en] Increment and decrement operators
d
d at hell.art.pl
Mon Feb 27 16:02:41 CET 2006
On Feb 26, 2006, at 11:52 AM, Kamil Skalski wrote:
> 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...
Oh and while we're at it.. I recently wrote a piece of code, where
I had a list
of functions (I didn't get it from elsewhere, but had to write the
list by hand)
and among them I wanted to place some recursive ones, so using fun ()
was
not possible and since def f () returns void, I had to define a named
function
first and then put it's name on the list. If def f () returned the
defined function
in this case, there would be no need for this and the code would in
result be
more concise and readable. So the situation here is pretty much the
same,
as with the ++/-- operators.
It would be easy for ncc to guess in this case, that I wanted def f
() to return
the function instead of void.
Perhaps this could be handled similarly to ++/-- ?
regards,
d
More information about the devel-en
mailing list