DEV Community

Discussion on: Swift or Java or Kotlin?

Collapse
 
webbureaucrat profile image
webbureaucrat • Edited

Java--very useful but legacy language

Kotlin--a newer (and in my opinion much better) language compatible with Java. Yes, it is used often with Android, but it's compatible with any Java codebase, not just android. Kotlin is basically Java with a bit of a slimmed-down syntax.

C/C++--These are mainly used for low level stuff. I don't mean easy stuff; I mean stuff that runs very close to the machine. Do you want to write an operating system? Do you want to write a program for a robot that has a tiny processor that couldn't handle a big Java program? Are you trying to write a driver for a new hardware device. These are all good reasons to use C/C++. Breaking it down even further:

C: Does not have object-orientation, which is a particular way of organizing code.

C++: It's C language, but with object orientation.

For what it's worth, I think every intermediate or advanced level developer should learn low-level programming in a language like C, C++, or Rust, but not as a first language.You mentioned that you heard C and C++ are "good." That's not the right way to think about it. Almost every single programming language is "good" at something and almost no programming language would be "good" at everything that can be done.

C#: It's a common misconception that C# is related to C in the way that C++ is. It's not. It's named after C/C++ because, like Java, it has a vaguely C-like syntax, but it's most like Java. Actually, it was created specifically because Microsoft got sued for violating Java's copyright and had to write their own. C# is very popular in game development and it's popular in enterprise (I work in C#).

Like I said, it's very important to not think of "which language is best so I can learn that one." Instead, think, "What do I want to write?" and then ask which languages are good candidates for what you're trying to do.

Also, try a lot of different things. For example, a lot of people really hate writing JavaScript because it's so permissive that it's easy to write something wrong. Other people really like the permissiveness of JavaScript because they find it freeing. You need to fully learn about four or five very different languages before you'll figure out what features you like in a language.

Collapse
 
yobretyo profile image
Bret

I want to use a language that is diverse, but tho, needed as in, it’s stable and have a variety of uses. Swift is Apple. So your really limited to basically how the company is doing

Collapse
 
stojakovic99 profile image
Nikola Stojaković

C++ is not C with OOP but a completely distinct language for decades now.