Hacker News new | ask | show | jobs
by zander312 1461 days ago
Love the idea, definitely will use.

But wondering why it's using ">>". I'm not great with Python. How does this ">>" thing work and why does it make sense to associate elements with ">>".

1 comments

Python has dunder methods that allow you to override behaviour (eg operator overloading, hashing, object identity etc).

In this case they’re overriding bitshifting. In terms of why, it does feel like a natural visual choice.

https://github.com/mingrammer/diagrams/blob/master/diagrams/...

operator overloading. One of the great holy wars of PL.

Of course C++ has it, and it is one of the great footguns in its arsenal.

With great power comes great responsibility.