Low-level programming language: Difference between revisions

Content deleted Content added
Rewrote the C section (no pun intended) to fix some truly terrible grammar, clarify some points, add references, and use more encyclopædic language
Line 109:
These abstractions make the C code compilable without modification on any architecture for which a C compiler has been written, whereas the assembly language code above will only run on processors using the x86-64 architecture.
 
== C programming language ==
{{Main | C (programming language)}}
C has variously been described as low-level and high-level.<ref>Jindal, G. et al., January 2013. "Comparative study of C, Objective C, C++ programming language", ''International Journal of Advanced Trends in Computer Science and Engineering'', 203.</ref> Traditionally considered high-level, C’s level of abstraction from the hardware is far lower than many subsequently developed languages, particularly interpreted languages. The direct interface C provides between the programmer and hardware memory allocation and management make C the lowest-level language of [[Programming_language#Measuring_language_usage|the 10 most popular languages currently in use]].
C programming language is low level architecture independent programming language. In the 1980s, C was considered to be high level, a time that direct assembly was common. However due to introduction of high level languages that get interpreted like [[Python (programming language) | Python]],[[Java (programming language) | Java]] and many others that completely abstract from low level detail, C is considered low level.
 
C is architecture independent — the same C code may, in most cases, be compiled (by different machine-specific compilers) for use on a wide breadth of machine platforms. In many respects (including directory operations and memory allocation), C provides “an interface to system-dependent objects that is itself relatively system independent”.<ref>Kernighan, B., and Ritchie, D., 1988. ''The C Programming Language, 2nd Edition'', 163</ref> This feature is considered “high-level” in comparison of platform-specific assembly languages.
C lacks high level programming characteristics that high level language provide like [[Object-oriented programming | OOPs]]. A programmer can implement his/her own objects and object management methods using functions and structures, but that doesn't make C an object-oriented language.
 
Since the programmer has full control over program memory (including, but not limited to, allocation and deallocation), mismanagement of those resources may result undefined behaviour including program crashes or leaking resources.
 
== Low-level programming in high-level languages ==