Hi John,

you wrote:
>Or perhaps REBOL is closer
>to classic procedural languages such as Pascal and Basic, than
>it is to classic `functional' languages such as Erlang, Haskell.
>

With respect to Haskell:

>From "Introduction to Functional Programming using Haskell", second
edition, Richard Bird, Prentice Hall Series in Computer Science, Chapter
10, page 325:

"This chapter introduces a new style of functional programming called
monadic programming. Monadic programs provide a simple and attractive way
to cope with interaction in a functional setting. But, as we will see, a
monadic style of programming is capable of much more: it provides a
structuring mechanism for dealing with a range of problems, including
exception handling, parsing and state-based computations. In a sense, a
monadic style enables one to write functional progams that mimic imperative
programs, those programs constructed in imperative languages such as Pascal
and C.
We begin by considering a particular monad, the input-output monad IO
<alpha-char> ..."

Perhaps REBOL - like Haskell - supports a "new style of functional
programming called monadic programming." Probably that is what makes REBOL
programming so "simple and attractive" and allows REBOL to "cope with
interaction in a functional setting". 

If REBOL supports mechanisms similar to Haskell's monadic programming, you
should not be surprised to find that REBOL - like Haskell thanks to monadic
programming - is "capable of much more: it provides a structuring mechanism
for dealing with a range of problems including exception handling, parsing
and state-based computations". 

"In a sense" one could say that like Haskell's "new style of functional
programming called monadic programming", REBOL also "enables one to write
functional programs that mimic imperative programs, those programs
constructed in imperative languages such as Pascal and C."

With respect to Erlang:
You refer to Erlang as a "classic 'functional' language". The authors of
Erlang appear to have had a somewhat different categorization in mind. In
"Concurrent Programming in Erlang", Second Edition, Joe Armstrong, Robert
Virding, Claes Wistroem and Mike Williams, Prentice Hall, p. 2, they write:

"We have freely borrowed ideas from declarative and concurrent programming
languages. The early syntax of Erlang owed much to STRAND [?], though the
current syntax is more reminiscent of an untyped ML. The model of concurrency
is similar to that of SDL [?].
Our goal was to produce a small, simple and efficient language suitable for
pro-
gramming robust large-scale concurrent industrial applications. Thus, for
reasons
of efficiency, we have avoided many features commonly found in modern
functional
or logic programming languages."

Erlang, a language, whose designers confess to having avoided "many
features commonly found in modern functional languages", should not be
considered as  protoype for functional languages, especially since its
designers compare it to ML, which admits to having been designed as a hybrid:
"Standard ML is a functional programming language, in the sense that the
full power of mathematical functions is present. But it grew in response to
a particular programming task, for which it was equipped also with full
imperative power, and a sophisticated exception mechanism." (The Definition
of Standard ML, REVISED, The MIT Press, page ix).
With catch and throw (see Erlang op. cit. chapter 7/7.1) - amongst other
mechanisms - Erlang contains some of those language constructs you quote as
an objection to Jeff's statement that REBOL is a functional language.

Which programming language do you usually use and what is your point in John?


Elan

Reply via email to