|
|
|
|
|
by chrismsimpson
1261 days ago
|
|
Predictable finalisation. To build say, an operating system, you need to know exactly when memory is freed. If you don’t know this at a fundamental level, how can you schedule work? This IMO is fundamentally why no one has built a modern OS in C# alone. |
|
See the whole linage of Mesa/Cedar, Modula-2+, Modula-3, Oberon, Midori,... OSes.
C#, like those languages, allows for manual memory management, unsafe code, stack allocation. MSIL was designed to also support languages like C++, and since C# 7, many of those capabilities are no longer only available to C++/CLI, rather being incremently exposed to C# as well.
Besides being a GC algorithm anyway, RC has performance issues, which can only be solved by using multiple optimization techniques from tracing GC, like background threads for cascading deletion of complex graphs, deferred counter manipulation, lock free data structures,...
Project Oberon source code,
http://www.projectoberon.com/
Active Oberon source code (the latest language OS from the Oberon tree still being actively developed),
https://gitlab.inf.ethz.ch/felixf/oberon
It would be great if Microsoft some day releases Midori source code.