Can we replace some of the C++ code with Rust instead?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Joe0239

Reason why I suggest this is because:

  • OOP is slower than POP (as Rust is POP)
  • Rust has strict compiler checks and the rust concept borrowing make a lot of common programming and memory bugs nonexistant. Though that’s not to say you can’t have bugs in rust.
  • Easier to code than C++

Take a look at Redox OS and see why they use Rust over C++

:bust_in_silhouette: Reply From: kidscancode

I see you’ve already asked a variation of this question 2 months ago and received a very good answer:

Rewriting the engine gets suggested by newcomers now and again: Rewrite Godot in Rust · Issue #8873 · godotengine/godot · GitHub

Frankly, the arguments about rust’s speed don’t matter. Godot’s C++ codebase already exists. The amount of time that would be lost trying to rewrite it could never be justified versus improving and extending the existing code.

How about if we were to design something new for Godot, it should be written in Rust then. Production time is much faster in Rust. Less time to worry about debugging due to strict compiler checks.

Joe0239 | 2018-04-08 02:55

You’re welcome to do so, and to make the case that your way is better. Do you intend to contribute Rust code to Godot, or are you just advocating that others do it?

kidscancode | 2018-04-08 14:24

Well if I knew Rust I would be more than happy to contribute, but unfortunately I don’t so I can’t do much other than to suggest. I have not used Godot much so once again it is not me really telling people to do something, it is more of a suggestion as this would not really benfit me but I can see that everyone else could benifit from this.

Joe0239 | 2018-04-08 14:34

Maybe you should learn about Godot before suggesting something is wrong with it or how it could be improved. And if you don’t even know Rust, how can you make all these claims that it will be better?

kidscancode | 2018-04-08 14:41