Live data from Hacker News

What .NET 10 GC changes mean for developers

roxeem.com

251–253 of 253 posts

Re: What .NET 10 GC changes mean for developers

#251
post #44

Earlier quoted context omitted.

Lmao, functional programming is far from ergonomic

Exactly what I've observed in practice because most devs have no background in writing functional code and will complain when asked to do so. Passing or returning a function seems a foreign concept to many devs. They know how to use lambda expressions, but rarely write code that works this way. We adopted ErrorOr[0] and have a rule that core code must return ErrorOr . Devs have struggled with this and continue to mis…

Cool. I’ll have to check this out. I often find myself rolling my own “option type” when writing C#.

Agreed with getting developers to see the value. The most convincing argument I’ve been able to make thus far has been “isn’t it embarrassing when your code explodes in production? Imagine being able to find those errors at compile time.” The few who actually understand the distinction between “compile time” and “run time” can usually appreciate why you might want it.

Re: What .NET 10 GC changes mean for developers

#252

Earlier quoted context omitted.

honestly this sounds like you've never really done it. FP is much better for ergonomics, developer productivity, correctness. All the important things when writing code.

I like FP, but your claim is just as baseless as the parent’s. If FP was really better at “all the important things”, why is there such a wide range of opinions, good but also bad? Why is it still a niche paradigm?

It’s niche because the vast, vast majority of programmers just continue to do what they know or go with the crowd. I spend roughly 50% of my time doing FP and 50% doing imperative (most OOP) programming. I am dramatically more effective writing functional code.

Like other posters, I am not going to claim that it is better at all things. OOP’s approach to polymorphism and extensibility is brilliant. But I also know that nearly all of the mistakes I make have to do with not thinking carefully enough about mutability or side-effects, features that are (mostly) verboten in FP. It takes some effort to re-learn how to do things (recursion all the things!) but once you’ve done it, you realize how elegant your code can be. Many of my FP programs are also effectively proofs of their own correctness, which is not a property that many other language styles can offer.

Here’s an appropriate PG essay: https://paulgraham.com/avg.html

Re: What .NET 10 GC changes mean for developers

#253
post #172

Earlier quoted context omitted.

You can get an error union now: https://github.com/amantinband/error-or

The issue is the ecosystem and standard library. They still will be throwing unchecked exceptions everywhere

I hear what you’re saying but the C# standard library is pretty well-behaved. If you’re really that concerned about it, wrap questionable calls in an exception handler and convert them into option types, and then you can force everything downstream to handle all the errors. I share your dislike of unchecked exceptions; sadly checked exceptions also kind of suck. Working in old Java codebases that use them is torture.
Post reply on HN