I'm intrigued that Python has some functional constructions in the language.
Mon May 11 04:33:04 CEST 2009
Carl Banks <pavlovevidence at gmail.com> writes:
> Syntax--the thing you claim doesn't matter--got in the middle because
> it was the main factor that drove the OP to look for alternatives to
I don't think so. The OP said that "... the syntax would be a lot
easier to understand, than most functional languages, like Haskell".
He didn't say that Haskell syntax caused him to look for alternatives
and didn't say that Haskell wouldn't still be difficult even if its
syntax were simpler. Hint: Liskell (Haskell with S-expression syntax)
is still difficult.
> yet people in the real world are out there trying to find
> alternatives because functional languages' syntax sucks so bad in general.
Again, I don't think so. Functional languages' syntax turns some
people off before they even look at other aspects closely, just like
Python's indentation-based syntax turns some people off. But, once
you get past the syntax, functional languages STILL present a lot of
obstacles that lots of users never get past.
> The reason the OP was asking about separating pure code from impure
> was to see if some subset of Python could be used as a pure functional
> language, that way they could employ Python and its already-much-
> better-than-Haskell's syntax as a pedagogical replacement for Haskell.
That wouldn't make sense at all. 60% of what makes Haskell different
(and harder) than Python is probably the complicated (but powerful)
static type system; 35% is the nonstrict evaluation strategy, and 5%
the syntax. If you somehow added a method in Python to separate pure
from impure code, but it was still a dynamic language with strict
evaluation, you'd only be 5% of the way to replacing Haskell.
More information about the Python-list