← Back to context

Comment by masklinn

9 months ago

> My impression of Rust is that it's a very opinionated language

It's not though. There's only one thing Rust is opinionated about.

> that wants everybody to program in a specific way that emphasizes memory safety above everything.

Well yes, that is literally the core proposition and purpose of the language. That's like saying java is opinionated because it wants to manage the memory.

> I just don't think the kinds of security bugs you get from C/C++ "unsafe" code are that big of a deal for games

As soon as games are networked it starts being a problem, and these days non-networked games are pretty rare.

Rust also is opinionated that you don't want to write shared libraries or plugins. You can do both, but only if you drop down to memory unsafe C interfaces. The default is statically compile all applications into one program. Rust also really wants you do to use their build system and package manager, you can avoid both but everything will fight you.

  • > Rust also is opinionated that you don't want to write shared libraries or plugins.

    Not having a solution is not the same as having an opinion.

    If you have years to spend on plugging at ABI stabilisation, generics and proc macros in dynamic linking, and redistributable std, I’m sure the core devs would be happy for you to.

    > Rust also really wants you do to use their build system and package manager, you can avoid both but everything will fight you.

    What do you mean everything will fight you? It sounds like you’re confusing rust and its ecosystem.

    • A language is in large part the ecosystem. If I can't use the expected ecosystem I can't search for answers.

> As soon as games are networked it starts being a problem, and these days non-networked games are pretty rare.

So have your network protocol parser in Rust and the entire rest of your game in whatever the hell you want.

All the practical safety you could desire without any language constraints for the other 99% of the code