Python & Go

Paul Rubin http
Fri Nov 13 04:08:39 CET 2009


Duncan Booth <duncan.booth at invalid.invalid> writes:
> > http://scienceblogs.com/goodmath/2009/11/googles_new_language_go.php
> > 
> Thanks for that link. I think it pretty well agrees with my first 
> impressions of Go:

It looks like a not-so-interesting C follow-on, but the article doesn't
describe any of the parallelism stuff.

> The lack of any kind of error handling, whether exceptions or
> anything else is, I think, a killer. When you access a value out of
> a map you have a choice of syntax: one way gives you a boolean flag
> you can test to see whether or not the item was in the map, the
> other either gives you the value or crashes the program (yes, the
> documentation actually says 'crash'). Both of these are wrong: the
> flag is wrong because it forces you to handle every lookup error
> immediately and at the same place in the code; the crash is wrong
> for obvious reasons.

Nah, exceptions are an ugly effect that gets in the way of
parallelism.  Haskell handles lookups through its type system; dealing
with lookup errors (say by chaining the Maybe type) is clean and
elegant.  Erlang handles it by crashing the process, and dealing with
the crash through a supervision tree that cleans up after crashes and
restarts the crashed processes.

> What that article didn't mention, and what is possibly Go's real strong 
> point is that it has built-in support for parallel processing. Again though 
> the implementation looks weak...

I'd like to know more about this; is there a link with a short
write-up?  I haven't gotten around to looking at the reference
materials.

> It has too many special cases: a lot of the builtin types can exist
> only as builtin types: if they weren't part of the language you
> couldn't implement an equivalent.

I'd also like to have seen a more serious type system, like ML's or
better.  But they seemed to really be after a fast, lightweight
compiler.

Anyway, it doesn't like even slightly intended to be in the same space
as Python.  It's more like a de-bureaucratized replacement for Java.



More information about the Python-list mailing list