[IAEP] [support-gang] Which Language?

Kevin Cole dc.loco at gmail.com
Mon Sep 28 13:41:56 EDT 2009

On Sat, Sep 26, 2009 at 00:00, Caryl Bigenho <cbigenho at hotmail.com> wrote:
> Hi All,
> On Thursday, Ben wrote in the IAEP list:
> "My feeling is that the most important thing we can do in this area is to
> make it easy to write Activities that are intrinsically cross-platform.
> To borrow a phrase, one way to do this is to choose languages, and
> interpreters, that are incapable of expressing platform dependencies."
> So I have a question for you folks. I am in discussion with a college CS
> prof who would like to teach beginning programming with XOs. He is
> interested in trying several different languages, but I am interested in
> pointing him toward the one that would result in the most universally
> usable Activities with the idea that his students would be able to write
> Activities as class projects that could then be widely distributed.
> It would be great if they would be, as Ben suggests, cross-platform. By
> that, I mean usable on the XO-1, XO-1.5, SoaS, live CD, etc. for PCs
> and Intel Macs. Of course my dream ideal is that they would also be
> able to be run on the old PowerPC Macs that are still widely used in
> the public schools, but that is probably too much too hope for.
> So...the question is, what should I tell him?

My own reasons for joining the Python chorus:

1. It comes preinstalled on the XO, preinstalled on many, if not all,
Linux distributions, preinstalled on Mac OS X, and is a fairly easy
get for Windows.

The arguments that others have put forth for various languages --
Smalltalk / Squeak / Etoys / Scratch / FORTRAN / C / Java generally
are not quite as universally "built-in", though they can be obtained
for most systems.  (Java's sorta, kinda there: Sometimes you get the
whole deal, sometimes you get only the run-time environment by default
and have to fetch the other pieces.)  Also, as far as Linux is
concerned, it's nice to have a language has packaged for the package
management system used by Linux.  Some of the above are not available
in well-maintained packages, and have to be cobbled into the computer.

2. The classic first program: "Hello, world" in Python is:
        print "Hello, world"
    Or, for the nit-pickers out there, in Python 1.x, Python 2.x, it
is as stated above. In Python 3.x, it's:
        print ("Hello, world")
    Hard to get much simpler than that and remain readable to people
who are fluent in languages which read left-to-right, top-to-bottom --
i.e. non-Perl programmers and non-Lisp programmers. ;-)

3. An interactive interpreter:  You can either choose to create your
program in some text editor and then feed the saved code to the
interpreter (which is the way Activities run), or you can start the
interpreter, and have a "conversation" with it: Each line is
interpreted when you press <ENTER>.  This is great for testing out
small ideas quickly.  Other languages have ways of doing this but are
rarely as simple.

4. High school teachers teaching a first language class, NASA and
Google all seem to like Python well enough, which suggests a certain
degree of scalability.

5. Many -- dare I say most -- Activities are written in Python.  So,
one would have good models to work from by examining existing

The other languages proffered all have a place in the world, but given
the initial problem specs:

  1. Easy
  2. Write Activities
  3. Cross-platform

I think if you were to write your activities in any of the other
languages, in order to make them work in a Sugar environment, you'd
still need to have the Python interpreter handy.  You would not need
any of the other interpreters / compilers unless you were writing in
those languages.  So, within Sugar, Python can live w/o Java et al,
but Java et al cannot live w/o Python.  I think.
I think Python's the closest match.

Ubuntu Linux DC LoCo
Washington, DC

More information about the IAEP mailing list