3 ms·
Author here. I think you need to read to the end of the post. And then read the one it links to because that one says that I will rewrite all of my new project
by gavinhoward 3y ago
Author here.
I think you need to read to the end of the post. And then read the one it links to because that one says that I will rewrite all of my new project in a memory-safe language. (bc, unfortunately, needs to stay in C because it needs to have zero dependencies.)
I'm not making the argument that C is good, or that I am good at C. I'm comparing myself against the average.
- trealira 3y ago> (bc, unfortunately, needs to stay in C because it needs to have zero dependencies.) Couldn't you write it in Golang? That's also popular for creating standalone executables (ignoring the dynamically linked libc when necessary). I'm not saying you're obligated to switch. I just assume you wrote bc in C because you find it fun, based on your "Why I write C when I care about memory safety" post.
- gavinhoward 3y agoUnfortunately not, because bc is used to build the Linux kernel, and requiring Go to build the Linux kernel is not good. And that was part of my original requirements because I knew that fact at the time I started.
- trealira 3y agoI see. I didn't realize that's what you meant by dependency-free. There's still a dependency on there being a C compiler, though.
- gavinhoward 3y agoThat is true that there is still a dependency on a C compiler, but the Linux kernel has that dependency too, so that dependency is "free." Edit: In fact, there's really a dependency on POSIX sh and various standard POSIX utilities, but Linux also requires those to build, so those are also "free."