I've always loved robotics so I focused on learning that. I've worked on destkop applications, on drones, and now on exoskeletons! Web dev looks scary to me but there is a lot of potential there.
Location
France
Education
Master of Engineering
Work
Critical Embedded Software engineer at Wandercraft
Great article, user defined literals looks really promising to enforce type safety and avoid conversion errors.
There is one domain where it can help it's when you do physics and you have a lot of units to convert to and from.
For example the code works with radians, but for a human it's easier to write constants or parameters in degrees so you can create a class Angle and the corresponding literals for degrees and radians and it will handle conversions for you.
There is a actually a library making use of this: github.com/mpusz/units
But it needs to be compiled with c++20 standard.
I've always loved robotics so I focused on learning that. I've worked on destkop applications, on drones, and now on exoskeletons! Web dev looks scary to me but there is a lot of potential there.
Location
France
Education
Master of Engineering
Work
Critical Embedded Software engineer at Wandercraft
Great article, user defined literals looks really promising to enforce type safety and avoid conversion errors.
There is one domain where it can help it's when you do physics and you have a lot of units to convert to and from.
For example the code works with radians, but for a human it's easier to write constants or parameters in degrees so you can create a class Angle and the corresponding literals for degrees and radians and it will handle conversions for you.
There is a actually a library making use of this: github.com/mpusz/units
But it needs to be compiled with c++20 standard.
Thanks for your comment. This seems a promising library, let's see if it gets into the next standard in 3 years!
Also, time to get some C++20 locally to try this. What compiler do you use?
Well I use g++ but we aren't using this lib nor c++20 yet it's too recent.
I try to install clang today, but the build takes forever and I always get a signal 9. But at least later and later as I add the hacks proposed...