On Sat, Aug 24, 2002 at 12:58:45AM +0900, William Djaja Tjokroaminata wrote:
> Hi,
> 
> Thanks for sharing your thoughts.  Is it really true that Ruby is in many
> ways a functional language?  I know that Ruby was influenced to a certain
> degree by Lisp, but can you elaborate on this further?  If Ruby indeed has
> some functional language nature, I will nominate Ruby as "the ultimate
> functional language" :), just like one C course instructor called C as the
> "ultimate assembly language".

Some people say the essence of functional programming is having no side
effects, some think it is having higher-order functions.

Ruby has side effects, but *ML has too and it's generally thought of as
functional. But Ruby does also allow higher-order functions, even though
functions aren't first-class, via proc. Code blocks are sure cool! 

Ummm, what would a non-side-effects Ruby look like? It would probably be
some kind of Lisp with a real syntax :)

As for lazy evaluation and dynamic (or static) typing, they don't seem
to be defining criteria for what being functional is.

Anyway Lisp, often cited as THE functional language, is typeless and
thus closer to Ruby than statically typed languages. Another argument to
sustain our claim of Ruby being a great functional OO language!

-- 
 _           _                             
| |__   __ _| |_ ___ _ __ ___   __ _ _ __  
| '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ 
| |_) | (_| | |_\__ \ | | | | | (_| | | | |
|_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_|
	Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com
  
> Alan Cox wrote:
[..]

No I didnt.  Someone else wrote that.  Please keep attributions
straight.
	-- From linux-kernel