Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] exene and ocaml ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: briand@a...
Subject: [Caml-list] exene and ocaml ?

I'm new to ML and have been wondering the ML landscape looking for
nifty ML related tidbits when I ran across exene (http://people.cs.uchicago.edu/~jhr/eXene/).

Has anyone in the ocaml community ever even considered porting this to
ocaml ?  I noticed that it requires threading.  Does anyone have an
opinion as whether ocaml's threads would be compatible with such a
system ?

Thread based gui implementations are the way to go (aren't they ?)

I have been working with labgtk and I've noticed that it suffers from
the underlying limitations of gtk, i.e. it's pure event based.  So
consider an interactive routine to draw a line:

event mouse_button:  draw_line with mouse_button event
event_key: draw_line with key_event
event_motion: draw_line wtih motion_event
...

draw_line event_variant :

dispatch on event

  do something with a GLOBAL variable (or module local ?) !

  pass state information back to main routine to signal change of
  state, e.g. escape key has stopped line drawing mode


YUCH.

Consider the much more elegant and functional implementation:

new line = draw_line event_stream

draw_line event_stream
  consume events until done
  return tuple (success/fail, line object)

I'd rather program the second way.  I think exene lets you do that.

I think that maybe a fudgets style interface might also work well, but
I have a harder time understanding how fudgets work.

OK, well I've used up by nightly bandwidth for the caml-list.

Thanks

Brian


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners