Does Python really follow its philosophy of "Readability counts"?

Paul Rubin http
Wed Jan 14 22:53:08 EST 2009


"Russ P." <Russ.Paielli at gmail.com> writes:
> I started looking at Scala a while back. It is has many nice features.
> It seamlessly combines object orientation with advanced functional
> programming. It is statically typed, but the types often do not need
> to be explicitly declared. It is fully "compatible" with Java, but
> (like Python) it is much less verbose and more elegant, typically
> requiring less (in some cases, much less) than half the lines of code
> for a given task.

I haven't examined Scala closely at all; my mile-high view was that it
was very ugly and closely bound to Java and that the main reason for
finding it interesting would be to interoperate with Java programs in
a JVM.  Since I didn't care about that, I didn't pursue Scala further.

> But I am reluctant to use Scala for several reasons. For example, it
> doesn't have "continue" and "break." The Scala folks claim they are
> unnecessary, but they are sure handy sometimes. Maybe my style is bad,
> but I use continue and break a lot, particularly continue. Getting by
> without them could be hard. The other thing is that Scala has no
> default arguments and no argument passing by keyword. Those are a
> couple of my favorite Python features. So I'm basically screwed.

I think in functional programming, "continue" and "break" lose some of
their importance since you normally don't code any loops at all (you
express iteration in terms of functions like "map").  

Anyway, you might look at Haskell, although it has its own weirdness.
This old paper might be of interest:

  http://www.haskell.org/papers/NSWC/jfp.ps



More information about the Python-list mailing list