1. What is the difference betwen high level languages and low level languages?
  2. What does a high level language do that a low level language cant?
  3. Is c# an extnsion to c++?
3 Years
Discussion Span
Last Post by iConqueror

What is the difference betwen high level languages and low level languages?

Here is a bash script to answer your question:

echo "high level languages" | sed -e 's/\ /\n/g' > hl.txt
echo "low level languages" | sed -e 's/\ /\n/g' > ll.txt
diff hl.txt ll.txt
rm hl.txt ll.txt

Run this and you will know exactly what is the difference between "high level languages" and "low level languages".

If the answer does not satisfy you, then there is always google.

What does a high level language do that a low level language cant?

That question is inverted. Low level languages can do a lot of things that high level languages cannot do, not the other way around. High level languages allow you to easily do the things that you usually do often and/or produce complex applications with very few lines of code. But, fundamentally, high level languages are detached from the hardware, are sandboxed into virtual machines / interpreters / renderers (e.g., browsers), are domain-specific (e.g., SQL, Matlab, etc.), and hide away many implementation details and does not grant the programmer access to them. So, there are tons of limitations associated with high level languages as a result of that, but for 99% of the kind of work you do with those languages, that's not a problem. Most low level languages are virtually limitless when it comes to what you can do with them, however, they don't make your life easy when it comes to building large and complex applications or libraries.

Is c# an extnsion to c++?

No. Definitely not. C# was designed as a mix of Java and Delphi, and to be the language of the .NET platform. Despite having "C" in its name (for marketing reasons, obviously), it's not related to C++ in any way. The guy who designed the Delphi language was brought in by Microsoft to design a language to be a direct competitor to Java, and I don't see much C++ influence in it at all. And for C# to be an "extension" of C++, there would need to be backward compatibility, as in, you should be able to compile C++ code in a C# compiler, which is very obviously not possible, far from it. You can say that C++ is an extension of C because C is (nearly) a subset of C++ (most C programs will compile in a C++ compiler, with minimal changes, if any). Also, all (or most of) the features of C++ would have to be present, somehow, in C# for it to be considered an extension to C++, and that's not the case at all. The language feature-set of C# is far more limited than that of C++, and it lacks too many of the hallmark features of C++ like automatic resource management, zero-overhead abstractions, compile-time code validation, templates, etc..

The reality is, when you examine the C# language it's very clear that it's literally Java and Delphi smashed together, taking mostly the best of those both worlds (to their credit), but there is essentially no C++ influence in it (except through Java's syntactic resemblance to C++).

Technically-speaking, the .NET language that is an extension to C++ is the C++/CLI language, which is a kind of Frankenstein language that tries to blend together two languages, C++ and C#, and the result is not very nice, given how different and unrelated those two languages are. Most people seem to prefer doing .NET stuff in C# and doing native coding in C++, and don't try to mix the two in a single language (because you can just call functions between them, you don't need to actually blend the two environments together, like C++/CLI does).

Votes + Comments

Low level languages are close to the hardware. They directly deal with the computer's memory, CPU, etc. Then, higher level languages are built to automatically use the functionality of the low level stuff, so that you don't have to keep rebuilding the wheel ... the higher you go, the more abstracted away you are from the inner workings of what's really going on under the hood.

For example, a low level language might be used to create mouse drivers and instruct the computer that moving the mouse should move the cursor around the screen.

Then another language might be used to design a web browser. When writing the web browser application, you just need to write instructions saying how the computer should behave when the mouse clicks on a button or a link. You don't have to go back to the drawing board and start giving it instructions on how signals are passed between the mouse and the computer, the keyboard, display drivers for the monitor, etc. That's because your web browser application is written on top of your operating system, and therefore it's abstracted away.

Certain languages are considered more low level (such as Assembly or C) and certain language are considered more high level (such as the languages of the .NET framework).

Votes + Comments

Tip: learn both.

Even if you're programming in a high level language, sometimes it's usefull to know whats going on underneath. For example, say knowing how tail-recursion can effect the stack, or say knowing the mechanics of stack smashing. Even futher, understanding how the Cashe works (this is hardware-low level) will have a direct impact on how even your theoretical algorithms operate. (For example, there are algorithms out there for Cashe friendly prime seives).

Even then, high and low level languages are relative. If you're programming in C#, you might think that C is a low level language while C# is high level. If your programming in C, you might thing that C is a high level language while assembly is low level. If your writting an assembler, you might think that assembly is high level, and produced machine code is low level. Yet again, if your programming in Verilog (which describes hardware), you might think that the machine code is high level, while you're programming on a low level. And again, if your designing the circuit from gates, you might assume that Verilog is high level. If your wiring up your own hand-made computing using logic gates... Well, then you can safetly assume that your programming in fairly low level environment.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.