I'm intrigued that Python has some functional constructions in the language.

Paul Rubin http
Sat May 9 21:51:20 EDT 2009


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> > So it's really true you can get rid of almost all Haskell expression
> > syntax.
> 
> And what you've got left is syntax. Without syntax, how can you tell the 
> difference between a meaningful character string and a jumble of random 
> gibberish? Without syntax, how can you tell where one token finishes and 
> the next begins?

I didn't say you could get rid of absolutely all of the syntax.  Just
most of it.  All that stuff you'd write in Python with loops,
if-statements, listcomps, etc. can be done with prefix function calls
in Haskell.

Haskell's type system, on the other hand, is much more complex than
Python's, and writing out type specifications does require some syntax.

Overall though, Haskell's syntax, either at the sugared or desugared
level, is not very complicated.  The hurdles to learning Haskell
really are because the concepts it contains are really different than
what most programmers are familiar with.  It's not like many languages
that contain familiar concepts wrapped in new syntax.



More information about the Python-list mailing list