Quoth Alexander Maryanovsky on Sat, Jun 07, 2003: > At 02:49 07.06.2003 +0300, Vadim Vygonets wrote: > >No, I meant "functional" as opposed to OO and other paradigms. > >But why is Pascal not a full fledged functional language, and > >what is the definition of one? (Examples of such languages are > >welcome as well.) > > I think what you're referring to here is "procedural", not "functional".
True. > A > functional language is a language in which functions are first-class > citizens - they can be created at runtime, passed as arguments to other > functions, returned by other functions, be held in lists or whatever else > you're used to doing with "ordinary" data types. Seems hard to implement in compiled languages. Forth kind of has it, but only when it's interpreted, not compiled. > Scheme and LISP are > functional languages, for example. > Here's a convoluted example of a function in Scheme. Try to guess what is > does :-) > (define foo > (lambda (n) (if (= n 0) > "Hello World!" > (lambda () (function (- n 1)))))) I can only guess certain parts, because I don't know Lisp... Vadik. -- Insanity is hereditary. You get it from your kids. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
