Re:Ada for the C++ and Java Developer [pdf]
by tmcb on Monday March 29, 2021 @04:26AM
(#26618863)
Oh, thanks for pointing it out. Honestly, I was more interested in leveraging the type system than on proper dimensional analysis. I could find no mechanism by which Ada allows the programmer to disable the default operation overloads, so I decided to try that out.
[ Parent
| on HN ]
Re:Ada for the C++ and Java Developer [pdf]
by OneWingedShark on Tuesday March 30, 2021 @09:28AM
(#26634356)
IIRC you can disable/forbid the default like so:
Function "*"(Left, Right: Distance) return Distance is abstract;
then use: Function "*"(Left, Right : Distance) return Area;