Why are some programming languages better for certain types of projects than other programming languages, when they can all essentially do the same thing and they all seem to work the same way?

434 views

Why are some programming languages better for certain types of projects than other programming languages, when they can all essentially do the same thing and they all seem to work the same way?

In: 20

19 Answers

Anonymous 0 Comments

One thing to throw a wrench into your assumption that all programming languages do “basically the same thing”, there is a class of programming languages called Hardware Description Languages (HDL, examples include VHDL, Verilog, SystemVerilog) whose primary purpose is not to run on a processor, but intended to create hardware logic that runs concurrently (all at the same time), because HDLs are equipped to allow you to describe when exactly you want certain data where, in a deterministic (same every time, no randomness in delay unlike code run in a modern microprocessor due to process switching, interrupts, memory, etc.) way.

Theoretically, you could use a software language like C++ to describe hardware using High Level Synthesis (HLS), but issues with this is that you have much less control over the logic structures that are generated, so you could only guess at how much time or resources your logic will take before it actually gets synthesized. So for any application that is time critical, HLS is not feasible, so you have to use an HDL. On the other hand, HLS is quicker to make code for. So it’s all pros and cons to why we choose different programming languages.

You are viewing 1 out of 19 answers, click here to view all answers.