Re:The Next Mainstream Programming Language: A Game Develope...
by junon on Friday August 26, 2022 @03:33PM
(#32611772)
I'm writing a kernel in Rust, having a great time. I'm not sure what all the arguments here about it not being suitable for game dev are but I would imagine it works perfectly for game dev.
[ Parent
| on HN ]
Re:The Next Mainstream Programming Language: A Game Develope...
by throwawaymaths on Friday August 26, 2022 @05:35PM
(#32613026)
Suppose you wrote a kernel in rust. Now there has been a CPU regression and you have to implement a retpoline. Obviously you don't want to implement it in places where you don't have to. Would this be easy? Or hard?
Re:The Next Mainstream Programming Language: A Game Develope...
by junon on Monday August 29, 2022 @10:33PM
(#32646015)
I don't see why it would be any more difficult or cumbersome than in C.
Re:The Next Mainstream Programming Language: A Game Develope...
by throwawaymaths on Monday August 29, 2022 @11:30PM
(#32646343)
Because macros can obscure having an accurate mental model of what is happening at the metal level, which is what matters when you're doing a retpoline. This is why ziglang, for example, has "no hidden control flow". Not only the mental model, but also you might find that where you need to add the code forces you to break open a macro, which could be a considerable refactoring task.