3 ms·
> This post is surprisingly confused, it is phrased as a complaint about the language, then immediately degrades into CPython implementation-specifics that have
by the_mitsuhiko 12y ago
> This post is surprisingly confused, it is phrased as a complaint about the language, then immediately degrades into CPython implementation-specifics that have little bearing on the actual usability of the language itself.
You might think that, but you are very wrong and I should probably make that point in another blog post. These CPython specifics are enshrined in the language. While PyPy does not have the actual structs, it needs to implement the same user exposed API as it slots were used.
PyPy cannot just say "a + b" means "a.__add__(b)", it needs to implement the exact same dispatch logic that CPython has because people's code depends on it.
//EDIT:
> Ronacher seems to be advocating that we should punish the CPython implementation's traditional strong areas in favour of.. actually, he didn't even describe any vision that was impacted by his complaints.
Maybe I did not make my point very clear but the whole last paragraph advocates about trying a version of Python that abolishes the internal slot system.
- hosay123 12y agoOnce again, this sounds like a bug report, not a ranty blog post
- the_mitsuhiko 12y agoAnd what exactly should the bug report be? "I do not agree with design decision made 25 years ago, please make backwards incompatible change?".
- hosay123 12y agoThe first might be "Let's replace all use of tp_* with hash lookups", which I suppose would be closed quickly, amidst a storm of muffled giggles. But at least by then you'd know why the current implementation works the way it does. The next might be "__getattribute__ mechanism has surprising behaviour in common use-case" (which itself would imply having a use case where any of this mattered). This one might actually result in some productive discussion regarding a fix. Your second reply is basically a doc bug, one of "__getattribute__ optimization is not specified in the language reference" or "__getattribute__ optimization causes non-comformance with the language specification", either way, you would get the attention of the few people who can actually help you, rather than attention from the many more who can't
- the_mitsuhiko 12y agoYou're assuming I am not aware why the system works the way it does currently which is incorrect. I outlined what a Python could look like, not what I want the CPython guys to implement. I am perfectly aware that this is not going to happen.
- maxerickson 12y agoI think if you had titled the post differently you would have ended up with a lot less argumentation about how what you propose isn't a good idea for python. As it is, the title at least primes the reader to think you are asking for what you go on to describe.
- rdtsc 12y agoOk, what is the bug report? Can you post the bug report as you'd write from your perspective.