Hello [EMAIL PROTECTED]!
On 02-Gen-00, you wrote:
l> a) to be free to interchange 6 and (2 + 4) b) to have some
l> cases where you can't interchange 6 and (2 + 4)?
a) applies to purely functional languages, while b) applies to
REBOL and other languages that are NOT purely functional.
Personally, I prefer the REBOL approach, and I think there's a
fundamental difference between 2 + 4 and 6 --- the first implies a
calculation, the second doesn't. So, if you want to set 'a to 1,
you may do it with:
a: ((((1000 / 10) * 5) / 100) * 2) / 10
You are free to consider that equivalent to a: 1, but even if
the result is the same, the way you achieve it is not.
In the same way, the following code:
f: func [] [
print "Hello Ladislav!"
1
]
a: f
could be considered equivalent to a: 1, if you don't consider the
greeting you get on the console.
So, I think that code cannot be interchangeable with its
result, because code may do something else than just returning a
value. I simple cases, you may interchange them (this is called
simplification, or maybe optimization :-) ), but I think you'll
not want to trade a REBOL script for its result --- would you?
Regards,
Gabriele.
--
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC \ \-\_/-/ / http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o