From: briand@aracnet.com
To: Ville-Pertti Keinonen <will@exomi.com>
Cc: skaller@users.sourceforge.net, caml-list@pauillac.inria.fr
Subject: Re: [Caml-list] exene and ocaml ?
Date: Thu, 1 Apr 2004 21:09:03 -0800 [thread overview]
Message-ID: <16492.62831.800184.681344@soggy.deldotd.com> (raw)
In-Reply-To: <6C27A642-83BE-11D8-96B0-000393863F70@exomi.com>
>>>>> "Ville-Pertti" == Ville-Pertti Keinonen <will@exomi.com> writes:
>> Simple: there is no stack. Event handlers have to return, and
>> when they do the stack is lost.
Ville-Pertti> In Brian's specific example as I understood it, this
Ville-Pertti> would not be relevant.
Yes I think it would be. My example was just not very good.
Let's say you have a drawing program with different drawing tools.
Each tool must have local state as it constructs it's respective
graphic object. If the different events all invoke the procedure
separately, then that state _must_ reside outside of the routine.
In addition, if something happens to change state, i.e. the drawing tool is cancelled, there is no other way to communicate that other than by some sort of global variable.
It may be possible to adress these problems through the use of
modules, but the fact remains, that I can come up with a _much_
cleaner implementation with a persistent procedure than I can with a
standard event model.
As always, there is more than one way to do it, and certainly I can
get things done in the event model approach, but I think it's a
kludge.
Thanks for you comments.
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
prev parent reply other threads:[~2004-04-02 5:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-01 4:08 briand
2004-04-01 7:25 ` Ville-Pertti Keinonen
2004-04-01 8:19 ` skaller
2004-04-01 9:24 ` Ville-Pertti Keinonen
2004-04-01 14:08 ` skaller
2004-04-11 6:46 ` briand
2004-04-11 8:41 ` skaller
2004-04-11 9:02 ` Richard Jones
2004-04-11 9:26 ` skaller
2004-04-11 13:21 ` Ville-Pertti Keinonen
2004-04-01 14:34 ` skaller
2004-04-02 5:09 ` briand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16492.62831.800184.681344@soggy.deldotd.com \
--to=briand@aracnet.com \
--cc=caml-list@pauillac.inria.fr \
--cc=skaller@users.sourceforge.net \
--cc=will@exomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox