[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Poison

> > 'Poisoning channels' will be supported by CTJ in the next upcoming
> > revision.
> Excellent!
> I suppose you will also implement "Poisoning Processes" via the
> exception handling mechanism.  Implementing this means introducing
> a standard structure to distribute the poison as the moment the
> exception is caught.

I raised this "poison" issue as a throwaway remark on whether to include
a termination/resetting mechanism into the 1.0 release of JCSP.  It's
certainly stirred up good discussion and ideas.  It looks pretty easy
to do now ... but I'm gonna let things settle down before making any firm
decision.  Ought to experiment with it first ...

One flag that Sun's javadoc/javac tools could do with is "experimental".
This would be like "deprecated" - i.e. warnings would be issued by javac
on any codes using the "experimental" classes/methods/exceptions/etc.
It would have a very different psychology behind it:

  "deprecated" ==> dodgy stuff, don't use, may be withdrawn next release ...

  "experimental" ==> new ideas, try them and feed back experience, may be
                     withdrawn next release ...

If we had "experimental", I'd not hesitate to include it!

>   "... is fully supported by the Occam philosophy."

Actually this was:

<   "... is fully supported by the occam philosophy."

meaning the simplicity, correspondence with human intuition about the way
the world works (the Newtonian approximation, at least) and sheer good
engineering of the occam *language* - as opposed to the philosophy of good
old Bill.  Although I guess the match with the principles of Occam's Razor
is pretty good:


So, despite the semantic complexities introduced by exception handling,
its application (for termination at least) on processes trying to use
a poisoned channel seems quite understandable - so there ought to be
a (formal) semantics out there that simply captures it ...

Of course, Gerald's quote:

> David May once said in a discussion panel something like "It takes no
> skills to add more functionality, but it takes skills to leave things
> out which are not really necessary". Now that is what I call occam
> philosophy :) ...

always needs remembering.  It's just the difficulty of making the "is-it-
really-necessary" judgement ... we keep getting it wrong!