DEV Community

Discussion on: Should you pick C# over JS? Maybe.

wireless90 profile image
wireless90 • Edited

I find that Tim Myers made a very important point.

"One of the things that struck me as funny when I came back to dotnet was the fact that if you search online for how to do something the C# code snippets you find are going to be fairly similar. Whereas, with JavaScript you can find 100 posts with 100 different ways to do things."

C# is so well structured its good that there is only a few ways of doing something. Being in this industry, I feel its not really about how easy it is to use a language, its how easy it is for others to read your code. And C# is good for that, no real surprises in code where u need to pause and think what this function does as their naming conventions are all solid.

denvercoder profile image
Tim Myers Author

Yes exactly, if you look at my JavaScript code you are going to be confused. It seems like with JavaScript a lot of times I'm trying to "make it work".

With C# there are only a few ways to do a particular task so if you and I sat down and were asked to write a simple controller with GET, POST, PUT, and DELETE verbs. Our code would look similar.

But if we did the same in JavaScript maybe you use axios and I use fetch, and our code would no doubt come out looking quite different.