News for hackers. Stuff that matters.
Re:Hard Rust requirements from May onward for all Debian ports by throwawaymaths on Saturday November 01, 2025 @03:36PM (#45784618)
How does this scheme of yours work with m/s and seconds.

IIUC, rust would NOT let you do a type checked m/s * s => m, so using the type system for these kinds of games is silly and dangerous (I presume you would have to do the dumb thing and typeconvert to the same type -- e.g.

    (m) (speed * ((m/s) seconds))
to do multiplication which means you're inserting unscientific and reader-confusing type conversions all over the place)
Re:Hard Rust requirements from May onward for all Debian ports by adwn on Saturday November 01, 2025 @04:07PM (#45784896)
That's no problem in Rust. You can have a Speed type and a Time type, and define the multiplication operator over them to return a Length value. In fact, there's already a library which does exactly that, with tons of predefined SI units: https://docs.rs/uom/latest/uom/
Re:Hard Rust requirements from May onward for all Debian ports by grg0 on Saturday November 01, 2025 @06:44PM (#45786126)
And the exact same thing can be done in C++.