Earlier quoted context omitted.
F# is hardly modern functional programming. It's more like a better python with types. And that's much more ergonomic than C#.
Python and F# are not very similar. A better comparison is OCaml. F# and OCaml are similar. They're both ML-style functional languages.
What .NET 10 GC changes mean for developers
121–130 of 253 posts
Re: What .NET 10 GC changes mean for developers
#122Earlier quoted context omitted.
I am paid to work in Java and C# among Go, Rust, Kotlin, Scala and I wholeheartedly agree. I hate the implicitness of Spring Boot, Quarkus etc. as much as the one in C# projects. All these magic annotations that save you a few lines of code until they don't, because you get runtime errors due to incompatible annotations. And then it takes digging through pages of docs or even reporting bugs on repos instead of just f…
As polyglot developer, I also disagree. If I wanted explicitness for every little detail I would keep writing in Assembly like in the Z80, 80x86, 68000 days. Unfortunately we never got Lisp or Smalltalk mainstream, so we got to metaprogramming with what is available, and it is quite powerful when taken advantage of. Some people avoid wizard jobs, others avoid jobs where magic is looked down upon. I would also add tha…
(define-route METHOD PATH BODY)
You can then easily expect the generated code. But in Java and others, you'll have something like @GET(path=PATH)
And there's a whole system hidden behind this, that you have to carefully understand as every annotation implementation is different.Re: What .NET 10 GC changes mean for developers
#123Earlier quoted context omitted.
C# source generators are...just macros?
They are not. They are generators. Macros tends to be local and explicit as the other commenters have said. They are more like templates. Generators can be fairly involved and feels like a mini language, one that is not as observable as macros.
Maybe you're confusing `System.Reflection.Emit` and source generators? Source generators are just a source tree walker + string templates to write source files.
Re: What .NET 10 GC changes mean for developers
#124Earlier quoted context omitted.
I think people who last looked at C# 10 years ago or haven't adapted to new language features seriously don't know how good C# is these days. Switch expressions with pattern matching are absolutely killer[0] for its terseness. Also, it is possible to use OneOf[1] and Dunet[2] to get access to DU [0] https://timdeschryver.dev/blog/pattern-matching-examples-in-... [1] https://github.com/mcintyre321/OneOf [2] https://gi…
I write C# and rust fulltime. Native discriminated unions (and their integration throughout the ecosystem) are often the deciding factor when choosing rust over C#.
Re: What .NET 10 GC changes mean for developers
#125A hobby audio and text analysis application I've written, with no specific concern for low level performance other than algorithmically, runs 4x as fast in .net10 vs .net8. Pretty much every optimization discussed here applies to that app. Great work, kudos to the dotnet team. C# is, imo, the best cross platform GC language. I really can't think of anything that comes close in terms of performance, features, ecosyste…
> I really can't think of anything that comes close in terms of [...] developer experience. Of all the languages that I have to touch professionally, C# feels by far the most opaque and unusable. Documentation tends to be somewhere between nonexistant and useless, and MSDN's navigation feels like it was designed by a sadist. (My gold standard would be Rustdoc or Scala 2.13 era Scaladoc, but even Javadoc has been.. fi…
Re: What .NET 10 GC changes mean for developers
#126Earlier quoted context omitted.
It's so weird to describe F# as "Python with Types." First of all, Python is Python with Types. And C# is much more similar to Python than F# is.
It all depends on the lens one chooses to view them. None of them are really "functional programming" in the truly modern sense, even F#. As more and more mainstream languages get pattern matching and algebraic data types (such as Python), feature lambdas and immutable values, then these languages converge. However, you don't really get the promises of functional programming such as guaranteed correct composition and…
Re: What .NET 10 GC changes mean for developers
#127Earlier quoted context omitted.
I wouldn't be surprised if it did take off, classic Wasm semantics were horrible since you needed a lot of language support to even have simple cludges when referring to DOM objects via indices and extra lifeness checking. WASM-GC will remove a lot of those and make quite a few languages possible as almost first-class DOM manipulating languages (there's still be cludges as the objects are opaque but they'll be far le…
All great and dandy, except tooling still sucks. You still need to usually install plenty of moving pieces to produce a wasm file out of the "place language here", write boilerplate initialisation code, debugging is miserable, only for a few folks to avoid writing JavaScript.
Re: What .NET 10 GC changes mean for developers
#128Earlier quoted context omitted.
I think people who last looked at C# 10 years ago or haven't adapted to new language features seriously don't know how good C# is these days. Switch expressions with pattern matching are absolutely killer[0] for its terseness. Also, it is possible to use OneOf[1] and Dunet[2] to get access to DU [0] https://timdeschryver.dev/blog/pattern-matching-examples-in-... [1] https://github.com/mcintyre321/OneOf [2] https://gi…
I write C# and rust fulltime. Native discriminated unions (and their integration throughout the ecosystem) are often the deciding factor when choosing rust over C#.
If you want the .NET ecosystem and GC conveniences, there is already F#. If you want no GC and RAII-style control, then you would already pick Rust.
Re: What .NET 10 GC changes mean for developers
#129Earlier quoted context omitted.
The trade offs are though that patterns and behind the scenes source code generation is another layer that the devs who have to follow need to deal with when debugging and understanding why something isn’t working. They either spend more time understanding the bespoke things or are bottle necked relying on a team or person to help them get through those moments. It’s a trade off and one that has bit me and others bef…
Would you rather a team move faster and be more productive or be a purist and disallow abstractions to avoid some potential runtime tracing challenges which can be mitigated with good use of OTEL and logging? I don't know about you, but I'm going to bias towards productivity and use integration tests + observability to safeguard code.
Re: What .NET 10 GC changes mean for developers
#130Earlier quoted context omitted.
F# is hardly modern functional programming. It's more like a better python with types. And that's much more ergonomic than C#.
It's so weird to describe F# as "Python with Types." First of all, Python is Python with Types. And C# is much more similar to Python than F# is.