Follow

@amiloradovsky@functional.cafe @gassahara@mstdn.io multiplication has a similar problem, that C just completely ignored, and there are even less excises one can make there. Be it hardware or software, if you implement multiplication for x you need to give me the result in 2x, otherwise don't implement multiplication and give me efficient primitives to do it myself. I think it makes sense to generalize this to addition as well, the high number being a boolean(separate type or not). I don't like the approach of having a biggest type, because then what do I do when multiplying two of those? I don't have a generic interface to work with. Numbers that are strictly allowed or disallowed to overflow are useful as well, but at the foundation we should have more expressive interface.

· · SubwayTooter · 1 · 0 · 0
Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.