cgtjsiwy

joined 2 years ago
[–] cgtjsiwy@programming.dev 3 points 2 years ago* (last edited 2 years ago)

Although I’ve used a number of languages including Python, Javascript, and Go to build software, the bulk of my experience is working in Java.

Notably, Python's type annotations are extremely similar to Typescript. I guess the author hadn't used Python's type annotations very much (which is understandable considering they're often missing from libraries and the implementations are buggier than Typescript).

[–] cgtjsiwy@programming.dev 1 points 2 years ago (1 children)

In languages with static and convenient type systems, I try to instead encode units as types. With clever C++ templating, you can even get implicit conversions (e.g. second -> hour) and compound types (e.g. meter and second types also generate m/s, m/s^2 and so on).

[–] cgtjsiwy@programming.dev 3 points 2 years ago

Similar problems (and more) have been solved long ago by libraries, because the issues aren't specific to music. More importantly, how does utf8 support count as a "horrible edge case" in 2022?

view more: ‹ prev next ›