Hacker News new | ask | show | jobs
by shmerl 2612 days ago
> By writing wlroots in C, we make it easy for a half dozen projects to make bindings to other programming languages.

Rust is the same in this regard, you can bind it to any other language. And it doesn't have the horrible downsides of C. So why not use it?

> wlroots brings together over a dozen different libraries and interfaces which are implemented in C.

That's an issue as well, and this of course runs deep. But starting somewhere should be still possible.

1 comments

>So why not use it?

Because I don't like it, and I do like C. Rust is not the second coming of Christ, it's a programming language and has many shortcomings and tradeoffs.

Which is fine, everyone has their own taste and every language has its shortcomings, but then why didn't you say that from the beginning? Instead you made up a stupid argument that with wlroots being written in Rust other projects would have had a much harder time to make bindings to other programming languages. Which is of course bullshit since Rust allows you to provide a C ABI, hence creating language bindings is as simple as with C.
>Which is of course bullshit since Rust allows you to provide a C ABI, hence creating language bindings is as simple as with C.

No, because C already uses the C ABI. You have to have a separate interface to your Rust code which uses the C ABI, and an uncomfortable transition point between C-land and Rust-land. This is definitely not as simple as it is with C.

That wasn't your argument. Your argument was that other projects have a much easier time to create language bindings for wlroots if it's written in C and know your argument changed to: I have a much easier time to provide a C ABI if wlroots is written in C instead of Rust.
In my view, tradeoffs of C are objectively much worse overall. I.e. it's not about taste, it's about the language limitations. Tastes are a different matter and they of course can differ.