|
From: Robert S. <rm...@un...> - 2026-06-07 19:47:38
|
On So, 2026-06-07 at 15:24 +0200, Nicklas SB Karlsson wrote: > Totally agree about the guarding problem. Software complain if pieces > does not fit together is something good. > > Even stronger typing do in many cases make sense. Creating voltage, > current, temperature, angle and linear length types > is some examples. Put a temperature value where an angle value is > expected will rarely if ever make sense. Some > programming languages even have types with limited range. The HAL types only distinguish numerical types and don't carry units. So it is absolutely possible to connect a temperature value to an angle input. We could keep a type as a "hint" and use double as storage at the same time. -- Robert Schöftner <rm...@un...> |