[kwlug-disc] Notes into "Rust or C" bucket
Doug Moen
doug at moens.org
Sat Oct 11 21:35:45 EDT 2025
There's a hobby project I'm thinking of starting, which would require a systems programming language (to implement the virtual machine and runtime for a programming language).
The languages I've considered were C, C++, Rust and Zig. The choice depends on your requirements. For me, the requirements were good support for creating and dynamically loading shared libraries, writing and debugging low-level unsafe code, proper tail calls (which I would use to implement a tail-calling threaded interpreter), a good high level platform independent abstraction for SIMD operations, and a good library ecosystem for the types of services I'm interested, such as GPU and audio.
• Zig is unstable, buggy and pre-1.0, otherwise I would consider it more seriously.
• Rust doesn’t have proper tail calls. It is reportedly bad for writing for writing unsafe code (the Roc language project switched their runtime from Rust to Zig for this reason). Rust programs are statically linked and Rust has no stable ABI, so I am skeptical that it has the good shared library support I want.
• C has no portable SIMD API, which I find shocking given its intended goal of being close to the machine and to be a portable assembly language.
So I would chose clang C++, if I ever start the project that is.
Doug.
On Sun, Oct 12, 2025, at 1:08 AM, Chris Frey wrote:
> On Sat, Oct 11, 2025 at 06:50:29PM +0000, Mikalai Birukou via kwlug-disc wrote:
>> At the same time, in real place one would have code and delivery
>> pipeline with testing. With JavaScript we have to add more tests just to
>> not let code through with bugs that TypeScript compiler catches. Extra
>> tests need time to write and maintain, so, stricter compiler saves tons
>> of time overall.
>
> Oh, you don't have to convince me of the benefits of a strictly typed
> language. I'm a C++ fan.
>
> - Chris
>
>
> _______________________________________________
> kwlug-disc mailing list
> To unsubscribe, send an email to kwlug-disc-leave at kwlug.org
> with the subject "unsubscribe", or email
> kwlug-disc-owner at kwlug.org to contact a human being.
More information about the kwlug-disc
mailing list