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

Re: job control for the es shell



Mikael Eklund wrote:
> I remember what Paul said about jobcontrol many years ago.  He felt it
> didn't fit in with the functional programming style of es.  He wanted
> to add a feature called `first class continuation' before jobcontrol
> could be added the right way.
First class continuations would be nice, but I don't think they are
essential for an interactive shell*. But tail recursion would be really
nice.

> Since then, I've had an idea that each internal command sequence (also
> possibly containing external commands) should run as its own thread.
> If I ever find the time to really learn threaded programming, this
> would be a nice project. :-)
This would be very hard, because of numerous global data structures,
which then must be properly locked. And what would be the benefits of 
multithreading? IMHO, in a not too specialized programming language, the
default behaviour should be the serial execution of successive commands.
Otherwise
~> x=Hello World!; echo $x
would give unpredictable results.

Greetings, Olaf

Footnotes:
* Standard disclaimer: Job control isn't essential, as well. But I want
  to have it :-)

-- 
+----------------------------------------------------------------------+
I Dipl. Phys. Olaf Rogalsky                 Institut f. Theo. Physik I I
I Tel.: 09131 8528440                       Univ. Erlangen-Nuernberg   I
I Fax.: 09131 8528444                       Staudtstrasse 7 B3         I
I rogalsky@theorie1.physik.uni-erlangen.de  D-91058 Erlangen           I
+----------------------------------------------------------------------+