4 ms·
> Is it the language, or someone forcing you to use that linter and settings? It's definitely both. Preface in true internet style: these are just opinions a
by KirinDave 7y ago
> Is it the language, or someone forcing you to use that linter and settings?
It's definitely both.
Preface in true internet style: these are just opinions and you may not share them. That's fine.
I really don't like Python as a language. I don't like its total lack of composability. I don't like its over-reliance on a very dated vision of OO. I don't like how its list comprehensions aren't generic. I don't like how it farms all its data structures out to C. I don't like how it uses cruddy one line lambdas and forces me to name things that are already named by the things I'm passing it to.
And also the linter just exacerbates these things, because the linter is just a crystallized slice of a kind of software engineering culture I really don't like.
- 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...)
- paganel 7y agoNot sure why Python’s list comprehensions not being generic might be such a great downside but just wanted to add that I personally think that they are perfectly fine just the way they are. For the context, I’ve been professionally writing Python code for 14 years now. I understand it’s not the perfect language but for quite average programmers like myself it does an excellent job of getting out of the way and of letting you focus just on the data, because that’s what programming is (or should be), i.e. managing and processing data. Like I said, it’s not the perfect language, it does not have Erlang’s pattern matching nor Lisp’s insistence on thinking about almost everything in a recursive manner, but you can at least mentally try to incorporate those two philosophies into Python once you know about them (and once you know about other similar such great programming concepts).
- ptx 7y agoIf by generic you mean able to use other types of collections, aren't generator expressions[1] the generic version of list comprehensions? List comprehension: a = [x for x in stuff if x > 1] Equivalent generic version: a = list(x for x in stuff if x > 1) With your own collection type: a = MyCustomCollection(x for x in stuff if x > 1) [1] https://www.python.org/dev/peps/pep-0289/ https://www.python.org/dev/peps/pep-0289/
- m45t3r 7y agoJust a point about linters. They are bad in every language (because everyone has different opinions on what they consider beautiful code). If you're having a burnout because the PR you just opened are being rejected by the linter you probably just make the linter apply the modifications automatically in pipeline. We used to hate the linter checks in my current workplace because it was really boring to fix the issues. Now the CI simple fix them, and nobody cares anymore.