News for hackers. Stuff that matters.
Re:Writing a game engine in pure C: The Graphic Initialization by mhh__ on Wednesday June 05, 2019 @03:02PM (#20107988)
Ignoring the almost barbaric lack of abstraction in C, you could avoid a whole load of these bugs and make your customers not want your head on a spike at next to no cost by using a different language.
Re:Writing a game engine in pure C: The Graphic Initialization by kevin_thibedeau on Wednesday June 05, 2019 @05:38PM (#20109441)
Nobody's complaining about the barbaric OS and network stack written in C. The safety nazis' bleating means little if they can't produce a viable alternative. Where are the high performance OSs written in Ada or whatever next big thing is?
Re:Writing a game engine in pure C: The Graphic Initialization by mhh__ on Wednesday June 05, 2019 @06:26PM (#20109757)
What? Operating systems are big projects and the tools to write them safely (and open source) haven't existed for very long, so it's a question of manpower and effort not technology. C has almost no performance benefits these days, either, due to advances in compiler optimization; if anything it can be less as other languages can provide more static guarantees to the compiler to use when optimising.

That network stack written in C gave us heartbleed for example. If C arrays were bounds checked by default (e.g. they carry around their size), this could've been easily avoided at no runtime cost.

How can you honestly complain about people wanting more safety in software? If it's speed ("high performance") then you're probably implementing yourself in C (e.g. Bounds checking) something that is built in either at runtime or even statically as can be done in some cases.

Re:Writing a game engine in pure C: The Graphic Initialization by lone_haxx0r on Wednesday June 05, 2019 @08:18PM (#20110383)
What do you propose? Replacing the system stack with Ada?

Modern successors to C, such as Zig, and modern successors to C++, such as Rust, are still too young to be used for serious re-implementations of the lower layers.

Re:Writing a game engine in pure C: The Graphic Initialization by mhh__ on Wednesday June 05, 2019 @09:12PM (#20110683)
Modern C++ would be a huge improvement to start with.

Rust is probably there, if under specified. D is definitely fine for writing operating systems (Question being whether to use druntime or not).

I know nothing about Zig, beyond having had a look and not being hugely impressed.