Current thoughts on imperitive and functional hybrids 
Author Message
 Current thoughts on imperitive and functional hybrids

Hello!



Quote:
>I've been interested in functional languages off and on for over ten years
>now.  I guess I'm back in one of my "on" phases.

That is fine.

Quote:
>I'm curious as to what the current thoughts are on the need for imperitive
>features in functional languages.  I know this is an old debate, but I'd
>like to know where things stand at the moment.  I find pure functional
>programming in Standard ML or Objective CAML to be a thing a beauty, but
>the latter especially goes to great lengths to include FOR and WHILE
>loops, subscripting, mutable values, and so on.  Is this considered
>extremist within the functional community, or has there been a realization
>that keeping purely functional isn't a worthy goal?

Mixing imperative features into functional languages is not a very special
thing, there's always Lisp/Scheme as another great example besides ML
(be it SML or Ocaml).

But OTOH the referential transparency crowd is out and alive, for
example those doing Haskell. But there *is* a need for imperative
features - I/O is an imperative thing, and you can't call a programming
language without I/O support universal. Those wanting to keep
referential transparency use some ideas to incorporate imperative
features, that is I/O using synchronized streams (in fact just lazy
lists) of events and requests, continuation based I/O and monadic
I/O. Haskell now uses the latter form, and there are other imperative
features that can modelled in a referentially transparent way using
monads, too. If you are interested in that way of incorporating
imperative features into FP, look at the various papers at
  http://www.*-*-*.com/
for example. And if you want to look at Haskell, http://www.*-*-*.com/
is a good starting point :-)

Btw, arrays and subscripting aren't necessarily imperative features.
You can also define purely functional arrays as there are in the
Array module of the Haskell standard libraries.

Regards, Felix.



Sat, 20 Jan 2001 03:00:00 GMT  
 Current thoughts on imperitive and functional hybrids

Quote:

>I've been interested in functional languages off and on for over ten years
>now.  I guess I'm back in one of my "on" phases.

>I'm curious as to what the current thoughts are on the need for imperitive
>features in functional languages.

I think pretty much everyone agrees that imperative style features are needed.
The question is just how do you model them.  Languages like Haskell, Clean,
and Mercury provide these features in a referentially transparent way, so that
they don't interfere with the nice properties that purely functional programs
have.

Quote:
>I know this is an old debate, but I'd
>like to know where things stand at the moment.  I find pure functional
>programming in Standard ML or Objective CAML to be a thing a beauty, but
>the latter especially goes to great lengths to include FOR and WHILE
>loops, subscripting, mutable values, and so on.  Is this considered
>extremist within the functional community, or has there been a realization
>that keeping purely functional isn't a worthy goal?

There are still two camps, so I wouldn't consider either view extremist.
But the purely functional or purely declarative languages have been
increasing their expressiveness dramatically in recent years.  These
days you can do concurrent programming, use arrays, update mutable
variables, use GUIs, and so on, without needing to do anything impure.
Even things like exceptions and meta-programming (reflection) can be
modelled in a referentially transparent manner, although current
languages/implementations don't really address those issues as well
as they could.

--

WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"



Sat, 20 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Cobol imperitive?

2. PUSH-CURRENT and POP-CURRENT

3. good name for GET-CURRENT SWAP SET-CURRENT

4. functional.py 0.6 - Functional Programming in Python

5. non-functional syntax in a mostly functional language

6. functional.py 0.7 - Functional programming in Python

7. functional.py - functional programming in Python

8. functional.py 0.7 - Functional programming in Python

9. functional.py 0.6 - Functional Programming in Python

10. functional.py - functional programming in Python

11. Is RB3D Fully hybrid PC/MAC?

12. Diablo II hybrid...

 

 
Powered by phpBB® Forum Software