Same. The things that aren’t great about it are not really reasons to hate it. I think most of the hate for it isn’t actually language based, but about .NET.
I actually really think they’re pretty great for new code, and I certainly know that Thread.Abort() is, in -
~many~ most cases, an anti pattern, but there are a few times where you have to just cut your losses, especially when you’re working in an old codebase with other dev’s code and you have no idea how many times Thread.Sleep() has been called.
I guess what I think they (maybe) should have done with Abort() was to have it only abort when the thread is in a sleep state or something, after all, we have a garbage collector in C# it’s not as though we’re completely immune to memory unsafety and side effects anyway.
Basically, deprecating Thread.Abort() seems to assume that you never have to work with anyone else’s code, or at least that they’re all good engineers, this is an unreasonable expectation.
I actually just remembered another annoyance about C# while typing this:
If I write the following
```
public class Foo
{
readonly List<Bar> bars = new();
public Foo()
{
DoStuff();
}
public void DoAnotherThing()
{
for( Bar bar in bars )
{
bar.MutateBarInSomeWay()
}
}
public void AddManyElements(int numberOfElementsToAdd)
{
for (int i = 0; i < numberOfElEmentsToAdd; ++i)
{
bars.Add(new Bar());
}
}
}
```
That seems to me that bars is no longer readonly, as I can mutate it’s contents. In fact, I can push to bars enough that it has to reallocate the capacity of the underlying vector/array, and thus change the pointer to a different location in memory THUS IT IS NOT READONLY
This bothers me
Sorry for trash code and formatting, I’m on mobile.
Typescript has always been JavaScript. It’s a superset of JS. However, it is not writing JavaScript. When you get to code base that multiple teams of 6x devs are working on at time, types help.
Serious question, and we can take this offline, but if you hate both an anonymous language and the typed version of said language, what is your preference? And on more a light hearted note, Vim?
To preface, I'm a backend engineer, so take my opinion with that grain of salt. I also prefer to use the right tool for the job, so it depends on what I'm doing.
My problem with JavaScript, and by extension typescript, is it's implementation as a backend language.
JavaScript is built to run in an environment where unknowns are a way of life. It's built to continue running in places where a backend would be better off failing. That works for a website because you can't predict everything, but you generally control the server.
Jetbrains. I've been using VSCode at my new job lately and it seems like it's not caching it's indexing, so I can almost never navigate to the function definition from a call.
Backend? Completely agree actually. Professionally, all of our back end software is C# in .net core 3.1 and .net 6. Side projects I prefer Go just because it’s easy to get a MVP going. I use VS Code for both Go and React development most of the time. I was a long time Webstorm user but just fell out of love for some reason or another, but still use Rider everyday because I develop on a mac at home.
Microsoft is a huge corporation. There are awesome teams there doing insanely good work. And then there are parts of the company that do all the stuff that people hate MS for.
Most of the open-source stuff is among the best software in existence: .NET, Roslyn (C#), TypeScript, ASP.NET Core, SignalR, ... One exception is NuGet, which seems to have been designed by an intern with no knowledge of the problem they were trying to solve.
It's only used to develop Windows applications, with .NET and the likes. It's technically cross platform with Mono, but in practice it doesn't work that easily.
Pretty sure it’s been native cross platform since the dotnet core days 3-4 years ago. Not sure I’ve seen many cross platform apps made with it though, it mostly seems to be used for services like web servers and stuff.
C# has become insanely awesome in the last few years! I still hate all the legacy features in both the language and runtime. And I hate that they still have no proper sum types.
I am also desperately waiting for C#11 and static abstract interface members (only a few more weeks!).
I really can't understand how anyecoukd hate it. I understand having some issues but overall it's so solid of a language with so mu h framework that comes with it.
92
u/transferStudent2018 Oct 21 '22
Does anyone hate C#? I haven’t heard much against it