[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: A "CJT" in python
> -----Original Message-----
> From: Andrew Cooke [mailto:andrew@xxxxxxxxxxxxxxx]
> Sent: 28 October 2000 20:07
> To: java-threads@xxxxxxxxx
> Subject: Re: A "CJT" in python
> jm40@xxxxxxxxx wrote:
> > Python can compile to Java bytecode (well, JPython can at
> any rate) and as
> > it uses the same object model as Java, it should be able to
> use JCSP and CTJ
> > straight away (it can access Java classes as if they were
> Python classes).
> [A language related aside]
> It's looking increasingly as though Python will move away from
> compatability with the JVM. There's a "stackless" version of the C
> based Python that is probably going to become the standard at some
> point. It's advantage is that, not using the C stack for any
> thread, it is much easier to do thread switching, handle
> etc. The disadvantage is that (apparently) it will be
> difficult to port
> to the JVM.
Oh well - the JVM really _isn't_ the ideal target for other languages - a
real missed opportunity for Sun in my opinion.
> I have no idea whether the stackless version will make CSP more
> important for Python or not - I have no experience of langauges with
> continuations (the only one I can think of is Scheme).
It would appear that the addition of continuations to the language would
make it quite possible to implement a very efficient CSP kernel as an add-on
package to Python. Having knocked out CSP kernels for C, Java and occam, I
can say that being able to add CSP functionality to a language without
having to delve into its innards would be quite refreshing. Continuations
look horrible as a general purpose programming tool, but they might have
their uses for the likes of us.
They already have a lightweight threads package based on this stuff
(http://world.std.com/~wware/uthread.html). I think these guys might be
quite receptive to our ideas - the package provides `queues' (buffered
channels a-like) and semaphores (oh well).