3 ms·
And one could use complex, or quaternions to represent points in order to not have to reinvent the wheels of rotation/translation/computing area/projections/pol
by SFjulie1 11y ago
And one could use complex, or quaternions to represent points in order to not have to reinvent the wheels of rotation/translation/computing area/projections/polar to cartesian ...
Here is my sokal version of class point; just repr overload for complex:
https://gist.github.com/jul/9286835 https://gist.github.com/jul/9286835
I think the class point is the proof OOP is not able to give a real use case for itself other than reimplementing the wheel poorly.
OOP has proven to be confusing the youngs and lazy. It makes people confused about abstraction and the concrete world (map and territory).
It is pedantic, and inefficient.
EDIT: But the code of this guy is still amazing, even if totally pushing in wrong directions sometimes: memoization is the worst caching strategy possible. On the other hand the PEG parser is brilliant, like most of the code.