News for hackers. Stuff that matters.
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.
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;
Re:Ada for the C++ and Java Developer [pdf] by tmcb on Tuesday March 30, 2021 @11:28AM (#26635730)
That seems to do the trick for an individual predefined operator specification. Thanks!