For small real-time #audio thing i’m working for my own entertainment i stick to good old #C and #PortAudio.
Working on Rust would mostly getting into unsafe mode and cursing that there is no “first-class” way to check each and every dynamic memory allocation success. Finally, the audio libraries are quite bad when considering ones actually implemented with Rust (e.g. CPAL), not just bindings to e..g PortAudio.
So where I would not like to Rust bother, it would come to poke me with. a stick, and where I would need its help, it totally ignores the issue.
I’d like Rust more if people would stop describing it as a memory safe language.There is no such thing as memory safe language. There’s only languages with weaker and stronger checks/guarantees, and usually only for a subset of overall memory management.
In the case of Rust it can handle dangling references but ignores memory usage and out-of-memory conditions completely.
@jarkko do you not consider the `try_new` API first class?
https://doc.rust-lang.org/std/boxed/struct.Box.html#method.try_new
I know the allocator API is not stable yet, but that's because Rust strives to be designed with care, and I understand it's frustrating not having must have features.
I could name a few, but I'm sure you understand what I'm saying.
@jarkko That's a fair point about leisure, though I love writing rust in general :)
Btw, I'm interested to know: why do you think libraries are 2 decades missing in experience?
@jarkko Ah, that wasn't what I meant either :)
I meant to ask which kind of improvement audio libraries in general are missing compared to PortAudio, for example.
You have answered my question regardless, so thank you :)