Hacker News new | ask | show | jobs
by ajnin 123 days ago
Not to pile up on the negativity, but looking at the SDK, first reaction is it's fucking C++ ? Can't wait for my watch to crash in the middle of something. And second reaction, when I see signatures like this :

  void TrackFaceTotal::setDistance(float dist, bool isImperial);
  void TrackFaceOverview::setPace(float pace);
and

  bool     unitsImperial;
littered everywhere, it makes my heart sink a little. Can't we have some data types and data modeling in 2026 please ? And leave unit conversion at the front end where it should be and not have to worry about it in every single core API ?
3 comments

No, we can't. It's an ultra-low-power embedded ARM Cortex-M33 (successor to Cortex-M4) processor, the right language to use when programming it is C++. You want a minimum of abstractions and a close-to-the-metal programming environment to maximize battery life.

Be grateful it's C++, it could be raw C.

The TrackFace stuff is in example apps (consumers of the SDK), so AFAICT it's doing what you want: unit conversion in the front end.

That said, while I think you picked an example that undermines your point, the point does still stand. The SDK has a lot of rough edges (just not this specific one).

Just because its C++ doesn't mean it'll crash, come on, that's just lazy thinking. It could just as well mean that it will be rock solid and industrial strength. After all, a heck of a lot of very important life-critical systems run on C++ ..