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

Re: bytecode unification for scripting languages



Michael Vanier wrote:

> "Sorta-kinda-open source" is not the same as open source.  

I was speaking loosely.  As I understood it, they were planning a
FreeBSD-style, rather than GPL, license agreement.  If you want to
throw bombs at that, I'm a bad target; I'm sure the FreeBSD people
would be happy to take on any claims that they're not sufficiently
Open Source, though.

>							     The Mono project
> (http://www.go-mono.net), if it happens, might overcome this objection.

Yeah, I've seen pointers to this before.  If it happens.  The Open
Source world works in funny ways.  You need source to attract hackers;
you need hackers to build source.  Linus did it the right way around.
Notice that already this project is having the rug ruffled under its
feet by Parrot.  Half the resources => 1/4? 1/8? the quality.

> However, a separate issue is whether the same intermediate language will
> work equally well for statically compiled languages like C# and java and
> for dynamic languages like most scripting languages and scheme.  

As Matthias points out, this distinction is not very meaningful.  As
Bob Harper would say, Scheme is trivially typed: all expressions are
of type TheSchemeType, where

datatype TheSchemeType = Number of ...
                       | Pair of TheSchemeType * TheSchemeType
                       | Function of TheSchemeType list -> TheSchemeType
                       | ...

All primitives return values of TheSchemeType.  All primitives consume 
only the appropriate variants:

  car : Pair -> TheSchemeType

and you're "done".  All the tagging and casting is exactly what a
Scheme implementation does anyway.  Add these explicit annotations,
and you've got a program ready to run on a "statically typed" VM.

>								   For
> instance, how hard will it be to implement scheme efficiently on top of
> CIL/CLR?  If it's easy, then you're right; there's no reason to needlessly
> duplicate functionality.  

No harder that I can see than it would be to implement it on top of a
VM that is somehow designed for "dynamic languages".

>			    OTOH I can imagine that a portable bytecode
> designed explicitly for highly dynamic languages might be a very different
> beast.

I can't.

> Well, PLT scheme is open source, as are perl, python, ruby, squeak, Linux,
> the Gimp, Gnome, FreeBSD, etc. etc. and I think there has been a
> considerable amount of innovation there.  

I'll withhold my opinion on the amount of innovation in many of those
projects.  Your comment on PLT Scheme is rather misleading.  While
several people do very helpfully contribute bug reports and patches,
the ratio of development done globally as opposed to in a small number
of centers with high communication is virtually zero.  If PLT Scheme
were to come with a totally different license, it might affect our
user base, but I doubt it would affect the "innovation".  That
innovation came not from a Open Source bazaar but from motivated grad
students working for a terrific advisor.  I think simply labeling it
an "Open Source" project, and pointing to it as an example of
innovation, is extremely misleading.

Shriram