[Edu-sig] java

Terry Hancock hancock at anansispaceworks.com
Wed Oct 15 20:01:47 EDT 2003


On Wednesday 15 October 2003 01:29 pm, Kirby Urner wrote:
> > Yes, Python and OCaml are excellent alternatives to Java.  Both present an
> > environment where the cost of playing around with the language is very low
> > --- their interactive interpreters allow for casual experimentation. 

> But Jython fixes that shortcoming.

Of course, Jython is Python, not Java from the programmer's POV, no
matter that it is written and interpreted in Java.

> I think you've hit the nail on the head though:  it's having an interactive
> interpreter that makes all the difference.  Non-CS majors trying to be
> productive in their own disciplines should be given an interactive language
> to learn (Mathematica and Matlab also qualify, as does J).

Absolutely -- I think this is the single strongest advantage of Python as far
as ease of use goes: it's faster to experimentally verify behavior in the
interpreter than it is to look it up in the manual.  It's the only language I've
used for which that is true (with the possible exception of the BASIC
interpreters I started on some 20+ years ago).  Add to that that Python
is a full-fledged language with support for structured programming,
object-oriented programming, and functional-programming models,
and it's just a real breeze to get going in.

I've also just used Python as a shell, tinkering with word games and
so on -- such as "collecting the 400 most commonly used words of
more than 3 characters appearing in selected project Gutenberg
texts," which I did without formally creating a program, but just
tinkering with objects in the interpreter.  It's also pretty cool that Python
is forgiving enough to let you do something like:

words = open("jane_austens_collected_works.txt", 'r').read().split()
uniq_words = {}
for word in words:
   uniq_words[word] += 1

without choking your computer. ;-)
(Yes this is an imperfect result -- I actually did a bit more than this
when I did it -- I was compiling an "ignore" list for a mnemonic id
generator, in which I wanted to throw out common words and
preferentially keep the more unique words in a title).

This tolerance of blunderingly inefficient (but conceptually obvious)
approaches is also what made IDL nice in astronomical work.

I haven't tried some of the other languages you mention, so I can't
say that Python is better than them, but it's certainly a good place
to start, and it does a lot of stuff well.  I also have a very warm
fuzzy feeling knowing that Python is both free and Free, and therefore
I don't have to worry about losing it or being left behind so much.

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



More information about the Edu-sig mailing list