3 ms·
I am a C programmer. For me the language is a means to an end. I prefer to work on problems where both performance and code size is paramount. The kinds of p
by haberman 3y ago
I am a C programmer. For me the language is a means to an end. I prefer to work on problems where both performance and code size is paramount. The kinds of problems where it makes economic sense to spend months or years of engineer time designing and implementing a solution that will compile to a 50kB binary.
I think primarily about the kind of machine code I want to generate, and pick a language that best approximates that ideal output code while still allowing the source code to be as clear as possible.
From these constraints I keep coming back to C. Zig is the most appealing contender in terms of next-gen languages.
If I could get safety without giving up anything, of course I would take it. But I am increasingly convinced that this is not generally possible.
- softirq 3y agoHow do you feel about Rust?
- haberman 3y agoI was really positive on Rust for at least five years. But several experiences have led me to reconsider this position, most notably the difficulty using arena allocation: https://blog.reverberate.org/2021/12/19/arenas-and-rust.html https://blog.reverberate.org/2021/12/19/arenas-and-rust.html This is one of the things that endears me to Zig: passing an explicit allocator around is a very common idiom in the language.
- int_19h 3y agoI'm curious what you think about Ada; from what I remember, its memory management facilities have this basically as a first-class thing directly in the language.