Java or C# – which language to teach a backender

I recently came across another discussion on Reddit on the topic of Java and C# – the user asked what to teach him as a novice backend developer. Of course, the thread received a lot of comments from fans of these languages. I’ll tell you what the discussion ultimately came to. Perhaps this will help you if you are also choosing which language to learn.

Why are Java and C# compared?

Java and C# are two object-oriented languages ​​that are heavily influenced by C and C++. So they have very similar approaches to designing and structuring code, similar syntax. Narrower examples are similar approaches to code generation, memory management (both use a garbage collector). In addition, both languages ​​are used to develop desktop and mobile applications, and web applications.

What do you recommend choosing?

GeneratedUsername5

Java, without a doubt. With him there are more opportunities, and the javists have higher salaries. That’s just how the job market works: an employer won’t raise your salary if they realize you have nowhere to go, so the fewer options there are in the market, the lower the likelihood that the salary will be good.

***

Rjs617

Java is a huge ecosystem, Javaists have more job opportunities. If you want to develop something for the Microsoft ecosystem (Windows, SQL Server, IIS, Azure), choose C#. In all other cases – Java.

Additionally, the Java community is larger and it is much easier to find answers to questions about the language and frameworks itself.

There are also more convenient and free tools for Javaists.

***

rbuen4455

Java is still the most popular language for building enterprise and large-scale backends. It has more backend tools. And C# is still very much tied to Windows.

However, C# has a bright future ahead of it.

***

AltDisk288

These are very similar languages ​​with mature ecosystems, both are in demand in the market.

I’ve heard people say that Java will lose market share within ten years, but it’s still ridiculously popular and… This is unlikely to change in the next 20 years, so don’t make decisions based on such forecasts. Don’t be fooled by “this technology, which has been at the top for more than 20 years, is going out of fashion, now another one is popular!” This is not true 99.9% of the time.

Nevertheless, C# (albeit younger and more modern) will certainly remain in great demand. I would prefer it.

***

DeeElsieGame

I think C# is more consistent and thoughtful. And .NET is a good base for the backend.

Also, the language is much more popular among developers than Java, according to Stack Overflow developer survey.

***

xcwxinn

I would recommend C# for beginner programmers. It’s good, it’s easy to learn and it’s similar to Java, so if you want to switch to a second language there won’t be any problems.

Zealousideal_Ice3743

C# is younger, so some ideas are better and newer. I especially like the way reflection and encapsulation work in C# (easier than Java).

***

wayne0004

If you are new to programming, I recommend starting with other languages, maybe Python or Javascript.

C# and Java are object-oriented and cool languages, but if you’re not familiar with the basics of programming, they can seem overwhelming.

***

lionhart280

I heard something from Javaists who switched to C# that brought C# to the top in the eyes of the brain:

In C#, async and await are much cleaner and simpler. And this is important because most commercial projects are tied to asynchrony (everything related to web API calls and databases, for example) <...>.

On .NET I have no problems with parallel code. I didn’t dig deep into Java, but the last time I looked, I saw a lot of oddities, third-party libraries (in C# everything is solved by basic Task/await/async) <...>.

Another C# feature is IAsyncEnumerable, which allows you to make asynchronous calls while getting results. <...> There is no need to write code like “check if I could do A. If I can, do A, if I can’t, sleep a little.”

A good example can be seen in my Iot.Device.Subscriptions library.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *