[e-lang] Newbie question
Mariano Montone
marianomontone at gmail.com
Fri Mar 31 09:48:51 EST 2006
Thanks. I will have to study E in more detail in order to understand some
things in your code (and I will). However I can realize that you are
building some kind of 'composite message' in the form of message list. I
wonder weather executing 'eventual code' may be possible (I mean, it
wouldn't break the E model). Something like:
def carRcvr := carMakerRcvr <- ("Mercedes")
carRcvr <- lambda(car){ car.moveTo(2,3)
car.moveTo(5,6)
car.moveTo(7,3) }
where lambda(car) {....} is an anonymous function that is executed
eventually over the car (don't know how to write anonymous functions in E,
or if it is possible)
Mariano
2006/3/30, Kevin Reid <kpreid at attglobal.net>:
>
> On Mar 29, 2006, at 10:00, Mariano Montone wrote:
>
> > How can I perform a sequence of message sends atomically, in a
> > transactional way, to a remote object? How can I get rid of
> > something like that under the E model?
> >
> > In the following example, I would like carRcvr to stay in place
> > between the moveTo messages.
> >
> > def carRcvr := carMakerRcvr <- ("Mercedes")
> > carRcvr <- moveTo(2,3)
> > carRcvr <- moveTo(5,6)
> > carRcvr <- moveTo(7,3)
>
> def sequence(target, messages) :void {
>
> def deliverer implements PassByCopy {
> to __optUncall() { ... }
> to run(target) :void {
> if (Ref.isEventual(target)) {
> target <- __whenMoreResolved(deliverer)
> } else {
> for message in messages { E.callWithPair(target, message) }
> }
> }
> }
>
> deliverer(target)
> }
>
> sequence(carRcvr, [["moveTo", [2, 3]],
> ["moveTo", [5, 6]],
> ["moveTo", [7, 3]]]))
>
> No existing E implementation supports 'implements PassByCopy' yet;
> without it this will still work for 'atomic' sends in a single vat.
>
> --
> Kevin Reid <http://homepage.mac.com/kpreid/>
>
>
> _______________________________________________
> e-lang mailing list
> e-lang at mail.eros-os.org
> http://www.eros-os.org/mailman/listinfo/e-lang
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://eros.cs.jhu.edu/pipermail/e-lang/attachments/20060331/d5eacc1d/attachment.html
More information about the e-lang
mailing list