On Tue, April 10, 2007 4:18 pm, Stewart Stremler wrote:
>> For example, fork is conspicuously absent from Tcl
>> (but present in perl, and I'm sure perl's the better for it) mostly
>
> And present in Expect, as well as something called TclX, according to
> wiki.tcl.tk at least.
>

I did not know that. If we were to think real hard, we couyld probably
understand why expect needed fork.

>> because there is no need for it. Tcl lets you open slave interpreters,
>> safe interpreters, co-conspirial interpreters, and communicate between
>> them all, so fork-exec is just an unecessary level of complication. Why
>> manage all that when you can have a bunch of cakes all at the same time
>> and eat them too?
>
> Poking around at the web did not leave me with a clear picture about the
> interpreters, although that the "after" command is considered "unsafe"
> leads me to think that the other interpreters don't use fork.
>

They don't. AFAICT, the only real interpreter is rentrant, and the other
"interpreters" are those data structures that are the guts of the
interpreter's ... understanding of itself. Command tables, system globals,
introspection history, etc.

Makes inter-interpreter communication, safe interpreters[0], etc pretty
easy to implement, I imagine.

[0] A "safe" interpreter is one in which all the sharp objects have been
taken out of the drawer. No shells, no cd, nothing that would make it
dangreous to let an anonymous guest drive. They're used a lot in web
programming. Indeed, some let the guest write scripts or generate them.

-- 
Lan Barnes

SCM Analyst              Linux Guy
Tcl/Tk Enthusiast        Biodiesel Brewer

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to