Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a fair complaint, but doesn't Python let you mix functional and imperative styles just as much?


It does, but the point is that with Python there's generally one "obvious" way of accomplishing something. With Scala, I found when tackling certain problems (and my memory is fuzzy here; like I said, it's been several months :)), no particular solution stuck out as obvious. I'd consider myself fairly expert in Python now, so it may well be that what I see as obviousness may well be (reasonably) deep domain knowledge... but I didn't find the curve with Python anywhere near as steep as Scala's.


It's not nearly as ingrained into the language as Scala. Python's functional tools are rather basic. My understanding is that Guido believed that adding too much functional style to Python risked making the language muddled, exactly as we're discussing. A prime guideline for the language has always been (from the Zen of Python):

> There should be one-- and preferably only one --obvious way to do it.

http://fold.sigusr2.net/2010/03/guido-on-functional.html

http://python-history.blogspot.com/2009/04/origins-of-python...

has some notes on the history of functional tools in Python, though not much reasoning.

> Curiously, the map, filter, and reduce functions that originally motivated the introduction of lambda and other functional features have to a large extent been superseded by list comprehensions and generator expressions.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: