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

RE: A plea for a new old language

Dan Sugalski writes:
> At 10:17 AM -0700 5/7/03, Brent Fulgham wrote:
> > Personally, I think you should just *do* it!  Imagine what a
> > "feather in the cap" you would be creating for advanced languages
> > by introducing such a feature into Parrot....  Plus you would
> > instantly make Parrot so much cooler than any other alternatives.
> > :-)
> This has been a pretty common response (well, except for Shriram :)
> but it suffers from the problem that prompted my initial mail--while
> I *could* do it (and am sorely tempted) I'm not sure I *should* do
> it. The point of Parrot really isn't to put feathers in any cap,
> it's to build an engine to run Perl/Python/Ruby. It's a volunteer
> engineering project and if I put in features that the folks
> volunteering don't understand or are uncomfortable with then there
> will be problems--either the feature that's not understood will rot
> (if it's optional) or folks just won't want to help (if it's
> required). Enthusiasm about the engine may help some folks push past
> the initial resistance, either ignorance of or aversion to some of
> the core concepts, but there's a limit to what I'm comfortable
> pushing.

I think you're right, actually. 

However, I'm not sure why you feel the need to use CPS. Parrot
heap-allocates all its activation records, right? If that's the case,
then implementing call/cc directly is both trivial, and fast. Now, you
can define yourself a small "core Perl", and then define the features
you want (like coroutines and backtracking) in terms of a syntactic
translation from real Perl to core Perl that uses call/cc to get ahold
of the continuations.

If this turns out to be slow, then work on (for example) making the
garbage collector faster, or improving the representation of the call
chain, rather than doing fancy static optimizations right out of the
starting gate. You can be pretty sure the feature won't rot, either,
because basic stuff like exceptions, iterators, and break statements
will need it.

Neel Krishnaswami