-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PMComplex
should be the subclass of a Number
#193
Comments
I dunno what would be the consequences, but it makes sense. |
Somehow... Except that inheriting from Number means inheriting from all its expectations.
Also consider other inherited stuff like Not accounting the expectations of most 3rd party libraries. It makes me think of Quaternion, Octonion, ... which are further generalization of Complex. There is another aspect: currently, Integer can be seen as a Fraction with unit denominator. Alas, we made other choices: ComplexNumber with null imaginary part are distinguished from ordinary Number, and are not automatically reduced to real part (unlike a Fraction with unit denominator is reduced to its numerator). |
I agree with @nicolas-cellier-aka-nice. From a mathematical point of view, insisting on numbers being magnitudes was a big mistake in the Smalltalk class hierarchy. |
PMComplex
should be the subclass of a Number
Unlike real numbers one cannot directly compare two complex numbers, namely, we can't say I am finding myself aligning with @nicolas-cellier-aka-nice and would hold back from making PMComplex a subclass of Number. They are certainly fields, and unordered fields at that. Perhaps an avenue to explore? |
I don't know if this is easy to do in practice, but this makes a lot of sense to me:
A ComplexNumber is a kind of Number
The text was updated successfully, but these errors were encountered: