Dan
2004-07-08 16:58:45 UTC
Hi,
Looking at the assignment 5 spec, it states that:
" An attempt to perform unary addition should be reported as an error."
I have to ask why? Shouldn't an unnecessary plus symbol simply be ignored?
This is the behaviour found in java. Also, it makes more sense for it to be
ignored from a mathematical point of view: 4, and +4 are the same thing, so
why should +4 cause an error?
Does implementing a unary plus cause problems elsewhere? or is this just to
make our lives easier? (if it is, thanks!)
--Dan
Looking at the assignment 5 spec, it states that:
" An attempt to perform unary addition should be reported as an error."
I have to ask why? Shouldn't an unnecessary plus symbol simply be ignored?
This is the behaviour found in java. Also, it makes more sense for it to be
ignored from a mathematical point of view: 4, and +4 are the same thing, so
why should +4 cause an error?
Does implementing a unary plus cause problems elsewhere? or is this just to
make our lives easier? (if it is, thanks!)
--Dan