1283
Is this a Nut? (media.gehirneimer.de)
you are viewing a single comment's thread
view the rest of the comments
[-] MonkderZweite@feddit.ch -1 points 8 months ago* (last edited 8 months ago)

They implemented some sort of OOP tho.

edit: I meant: the Linux devs implemented some sort of OOP in their C code in the kernel – is something i read forever ago.

[-] arc@lemm.ee 11 points 8 months ago

Rust isn't really OOP like C#, Java or C++ - it has structs with functions that you could consider an "object" but there is no inheritance. Instead Rust uses traits which are a little bit like interfaces in some languages.

The way the kernel is using Rust at the moment is to produce safe bindings for modules to be written in Rust, i.e. you can create a module in Rust source which will be correctly loaded up, the code is safe by default and will have access to kernel services via bindings. I expect over time that more of the kernel will become Rust, but the biggest impediment right now is Rust relies on LLVM and LLVM only supports a subset of targets that a kernel could potentially support with another compiler like gcc.

this post was submitted on 14 Mar 2024
1283 points (98.5% liked)

Programmer Humor

19623 readers
1 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