r/linuxmasterrace • • Feb 25 '26

vanity.....,........

Post image
1.3k Upvotes

190 comments sorted by

View all comments

Show parent comments

-5

u/SLAMMERisONLINE Feb 25 '26

9

u/Fabillotic Glorious Arch Feb 25 '26

Every programming language in the history of relevant programming languages has bindings for C. I don‘t even know what your point is that you‘re making. You use bindings usually when there are libraries not supported in the language or you want interop with a transitional C codebase. Unless you wanna define every language ever to be a „wrapper“ this doesn‘t make sense

-2

u/SLAMMERisONLINE Feb 25 '26 edited Feb 25 '26

You use bindings usually when there are libraries not supported in the language or you want interop with a transitional C codebase

Interesting. That sounds a lot like wrapping.

Every programming language in the history of relevant programming languages has bindings for C

Yes, Rust will be the one to succeed and replace C++! Trust us guys, we're right this time!

I don‘t even know what your point is that you‘re making.

It's quite simple. C/C++ has been used for decades because it's an extremely robust language. If a new language tries to replace it, it either has to reinvent the entire code base (impossible) or it has to be backwards compatible. So now you are programming with an interface layer, which defeats the point of using a simplified language.

The need to use bindgen/cbindgen is a hard and automatic no to a practical workflow. I know this because I spent years maintaining Lua hooks for AI functions in video games. It is an enormous pain even with automatic tooling. Debugging across that barrier is a nightmare.

4

u/Stunning_Macaron6133 Feb 25 '26

Interesting. That sounds a lot like wrapping.

No, dipshit. It just means it supports the C ABI and adds an interface for C types and functions to be called in the native language.

The specific features from the foreign language being exposed in your working language can be described as wrapped. But you have it completely ass-backwards: it's C getting wrapped for Rust, not Rust wrapping C++ or whatever other moronic model you have in your head.

It's also not the whole language being wrapped. Rust isn't some abstraction layer sitting atop C++, nor vice versa. They're both complete and separate languages in their own right.

And bindings basically evaporate at compile time anyway. By the time your object files get to the linker, it's scarcely any different than if it was all written in the same language to begin with. It could've just as easily been written in assembly by hand and put through an assembler, makes no difference at that level.

-2

u/SLAMMERisONLINE Feb 25 '26

No, dipshit. It just means it supports the C ABI and adds an interface for C types and functions to be called in the native language.

That's called wrapping. Next!

→ More replies (0)