[Haskell-cafe] Announcement - HGamer3D - 0.2.1 - why netwire

Ertugrul Söylemez es at ertes.de
Sat Mar 23 17:02:54 CET 2013


Heinrich Apfelmus <apfelmus at quantentunnel.de> wrote:

> You said that reactive-banana didn't feel as simple after the
> introduction of dynamic event switching, though. Could you pinpoint
> some particular thing that made you feel like that? Maybe a type
> signature or a tutorial or something else? I took great care trying to
> make the dynamic event switching stuff entirely optional, so you can
> use reactive-banana without understanding it at all, but I'm not sure
> if I succeeded.

I think this is less of an issue with reactive-banana than with classic
FRP in general.  The type signatures of Netwire can be scary at first
sight, but they are consistent throughout the entire library.  Once you
understand one of these type signatures you understand all of them.
Once you know how to use one wire, you know how to use all others.

Let me pinpoint something in particular: events.  In reactive-banana
events are special, in Netwire they are not.  This makes dynamic
switching special in reactive-banana and natural in Netwire.  Let me
show you an example:  You want to dispaly "one" for ten seconds, then
"two" for twelve seconds, then start over:

    myWire =
        "one" . for 10 -->
        "two" . for 12 -->
        myWire

Events and particularly dynamic event switching is one of the main
problems Netwire solves elegantly.  You can add this to reactive-banana,
too, but it would require changing almost the entire event interface.


Greets,
Ertugrul

-- 
Not to be or to be and (not to be or to be and (not to be or to be and
(not to be or to be and ... that is the list monad.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130323/512a7bf2/attachment.pgp>


More information about the Haskell-Cafe mailing list