this post was submitted on 25 Sep 2024
372 points (92.7% liked)

Programmer Humor

19276 readers
1134 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] barsoap@lemm.ee 1 points 1 day ago

I think you dont fully understand how c compilers ( gcc specifically ) work when using multi file projects

They don't. C compilers compile single files produced by the c preprocessor (resolving all #includes), they have no concept of multi-file projects. That's a thing for the build system, such as make, and it needs dependency information from the preprocessor to do its job (cpp -M), and once it has that it has to act correctly on them which is often completely broken because people don't understand make. Like using it recursively, bad idea. In the wild, a random C project at work you'll come across needs a full rebuild to build cleanly. Things have gotten better with things like cmake getting more popular but the whole thing is still brittle. GNU autohell certainly makes nothing better, ever.

Also, anything using IL will always have an abi,

Everything will always have an ABI because ABI is just API in the target language, whatever that may be. If your program is compiled and can run it uses an ABI.

Wasm is wasm, and you only need an exposed interface

The core wasm abi is less capable than the C abi: You get scalar values and pointers, that's it. No structs, no nothing, memory layout is completely unspecified. The component model allows compilers to say "so I'm laying out strings like this and structs like that" giving linkers a chance to say "yeah I can generate glue code between you two".

Again, i like the idea of rust, but it has a long way to go to be viable atm.

C isn't even close to being viable according to your standards people just have gotten used to the jank.

And it has many pitfalls to avoid so it doesnt become the hot mess that is any framework based on node.js

Rust doesn't have portable dylibs precisely because it isn't a hot mess. Because it's actual work to do it properly. Unlike everyone else. Meanwhile It speaks the local C ABI fluently (they differ by architecture and operating system, btw), which isn't a thing that can be said about many languages that aren't C.


Differently put: What, precisely, do you want to do? Have you any actual use-case for your doubts, or are they spooks?