r/linux • • Aug 29 '24

Kernel One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"

https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down
1.1k Upvotes

794 comments sorted by

View all comments

Show parent comments

172

u/airodonack Aug 29 '24

Jeez. The audience member that belittles Rust by comparing it to Java then realizes that Rust is not even object oriented. Rust-hate has become more unreasonable than the hype was. At the very least, he seemed like he was amenable to change (he learned how the code worked in real time and changed his mind).

29

u/torsten_dev Aug 29 '24 edited Aug 29 '24

I think the one comparing Rust to a religion was worse.

When all it boils down to is "What do I do when I want to change the semantics in C, but don't know Rust". It's a reasonable question asked in a very unreasonable way.

His hangup with not wanting to learn Rust seemed a little sincerely held.

30

u/argh523 Aug 29 '24

And the presenter told him like three times that they don't expect anyone to fix their Rust code. They'll do it themselves, all they want is help to figure out the semantics of the new thing

→ More replies (1)

28

u/CouteauBleu Aug 29 '24

Jeez. The audience member that belittles Rust by comparing it to Java then realizes that Rust is not even object oriented.

That audience member was clear they were coming from a place of not knowing anything about Rust.

I think we shouldn't make fun of people who ask naive questions. Curiosity is good and crap.

29

u/CrazyKilla15 Aug 29 '24

I think we shouldn't make fun of people who ask naive questions. Curiosity is good and crap.

Not in the middle of a completely unrelated presentation, contributing to its massive derailment.

7

u/argh523 Aug 29 '24

Yeah that guy wasn't the problem, he sort of realized his mistake and even came up with a good question (how closely do these types encode the state of the program? (to which the answer is probably "exactly", but they didn't get around to answer it))

7

u/07dosa Aug 29 '24

The audience member that belittles Rust by comparing it to Java

Weren't people laughing because it was simply too out-of-context? I don't understand what makes you think *everyone* in the room was against Rust.

9

u/airodonack Aug 29 '24

You have it a bit switched around. The laugh was because of the dig at Java.

→ More replies (5)

2

u/inevitabledeath3 Aug 29 '24

I've seen it argued both ways on if Rust is OOP or not. It has a lot of OOP like features anyway.

25

u/gmes78 Aug 29 '24

"OOP language" is a meaningless term. You can do OOP in C if you want to, just look at GLib and GTK.

14

u/ebassi Aug 29 '24

The Linux kernel itself uses OOP in its own code base.

→ More replies (1)

30

u/masklinn Aug 29 '24

What “OOP” feature does it have aside from calling struct-associated functions with .?

18

u/N911999 Aug 29 '24

Iirc, encapsulation in terms of visibility modifiers and polymorphism through traits are the features that are generally talked about in that context

29

u/masklinn Aug 29 '24

Neither are OO features, you will find them both in Haskell, and neither in Smalltalk.

25

u/OkMemeTranslator Aug 29 '24 edited Aug 29 '24

I genuinely have no idea what you guys are talking about. Object-Orientation is a way of thinking, modeling, and structuring your code program whatever.

Functions-first paradigm ("way of thinking"), data grouped by operations:

  • add(): int, float, string

  • mul(): int, float

Objects-first paradigm, operations grouped by data:

  • int: add(), mul()

  • float: add(), mul()

  • string: add()

That's it. I can do OO in Rust, C, draw it on paper, write a todo list based on OO. What the hell are OO features anyways?

So tell me, how is Rust not an OO language? It can be multi-paradigm, as are 90+% of langauges, sure, but it definitely has great support for OO as well.

Edit: They even have an official documentation on OO support in Rust.

10

u/ludonarrator Aug 29 '24

Apparently OOP == inheritance and thus Rust has 0% OOP. /s

→ More replies (1)
→ More replies (2)

7

u/inevitabledeath3 Aug 29 '24

Yet smalltalk has also been used as an argument for why Rust can be OOP despite not having classes. I don't know enough about smalltalk or the exact definition of what OOP is to make that judgement. All I am saying is that it's not cut and dry enough to make that kind of statement casually.

4

u/masklinn Aug 29 '24 edited Aug 29 '24

Yet smalltalk has also been used as an argument for why Rust can be OOP despite not having classes.

That does not make a lick of sense, smalltalk has classes. Are you confusing it with Self?

And in that case equating deref coercion to delegative inheritance is a stretch the size of valles marineris, notably completely lacking subject preservation, it’s mostly an attribute access shortcut.

All I am saying is that it's not cut and dry enough to make that kind of statement casually.

You definitely should not casually state that rust is an oo langage. It’s sufficiently ludicrous you need at least a whole essay backing up that assertion.

4

u/Pay08 Aug 29 '24

Just because 2 things are called the same thing doesn't mean they're equal. Smalltalk classes only hold data. Methods are done via dynamically dispatched top-level functions.

→ More replies (1)
→ More replies (1)

2

u/Pay08 Aug 29 '24

Rusts OOP is rather similar to Smalltalks but that's because it's essentially interfaces from Java/C# and those are quite close to Smalltalk (even if "reversed").

→ More replies (1)

2

u/WishCow Aug 29 '24

Depending on who you talk to, you get different answers on what OO is. It's usually defined as "objects containing data and code", with the terms "polymorphism, encapsulation, and inheritance" sprinkled in. Rust has all of these, except inheritance.

2

u/sm_greato Aug 29 '24

So, let's not talk about what OO is. What specific feature are you talking about? What specific method of organising your data are you talking about? How does those objects interact with each other? You won't find the usual Java scheme in Rust.

→ More replies (4)

2

u/poralexc Aug 29 '24

It’s type system is sort of ”flat“ compared to classic OOP with inheritance.

I do, however, find myself falling into the same pitfalls as Java trying to remember which obscure JVM class/trait I’m looking for instead of coding.

→ More replies (5)
→ More replies (1)
→ More replies (7)