[REBOL] Re: Newbie expression question
From: bry:itnisk at: 12-Oct-2003 16:09
> are equivalent, so why is it that so
many of us have learned to
> feel more comfortable with
>
> foo > 100
>
> than
>
> 100 < foo
>
> in our programs? Is it because
our "natural language" habits make
> us subconsciously think of the expresson
(s) above as being more
> about FOO as the subject of the
sentence, rather than about the
> relationship between two equally-
important values?
I think it's because with foo you've
assigned a value to something, in doing so
you are implicitly stating that foo is the
more important element.
I may also be wrong about this but it seems
to me that with iterative languages it's a
little more natural to use >, and with
functional languages a little more natural
to test if the value is <. This is probably
just a habit I have, but with recursion I
tend to subtract (I don't know why, but I've
noticed it). So you have a greater feeling
of naturalness in your example because the
first element is one assigned a value by the
programmer, whereas the second is
intrinsically valued.
If one had
foo > bar
and
foo < bar
then I start thinking, we're gonna be
looping, and we're gonna be recursing in
turn, and the naturalness of the examples
depends on how I think of using the language.
This however is probably a really weird
personal idiosyncracy.