Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Research Based on the .NET Runtime (2019) (mattwarren.org)
76 points by matthewwarren on July 26, 2020 | hide | past | favorite | 11 comments



The research papers on manual memory management for .NET looked interesting. I wonder if anything ever came of it?


The delete/free bits never made it in, but some related stuff definitely has made its way into the standard library and compiler over time. Span<T> and Memory<T> provide a bunch of affordances for safely mixing GC and non-GC pointers in the same workflow. Big chunks of the BCL can operate on strings and data at any address in memory now, which is really helpful for high-throughput parsing and streaming.


What's an affordance? Is it something with a technical meaning, like pragma?



I know about spans and stackalloc, I mean quite literally does the word affordance mean something technical here that I've not come across?


Affordance means that the interface of something indicates clearly how it's supposed to be used and for what purpose. This is broader term and it applies to physical stuff like door handles or knife grips too. It's intuitive enough which is probably why previous poster was confused about your question.


I've come across the term affordances before, but in this context if they'd been referred to as methods or classes or 'ways for safely mixing...' whatever I'd have got it, no problem. Calling them affordances is correct (technically they are) but made me think there was something vital (edit: perhaps .net related) I was missing. Mind at peace now, thanks all.


I don’t know what you came across and what you didn’t so I can’t answer that question.

Technically, spans support affected many parts of modern .NET, both standard library, runtime and even language.


Is there even a way to allow for manual memory management (not just invoking the GC) in a manner that would still be safe that won’t defeat the purpose of a managed language?





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

Search: