Hacker News new | ask | show | jobs
by whoknowsidont 508 days ago
>They should have just use C# for Flutter.

Dear lord no. We don't need more C# in the world.

>It supports ahead-of-time compilation and hot-reload.

In name only. Doesn't really well in practice. Go and just look for "C# hot reload not working" in any search engine and look at the variety of contexts it just simply does not work with no resolution.

1 comments

C# is a fantastic language that has, in recent years, evolved very quickly for the better. Nice mix of object and functional drawing a lot of influence from F#.

It shares a lot of language constructs with TypeScript (and by extension, JS) and has been converging with each release so I'm often surprised that people hate on it or that more startups don't reach for it if they are on Node with TS.

Same syntax for key language constructs like async-await, try-catch-finally, generics, etc.

Hot reload works pretty well (at least in the contexts that I use .NET (backend APIs)); a lot of the issues were from the early days. `dotnet watch` has been very much usable for the last few years.

The improvements are great for people who have to or want to use C# for whatever reason? But how does that move the needle from other tech-stacks that are for more capable, especially on non-Windows environments (and please don't imply that C# is truly cross-platform, it's fine for web API's, it's not fine when dealing with actual system calls).

If you're within the Windows garden, those tools certainly make sense to use. But if you're not, there just simply isn't a reason to burden your app/platform with them.

To be clear, there's nothing wrong with C#, but the advocacy for it tends to be quite loud and passionate without much technical clarity in what it brings to the table that's lacking in other ecosystems. And again, you might be in for a world of hurt depending on how complex your needs are.

> and please don't imply that C# is truly cross-platform, it's fine for web API's, it's not fine when dealing with actual system calls

What exactly do you mean by this? How are syscalls worse in C# than other languages?

My understanding is other "cross-compiled" languages have cumbersome ergonomics with syscalls. They all use System or OS libraries that hide complexity and OS differences to varying degrees of success.

What do you mean that it's not truly cross-platform?

https://developers.redhat.com/blog/2016/09/14/pinvoke-in-net...

https://developers.redhat.com/blog/2019/03/25/using-net-pinv...

> without much technical clarity in what it brings to the table that's lacking in other ecosystems

What other GC language offers such levels of both high level expressiveness and low level control and also has a big ecosystem?

I'm not advocating it for every use case, I'm advocating it for use cases where it's a good fit (e.g. web APIs, backends where there's a need for multi-threaded code). For teams that need to move up from Node/JS/TS or augment Node/JS/TS, it's likely a better choice than say Rust or Go (nothing wrong with Go, but C# is going to be an easier ramp than Go for JS/TS devs IMO)

I would not, for example, advocate it for web UIs or any UIs except for Windows desktop UIs (and even there, I might advocate for JS based options).

>I'm advocating it for use cases where it's a good fit

>I would not, for example, advocate it for web UIs or any UIs except for Windows desktop UIs

Well, the GP was talking about using C# for Flutter, a cross-platform product from desktop to web lol.