4 ms·
It can also be: x <- x + 1 x := x + 1 But I guess since assignment is more frequent than equality checks, most PL designers opt for using equals. I do like R
by goatlover 9y ago
It can also be:
x <- x + 1
x := x + 1
But I guess since assignment is more frequent than equality checks, most PL designers opt for using equals. I do like R's left arrow assignment operator. If only keyboards had a default arrow character key. It would completely get rid of a class of errors based on forgetting the second equals sign.
- user5994461 9y agoA sane compiler always give a warning when doing a comparison outside a condition and when doing an assignment within a condition.