Jeff said:
Howdy.
Well, howdy back, pardner!
Jeff said:
Granted-- it's [REBOL scoping rules] a little more involved...
I looked through the archive and couldn't find a formal description
of the scoping rules (I did find an enigmatic note from you that
said there were no rules, but I can't believe that is true).
There have been a lot of guesses as to how REBOL determines
the value of a variable, but no correct and coherent model has been
posited.
I'd have to say it is a *lot* more involved.
Jeff said, quoting the functional language FAQ:
Functional programming is a style of programming that
emphasizes the evaluation of expressions, rather than
execution of commands.
A functional language ... encourages programming in a
functional style.
Typical REBOL programs seem to be rife with global variables and
assignment commands (looking at examples on REBOL.COM and
REBOL.ORG). These are hallmarks of non-functional (dysfunctional?)
programming. I will grant you that typical network operations
such as sending and receiving email and web pages are, by nature,
command oriented, but look at the way REBOL encourages use of
the basic REBOL datatype, the block.
Commands such as APPEND, INSERT, REMOVE, CHANGE, CLEAR, POKE,
REPLACE, REVERSE, SORT, are provided in REBOL. Commands that
iterate over blocks like FOR, FOREACH, FORALL, are also provided.
However, expressions that map from blocks to values or blocks to
blocks are not present in the language (as an example, consider
the following hypothetical expressions:
map func [x] [1 + x] [1 2 3] => [2 3 4]
filter odd? [1 2 3 4 5 6] => [1 3 5]
interleave [1 2 3 4 5] [a b c d e] => [1 a 2 b 3 c 4 d 5 e]
prepend 'a [b c d] => [a b c d]
Note that these expressions would return new blocks rather than modify
existing ones.) These are the sort of expressions that one would
expect to find in a functional language.
Granted, you could probably write these functions in REBOL (although
with the funky scoping rules, it might be trickier than it looks),
but the point is that REBOL provides numerous COMMANDS to manipulate
data, but few EXPRESSIONS that manipulate data, thus REBOL can
hardly be considered to `encourage programming in a functional style.'
Thanks for illustrating that the WAIT function is similar to the
unix SELECT system call.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com