Hacker News new | ask | show | jobs
by trjordan 4352 days ago
I think it's important to think of Pythonic as something that's subjective and evolving.

The C examples given are idiomatic in C. The reason they're idiomatic is because they fit with a mental model that most of the C community uses: data structures in an enumerated address space, and passing around hunks of mutable memory with handshake semantics. If your code interacts with code that was written with that in mind, life should be pretty good.

Python has the same sort of thing, but at a different level of abstraction: objects, frequently enumerated by identity, grouped together by user-defined abstractions, with the understanding that function side effects are rare, unless they're object methods.

Haskell is arguably cleaner / terser, but it's yet another set of idioms. The only thing that makes pythonic Python is that it's used by the rest of the community. It's a shared understanding that's neither better or worse than any other shared understanding.

1 comments

You can't have this both ways. Either what is 'Pythonic' is subjective and community-based AND your arguments about Haskell are also subjective and based on the Haskell community, or some things are just better than others both within Python and among languages.

But even in the second case, you have to do more than wave your hands around to show that Haskell is superior if you want to move beyond pure, substance-less snobbery. If you did that, you'd find that you were leaning on some assumed values - for example, the values of the Haskell community.

If all you have to say is that Python's values are subjective while Haskell's values are the actually important ones, this is really pure snobbery without any substance.

I don't think trjordan said anything like that.