Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How do you write your garbage collectors or RC without precise manual memory management?

How do you render billions of vertices and maintain a gameplay loop under 8ms for AAA games without precise manual memory/layout management?

Not everyone is writing websites in javascript



I guess they are referring to something like Rust which manages to "solve memory management" while still letting you write high performance code.


Here, a GC implemented in Oberon, a GC enabled systems programming language,

https://people.inf.ethz.ch/wirth/ProjectOberon/Sources/Kerne...

For something more modern in D, also a GC enabled systems programming language,

https://github.com/dlang/dmd/tree/master/druntime/src/core


D is GC by default (and currently required for larger parts of stdlib) but also allows disabling GC and doing manual memory management.


Just like plenty of GC enabled systems programming languages, this isn't a XOR.


D uses manual memory management with (malloc/free/realloc) to implement their GC

So i don't know what point you are trying to make

D is pragmatic and confirms my point


Like every systems programming language with GC support.

Modula-2+, Modula-3, Nim, Mesa/Cedar, .NET Native, Sing#, Oberon, Oberon-2, Oberon-07, Active Oberon, Nim, Swift (RC is a GC algorithm per CS definition), and even if debatable what its role might be, Go.

The point I am making is having a GC managed heap doesn't preclude features for manual memory management, only GC haters think otherwise.


You don't understand the point, GC is one way of managing memory, it is not the panacea

Some helpful reading, from people actually working on solving hard problems

https://twitter.com/FilmicWorlds/status/1562090212225716224

> only GC haters think otherwise.

only GC lovers think like that

that's not a good argument


Random links about a game studio, incidently one famous for using Lisp based scripting languages before being acquired by Sony.... yeah right.

You still don't get GC enabled system programming languages, and apparently I am not the one that is going to make it clear, so whatever.


You still don't get it, and that's ok


Indeed, why bother isn't it.


RAII is often optional automatic memory management, like in C++ or Rust. Both of these languages are used for AAA games and rarely used for websites. My point was that if you don't go as far as those two, there is just not much of a point to not using C instead.


Rust is not used in the AAA industry, it was advertised by a company (Embark), but they ended up using Unreal Engine 5 for both of their new upcoming games


NOT TRUE you would of course choose Odin over C unless you could not for some reason.

Odin is 100x better environment to program in than C. C++ is used for AAA games. Rust is not really used if hardly at all because of the highly competitive and time critical nature and very much the need to change things fast.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: