frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Ask HN: Does anyone understand how Hacker News works?

25•jannesblobel•7h ago•39 comments

Ask HN: Those making $500/month on side projects in 2025 – Show and tell

165•cvbox•5h ago•112 comments

Tell HN: HN was down

535•uyzstvqs•14h ago•296 comments

Ask HN: What Are You Working On? (December 2025)

435•david927•3d ago•1421 comments

Ask HN: Etiquette giving feedback on mostly AI-generated PRs from co-workers

2•chfritz•3h ago•4 comments

How Much Energy Does One Solar Panel Produce in Australia?

4•scorpeoanlibra•3h ago•0 comments

Tell HN: AI coding is sexy, but accounting is the real low-hanging target

60•bmadduma•6d ago•54 comments

Ask HN: Should I start a software foundation (goal: help emergency services)?

6•strgcmc•7h ago•0 comments

Ask HN: Is starting a personal blog still worth it in the age of AI?

60•nazarh•3d ago•74 comments

Ask HN: Is building a calm, non-gamified learning app a mistake?

86•hussein-khalil•2d ago•122 comments

Computer animator and Amiga fanatic Dick van Dyke turns 100

279•ggm•4d ago•92 comments

Ask HN: What are your predictions for 2026?

21•mfrw•1d ago•17 comments

Ask HN: Was HN just down for anyone else?

84•rozenmd•14h ago•2 comments

Ask HN: How are you vibe coding in an established code base?

10•adam_gyroscope•1d ago•7 comments

Memory Safety in C# vs. Rust

13•northlondoner•1d ago•12 comments

Ask HN: How can I get better at using AI for programming?

466•lemonlime227•4d ago•464 comments

Ask HN: How do you know what you're working on is worth working on?

8•ideavo•2d ago•18 comments

Ask HN: Claude Opus 4.5 vs. GPT 5.1 Codex Max for coding. Worth the upgrade?

4•terabytest•1d ago•6 comments

Who has enjoyed using PR code reviewers? What worked and what didn’t?

3•yashwantphogat•1d ago•2 comments

Ask HN: Bloggers, how do you manage your content?

10•freemanjiang•2d ago•14 comments

Tell HN: HP Smart Printers

2•_RPM•18h ago•3 comments

Ask HN: Did anyone else notice that the OpenAI Labs website was completely gone?

26•underlipton•5d ago•9 comments

Ask HN: Best back end to run models on Google TPU?

8•vood•3d ago•0 comments

Ask HN: How do you learn marketing as a developer? It's so different from coding

6•Gooblebrai•22h ago•5 comments

Ask HN: Thought-Provoking Books

18•Agraillo•4d ago•18 comments

Our "enterprise" experience with Stripe after $1B+ processed (be careful)

29•Boulderchaim•5d ago•15 comments

Ask HN: How do you get comfortable with shipping code you haven't reviewed?

7•fnimick•2d ago•11 comments

Ask HN: Why are modern AIs ignorant or reluctant to talk about "vibe coding"?

2•amichail•2d ago•16 comments

Ask HN: How do I navigate horror of requirement gathering in product management?

5•souravpradhan•3d ago•5 comments

Ask HN: Any online tech spaces you hang around that don't involve AI?

12•jc_811•4d ago•10 comments
Open in hackernews

Memory Safety in C# vs. Rust

13•northlondoner•1d ago
Noticed how C# is underrated. About memory safety in C#. How difficult to introduce multi-paradigm memory safety approach like Rust? Ownership model for example, would it be possible to enforce practice via some-sort of meta framework?

Comments

worldsavior•1d ago
C# is underrated because it only works well on Windows and has bad frameworks such as .NET.

There isn't really any reason to use it outside of developing Windows native applications. There are much better cross-platform languages, with a bigger community and better support.

romanhn•1d ago
Almost every statement is incorrect. Your knowledge of the .NET ecosystem seems to be about ten years out of date.
QuiCasseRien•1d ago
Not almost, every single one ^^
northlondoner•1d ago
No. It is quite a viable cross-platform language and there is a large community. 1. C# works on Linux almost seamlessly. See the documentation: https://learn.microsoft.com/en-us/dotnet/core/install/linux 2. Actually C# specification is open. Meaning C# is like Java, anyone can implement in any platform. There are even alternating compilers, open sourced, thanks to Mono's efforts: https://www.mono-project.com
jasonthorsness•1d ago
This isn't true at all anymore for years! Microsoft acknowledged Linux won for server-side and since C# is primarily used as a server-side language they made everything work incredibly well on Linux.
runjake•1d ago
I find that modern versions of dotnet seem to run better on Linux. And from what I see from Azure and from MSFT engineer blog posts, I'm assuming dotnet support on Linux is a higher priority than on Windows.

In any case, their claim that dotnet is a bad framework made me chuckle out loud. I'd like to see their impression of what a better framework looks like.

QuiCasseRien•1d ago
I have the same result : performances on Linux are better and this is a real focus for MSFT engineer (Azure has a tons of linux instances running dotnet)
jasonthorsness•1d ago
C#'s runtime (dotnet runtime) adds overhead compared to Rust with GC and other stuff too. This is true even with single-binary AOT compilation, the runtime is still there (just like Go). So it will never be suitable for some scenarios.

You can definitely implement manual ownership tracking in C#, this is quite common for non-memory resources and does have some language syntactic sugar with the Dispose pattern for example. But you can't truly roll your own memory management/ownership unless you do something with "unsafe" which seems counter-productive in this case :P.

zamalek•1d ago
C# is already memory safe. This isn't the reason why some people chose Rust over C#.
neonsunset•1d ago
C# actually already has limited lifetime analysis :)

https://em-tg.github.io/csborrow/

> Ownership model for example, would it be possible to enforce practice via some-sort of meta framework?

It should be possible to at least write an analyzer which will be based on IDisposable-ness of types to drive this. Notably, it is not always more efficient to malloc and free versus using GC, and generational moving GCs do not operate on "single" objects allocating and freeing them, no, so you cannot "free" memory either (and it's a good thing - collection is marking of live objects and everything unused can be reclaimed in a single step).

Also the underlying type system and what bytecode allows is quite a bit more powerful than what C# makes use of, so a third language targeting .NET could also yield a better performance baseline by better utilizing existing (very powerful) runtime implementation.

Lastly, there have been many improvements around devirt and object escape analysis, and GC changes are also a moving target (thanks to Satori GC), so .NET is in quite a good spot and many historical problems were or are in the process of being solved, that make Rust-style memory management less necessary (given in Rust you also make use of it because you want to be able to run your code on bare metal or without GC at all, only relying on host-provided allocator - if you do not have such requirement, you have plenty of more convenient options).

exceptione•1d ago
neonsunset shared an interesting article, but his comment is dead: https://em-tg.github.io/csborrow/

/btw, I am not affiliated with neonsunset, but could people please comment to explain what is wrong instead of downvoting? If there is any substance to a comment and it isn't obviously a misinformation or disinformation one (Paradox of Tolerance), we should have a discussion instead.

On topic: Could F* unlock even more possibilities, like crossing the gap of the heap and the stack in terms of direct access? It has a very powerful type system and it can eject an F* program to F#.

romanhn•1d ago
Looks like many/most of their comments are dead, probably some account-level action that was taken at some point. Vouched for the comment here to bring it back from the dead.