[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: occam REPL
Hi Matt!
I look forward to catching up with you at CPA 2006! Will you be there?
I just checked, and was surprised to see that OCaml *does* have a
repl...
http://caml.inria.fr/ocaml/
Regardless, I agree with your bigger questions. I don't know who
would use it. I sometimes wonder if we're hoping to lure the wrong
community. Rather than lure the OO community, it seems to me the FP
community is closer in spirit to CSP. Hoare's text defines processes
functionally; recursion is natural for CSP process expression.
The vast majority of the OO community has been led astray! Java took
off because C++ paved the way, and C++ took off (rather than, say,
Smalltalk) because C paved the way. What existing language/
environment will pave the way for occam-pi? Possibly Python because
of the indentation? I don't know... :-) But C++ was never meant to
be an OO language, it was intended to support multiple paradigms, one
of which included support for OO constructs; but C++ was committed to
backward compatibility with C. Without this commitment, it's doubtful
it would have been widely adopted, and Stroustrup knew this.
Unfortunately, when Java benefited from simplifying the syntax and
semantics of C++, Gosling, et al., chose a stripped-down monitors
multithreading model (e.g., only one, implicit lock, instead of
multiple, definable condition variables per monitor). Peter tells a
frustrating story of his conversation with Gosling, explaining why
monitors were chosen over CSP.
By the way, DrJava has a very nice REPL environment for beginning
Java programmers, and the development team for DrJava (the Rice PLT,
not to be confused with the original PLT that developed DrScheme--the
research group split) uses DrJava to develop DrJava, so it's not just
for beginners. In fact, both PLTs are (the ones behind DrScheme and
DrJava) are developing functional OO introductions to Java through
the use of language levels (subsets of Java), restricting such things
as assignment statements (no mutation), etc. Both DrJava and DrScheme
(using the ProfessorJ learning languages) provide Java REPLs.
While on the surface a REPL for occam may not seem exciting, perhaps
there's a bigger picture here. If we can introduce CS1 students to
concurrency before they learn to fear it, we will be on the road to
real progress. I've heard Peter speak on several occasions how our
curriculum needs to be revamped to teach concurrency much earlier on,
that concurrency is natural, and that single-threaded computing in an
inherently parallel world is unnatural. I couldn't agree more. (Easy
to say now, of course; but the first time I heard Peter discuss this,
it was an epiphany for me!)
All of this is to say that having a REPL for occam may be *part* of
what's needed to convince the establishment that it shouldn't be
objects-first, but concurrency first! :-)
I realize I'm preaching to the choir here, but thanks for reading
this far...
Cheers,
Marc
On Aug 19, 2006, at 1:45 PM, Matt Jadud wrote:
Hi Marc,
Marc L. Smith wrote:
Hi everyone,
I've been following this most recent thread regarding a REPL for
occam, and Damian's last post triggered me to recall that there
*is* an experimental language within DrScheme that is an
implementation of Functional Reactive Programming. The language is
FrTime (pronounced "Father Time"), and I saw a demo of it a couple
of years ago. The demo showed off features that would appear to be
desirable for an occam REPL as this thread has discussed.
I think the bigger questions is whether a REPL is actually worth
the investment of time and effort? What problems does it solve? Who
would use it? Certainly, it would require a non-trivial investment
of time to convince the compiler to byte-compile on a line-by-line
basis, and for the TVM to support that kind of incremental
compilation in a sane way. FrTime has the benefit of expanding down
to PLT Scheme, which (as Scheme implementations go) was intended
for this kind of linguistic exploration.
Java took off just fine without a REPL. I don't think OCaml has
one, either... and, for that matter, Perl doesn't have a REPL, but
it has practically taken over the world of scripting. These
languages do just fine within their spheres. Someone would have to
convince me of why a REPL for occam is a truly interesting idea, as
it doesn't seem all that exciting to me.
Cheers,
Matt