4 ms·
> I don't like how its list comprehensions aren't generic. Python iteration is generic. https://docs.python.org/3/reference/datamodel.html#object.__iter__ htt
by futureastronaut 7y ago
> I don't like how its list comprehensions aren't generic.
Python iteration is generic.
https://docs.python.org/3/reference/datamodel.html#object.__iter__ https://docs.python.org/3/reference/datamodel.html#object.__...
Please don't spread FUD.
- KirinDave 7y agoI'm thinking of generic in the sense of monadcomprehensions, sorry. > That's an implementation detail of CPython. I don't see how it's important for a language user either. Jython uses Java objects. PyPy uses RPython. This strengthens my point though? > Please don't spread FUD. This is that culture thing I'm talking about.
- futureastronaut 7y agoI'm not really sure what your point is in criticizing "farming" to C. > This is that culture thing I'm talking about. You made a false claim. You referred to Python iteration as not generic, when what you really meant is that Python lacks first class monad support. If you want a monadic programming model, you're not going to be a happy camper in the Python world. But I doubt that comes as a surprise.
- KirinDave 7y ago> I'm not really sure what your point is in criticizing "farming" to C. If Python is so great how come it can't even express a decent data structure that it needs? I'll happily level the same criticism at Ruby if you like. > You made a false claim. Firstly: This is not High School Debate Club. There isn't some kind of point system. Language and expectations like this are not only counterproductive (in that they essentially turn every conversation into a series of verbal ripostes in which the goal is to be most right rather than *learn the most) they're also tedious and unwelcome. > You referred to Python iteration as not generic, I did not. I said list comprehensions weren't generic, and then I tried to explain my complaint. It may be that someone has done a legendary feat of going through and creating a bunch of mixins for some of the gaps in the list comprehension coverage such that you can find some way to override how non-determinism is expressed. If so, please point me to it.
- CogitoCogito 7y ago> If Python is so great how come it can't even express a decent data structure that it needs? Why is this a requirement of a "great" language? By not requiring a language to be self-hosting, you are adding more degrees of freedom to your language's design, so I could even see an argument that writing it in C is an improvement. I don't necessarily agree with that, but I don't see why cpython written in C implies it is a bad language. Maybe you could elucidate your thinking?
- pvg 7y agoyou are adding more degrees of freedom to your language's design Why do you think that? Languages/runtimes with high C integration and fairly exposed C bowels like Python and Ruby have, over time, turned out to be very hard to evolve compatibly.
- CogitoCogito 7y ago> Why do you think that? Because it's a fact? With cpython you can develop things in python if that suits you or C if that suits you. You have more freedom to choose what fits your use case. I'm not saying this is necessarily good, but I don't think it's obviously bad. I'd like to hear from people who think it's the case. > Languages/runtimes with high C integration and fairly exposed C bowels like Python and Ruby have, over time, turned out to be very hard to evolve compatibly. That is true, but it's also arguably one of the reasons cpython became so popular in the first place. The ability to write C-extensions when appropriate has been very powerful. It's certainly caused issues, but I think if python didn't have exposed bowels it may never have become nearly as popular. What if numpy wasn't ever written? (This isn't to say that they couldn't have exposed a better C-api with fewer issues, but hindsight is 20/20...)
- pvg 7y agoI guess I don't understand how 'the design gets stuck in amber' (which you seem to agree with) and 'gives you lots of design degrees of freedom' can be true at the same time.
- monadgonad 7y ago> You made a false claim. You referred to Python iteration as not generic, when what you really meant is that Python lacks first class monad support. Are you really that lacking in self-awareness that you responded to someone annoyed about programming culture by going full "debate with logic, facts and reason" mode?