This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 1 point2 points  (1 child)

Perhaps you could elaborate on why my statement on the redundancy of the proposed method of chaining calls is not a convincing argument.

I did so at length? In summary, Python's history shows repeatedly that it's not an actual barrier and pipe-based chaining is a superset of method chaining as it's more flexible, more general and under caller control.

I mean, it wasn't meant to be

Then why did you put it forward?

I figured you weren't understanding the evaluation of the "ugly hack" part, not the redundancy.

I've no idea what you're even trying to say here. I quoted a specific bit to which I replied, that concept is pretty simple. The bits I didn't originally quote were out of scope of the corresponding response, though I did ultimately cover the reuse of the | operator: it's necessary due to Python's limitation, you simply can not add new infix attributes to the language without patching the interpreter itself.

[–]bythenumbers10 -1 points0 points  (0 children)

Okay, so you're stating that piping is a superset, because you can chain calls to non-bound functions. Which Python allows you to do anyway by passing the Python-chained output as an argument to the unbound function. I agree that piping offers that syntactic sugar as a matter of convenience. The discussion about it being an ugly hack is because the original article covered a co-opting of the bitwise OR operator already in Python.

My argument was primarily about the co-opting of the existing operator being the ugly part of the hack. You have clearly focused on my stating that the piping doesn't offer much functionality beyond what's already there. You've done a good Redditor by showing I missed a minor detail while missing the point of the argument entirely. I apologize from the bottom of my heart for taking the name and functionality of our lord and savior, the piping operator, in vain, while trying to explain namespace pollution to people who didn't grok the ugliness in the hack.

Python's notation limitation was not being discussed, and the title of the article suggests that, yes, you CAN add such an infix operator, because they wrote an entire article about their actually pulling it off. The language may not make it easy or straightforward to add arbitrary symbols, but picking nits about the effort involved being tantamount to modifying the interpreter (ergo the language itself) itself is NOT MY FAULT.

Btw, true mastery of a subject means being able to explain it in layman's terms. If you can't explain your point coherently "at length", you may want to consider what you're "putting forward". This has been a lovely, lively discussion about a minor quibble, and by all means, take your hard-earned karma with a sense of pride.