I don't have a favourite 'just an integer' type in Rust. I was writing a progress function for a Rust program that counts up to 20 input files.
u64 is sometimes fiddly, usize makes me think about indexing, and u32/u16/u8 make me think that something is performance sensitive.
miniblog.
Related Posts
I have a theory: Suppose I created a language Foo that printed execution time at termination:
$ ./hello
Hello World!
(Finished in 0.6 seconds)
I'm sure that Foo developers would be particularly sensitive to performance (for better and worse).
@cwebber@octodon.social Thanks. I completely understand: I'm super hesitant to critique in public.
I think syntax pivots are incredibly hard. When I learnt coffeescript I occasionally had to look at the compiled JS to understand the syntax. Somehow the JS felt more 'real' (and wasn't whitespace sensitive).
Small syntax changes are much easier: just give the user an autofix script for their programs.
OpenBSD is introducing some neat ways of marking sensitive memory so you don't accidentally expose data in a core dump: