|
![](/i/fill.gif) |
On 10/06/2011 04:12 PM, Darren New wrote:
> That's not redefining the value of 3 and 6. That's redefining the value
> of Integer(3) and Integer(6). The expression "2 + 3" will still return 5.
>
> Note that in Fortran and FORTH at least, it's pretty trivial to make the
> literal 3 refer to the value 15. (By "pretty trivial" I mean "you might
> do it by accident.")
I think Smalltalk will also let you accidentally redefine 3 to mean
something else. (Certainly if you operate on array literals, it
permanently changes the literal to refer to something other than what it
says!)
Haskell will definitely let you define, say, 2+2=5. You'd be hard
pressed to do this "by accident" though...
Post a reply to this message
|
![](/i/fill.gif) |