[GUI] Haskell GUI examples
Tue, 04 Mar 2003 20:48:39 +0100
On Tue, 04 Mar 2003 20:23:49 +0100, George Russell <firstname.lastname@example.org> wrote:
> Forgive me for boasting but it seems clearer, simpler and shorter than any other of the examples
> codings on John Meacham's website.
That is just because you are used to it ;-)
> The closest competitor seems to be GIO.
I am flattered but I still view GIO as an *experiment* to get a feel
of how a medium-level GUI API should look like, so it is not nearly
a competitor to a real library.
btw. Maybe you should make the objects the last argument
of instance functions. That way, you can use an object oriented
style of programming (if you like that):
infixr 0 # -- matches nicely with ($)
(#) :: self -> (self -> a) -> a
self # f = f self
main = do mainWin <-initHTk [text "Hello World"]
label <-mainWin # newLabel [text "Hello World"]
button <-mainWin # newButton [text "Bye"] ...