News for hackers. Stuff that matters.
Re:Diagram as Code by aidos on Thursday June 23, 2022 @01:30PM (#31852433)
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/...

Re:Diagram as Code by AtlasBarfed on Thursday June 23, 2022 @01:54PM (#31852775)
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.

Re:Diagram as Code by aidos on Thursday June 23, 2022 @04:02PM (#31854462)
With great power comes great responsibility.