On Wed, Jun 23, 2021 at 9:06 AM Soni L. email@example.com wrote:
On 2021-06-22 7:38 p.m., Chris Angelico wrote:
Have you actually tried designing this into a larger project to see what problems you run into, or is this something you've only considered at this trivial level?
- It's opt-in.
- It's designed to be used by a hypothetical extension methods module,
but without imposing any design constraints on such module. It could return a named function every time a given name is looked up (a la "bind the first argument" operator), or do dynamic dispatch based on types or ABCs (a la proper extension methods).
In practice, you don't def your own __dot__, but rather use someone else's "__dot__ builder". If you don't wanna deal with it, just don't use __dot__.
It's also useful for the occasional domain-specific language.
What I'm hearing from you is: "No". Lots of words to say it, but, the answer to my question seems to be no.