What criteria should be analyzed when choosing a language for creating an application? Is performance everything?

Asked

Viewed 270 times

0

I need to create an application that is the source of communication between several other applications with the database, IE, other applications will make requests for this application that will be created, and it will have the duty to relate to the database and send the result to the application that made the request.

So I thought I would create it in a language other than C++ (because it is the one that I have most knowledge to date) in order to learn a new language. So I ask: what criteria should I analyze when choosing a language for creating a new application?

Another thing that has me quite worried is the impact that can cause using a language that has the performance below C++. I think as follows: the higher the performance, the better. So, if a C++ code takes a few 0,013ms to be completed, what advantage would my app and I have in using another language that may take 2.085ms or even more? And in online game servers, for example, MMORPG that has a whole system of level-up, Pvp and etc. This delay in code execution could interfere in the gameplay of users?

1 answer

3


C++

About performance it would be good to understand that what gives performance are good algorithms, the correct data structures, the proper implementation. A good programmer can do something faster in another language than a bad programmer can do in C++.

In fact the chance of a bad programmer doing something terrible in C++ and not even realizing it is greater than him doing something so bad in a simpler, higher level language. More to the point, there is a reasonable chance that a bad programmer will do in a simple and good language something almost comparable to a reasonably good programmer in C++, at least at some points.

C++ no longer gives performance automatically. It allows more performance if everything is done right. In many cases to do right and have the best performance in C++ takes a lot of work.

Not everything needs this whole performance, so it’s a mistake to chase a Feature in this way.

Actually, I might even need to define performance better. Only in the text of this question has at least two different definitions of performance and probably the author did not realize this.

A good programmer will make any language fast to what it needs unless it really has no way, but then it will have subsidies to define that it does not serve.

Other languages

Languages do not have speed, they have mechanisms that help a lot or little to have speed, if used in the correct way.

Of course the delay can affect the gameplay. But there are a lot of other things that can affect more. And I honestly don’t know if the slowest language can be 200X slower than C++ in most things. There are languages that will be faster at something.

Of course, dynamic languages are probably out of the question because they have a big performance difference in many operations.

But if you want to do something in one browser, currently the only option is Javascript (today is no longer, the Webassembly changed everything).

Needs to run on all platforms mainstream desktop and mobile? It certainly can’t be Delphi or Java, Swift (so far, this has been changing a bit, but not at all).

Need a monolithic executable? It can’t be anything on . NET, so far, so it can (more or less). Java is in the same boat, actually today it doesn’t even run if it doesn’t install the Java platform (also it is changing).

Do you need a complete ecosystem, a very active community? It can’t be D, Rust, Go, etc. That is, it can’t be anything new. Not too old that is already considered legacy.

Would any functional language be adequate? I have no way of knowing, there are cases where they are great. You have to learn to program again, it’s all different. There are cases where they behave terribly.

Requirements

This can only be done in a specific case with clear requirements, and this is not the case with the question.

You have to have the requirements first, then see if the languages meet all of them. Probably no answer. Then you have to see which ones serve the most important and in greater number.

Completion

Choosing language is the easy part of doing something that requires maximum performance. And if you trust what you read on the Internet, the choice is probably wrong. There are a lot of people trying to sell their fish shown that their preferred language is better than the others, and many manage to be very convincing, often because he believes in that. Benchmarks lie.

  • Thank you! It was very enlightening.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.