Hacker News new | past | comments | ask | show | jobs | submit login
C# 9 Preview (c-sharpcorner.com)
8 points by alugili on June 1, 2020 | hide | past | favorite | 3 comments



I'm fine as long they keep the output compatible to the ratified C# 5. All the changes since 7 are something done by external tools or third party if it were any other language. I get the point changing on language level is to equalize the tools on every platform. It's a bit diservice to beginners who now can't separate between OOP concepts and scripting, autoclass, autoproperty etc. Only thing I don't get is this ref usage: "return ref myStruct;". Why on earth the JIT passed "return" as "byval" ? Sometimes I wonder if C# design team is disconnected from inner workings for the .net engine...


Records are meant primarily for immutable cases such as DTOs. If you use them for mutable data, my guess is it uses some structure sharing to not duplicate all properties but instead hold pointers to the old unmutated properties. That's how a lot of immutable paradigms work but I don't know what C#9 does under the hood


I am missing the Discriminated Unions :(




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

Search: