[GUI] Streams

Nick Name nick.name@inwind.it
Tue, 11 Mar 2003 02:24:51 +0100


On Tue, 11 Mar 2003 00:40:38 +0100
Daan Leijen <daanleijen@xs4all.nl> wrote:

>  I do think it is an interesting subject, and I encourage you to
>  pursue your ideas and create a working implementation to show and
>  discuss. Maybe you can even work together with other people to find
>  the right abstractions.

Oh, yes, my e-mail was meant to G.Russel AND of course anybody else who
wants streams. And was meant to take the streams issue outside the GUI
list.

But, as I said, the GUI team has to leave the road open to a streamed
implementation, wich means "abstract over your state".

So, in conclusion, I am just looking for people to write this stream
library together, not proposing to solve issues here; sorry for not
having expressed myself well.

Now, if there's someone who cares, I want to give my last contribute to
this discussion, or better said monolgue :)

Maybe I am wrong, but it seems to me that streams appear something like
a research topic to the eyes of some people.

I would like to point out that streams are nothing new, and nothing
badly understood. The implementation details, and a general framework,
are the goals of my proposal, not to study something simple, wich has
been there for years. 

Streams are not a new topic in functional programming. Sometimes they
are called "Dialogues". See for example this article

http://citeseer.nj.nec.com/jones93imperative.html

in wich SPJ and Wadler are *introducing monads*. The previous
alternative where streams, indeed. 

The reason why monads have been introduced is that streams are
uncomfortable in many situations, but think about the function
"hGetContents" or "readFile", or "getContents". They are just useful in
some situations, where you are coding a purely functional algorithm, but
need to feed it with non-deterministic input.

I repeat: streams are not FRAN, they are nothing new, just a common
pattern in lazy functional programming. When a common interface is
decided, by G.Russel, me and M.Chackravarty, by the GUI team or by
anybody else, I *hope* the "standard haskell GUI library" will have a
stream-based interface, since without it the entire program is being
compelled in the IO monad, wich is not so easy to code, and not so
readable.

I hope to have not bothered or annoyed anybody, because I am here to
cooperate (for what I can), not to annoy ;-)

And, of course, I would have never proposed myself to do a job, if it
was not easy to do, and if it was hard to understand from a theoretical
point of view.

Vincenzo