On Sat, Nov 8, 2014 at 4:07 PM, Philip Nienhuis <address@hidden> wrote:
Juan Pablo Carbajal-2 wrote
Do we need to insert a blank after unary prefix operators?
should it be
if ! flag
For me it doesn't make sense, other wise we would have to write "-1"
as "- 1". Does anybody do that?
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
For me a space after "!" makes it easier to distinguish it from "l" (lower
L) or "1" or "|" (vertical line).
The core devs have decided this (space after !) to be the preferred style so
I just adhere to it (uhm, I try to).
"- 1" seems to work as well.
But it can be argued that a minus sign actually belongs to the following
number, just like a "+" sign would/could, rather than it being a unary
operator. So I'd say it depends on the context:
-<space><some complicated term> would make perfect sense; "-" is clearly a
unary operator there.
-<space>3 would make less sense (to me), I'd perceive "-3" as just a number
View this message in context:
So the Chicago boys support my feeling that unary operators are more
often understood as a modification of the symbol next to it, rather
than an operator therefore the blank is not natural (under this view).
Do we stick to the Chicago style or we have our own, and I have to get
use to add blanks after unary operators?