5th Level Programming Language

0 views
Skip to first unread message

Delmiro Fain

unread,
Aug 5, 2024, 3:33:10 AM8/5/24
to omgetige
Incomputer science, a high-level programming language is a programming language with strong abstraction from the details of the computer. In contrast to low-level programming languages, it may use natural language elements, be easier to use, or may automate (or even hide entirely) significant areas of computing systems (e.g. memory management), making the process of developing a program simpler and more understandable than when using a lower-level language. The amount of abstraction provided defines how "high-level" a programming language is.[1]

"High-level language" refers to the higher level of abstraction from machine language. Rather than dealing with registers, memory addresses, and call stacks, high-level languages deal with variables, arrays, objects, complex arithmetic or Boolean expressions, subroutines and functions, loops, threads, locks, and other abstract computer science concepts, with a focus on usability over optimal program efficiency. Unlike low-level assembly languages, high-level languages have few, if any, language elements that translate directly into a machine's native opcodes. Other features, such as string handling routines, object-oriented language features, and file input/output, may also be present. One thing to note about high-level programming languages is that these languages allow the programmer to be detached and separated from the machine. That is, unlike low-level languages like assembly or machine language, high-level programming can amplify the programmer's instructions and trigger a lot of data movements in the background without their knowledge. The responsibility and power of executing instructions have been handed over to the machine from the programmer.


High-level languages intend to provide features that standardize common tasks, permit rich debugging, and maintain architectural agnosticism; while low-level languages often produce more efficient code through optimization for a specific system architecture. Abstraction penalty is the cost that high-level programming techniques pay for being unable to optimize performance or use certain hardware because they don't take advantage of certain low-level architectural resources. High-level programming exhibits features like more generic data structures and operations, run-time interpretation, and intermediate code files; which often result in execution of far more operations than necessary, higher memory consumption, and larger binary program size.[6][7][8] For this reason, code which needs to run particularly quickly and efficiently may require the use of a lower-level language, even if a higher-level language would make the coding easier. In many cases, critical portions of a program mostly in a high-level language can be hand-coded in assembly language, leading to a much faster, more efficient, or simply reliably functioning optimised program.


However, with the growing complexity of modern microprocessor architectures, well-designed compilers for high-level languages frequently produce code comparable in efficiency to what most low-level programmers can produce by hand, and the higher abstraction may allow for more powerful techniques providing better overall results than their low-level counterparts in particular settings.[9]High-level languages are designed independent of a specific computing system architecture. This facilitates executing a program written in such a language on any computing system with compatible support for the Interpreted or JIT program. High-level languages can be improved as their designers develop improvements. In other cases, new high-level languages evolve from one or more others with the goal of aggregating the most popular constructs with new or improved features. An example of this is Scala which maintains backward compatibility with Java, meaning that programs and libraries written in Java will continue to be usable even if a programming shop switches to Scala; this makes the transition easier and the lifespan of such high-level coding indefinite. In contrast, low-level programs rarely survive beyond the system architecture which they were written for without major revision. This is the engineering 'trade-off' for the 'Abstraction Penalty'.


The terms high-level and low-level are inherently relative. Some decades ago,[timeframe?] the C language, and similar languages, were most often considered "high-level", as it supported concepts such as expression evaluation, parameterised recursive functions, and data types and structures, while assembly language was considered "low-level". Today, many programmers might refer to C as low-level, as it lacks a large runtime-system (no garbage collection, etc.), basically supports only scalar operations, and provides direct memory addressing; it therefore, readily blends with assembly language and the machine level of CPUs and microcontrollers. Also, in the introduction chapter of The C Programming Language (second edition) by Brian Kernighan and Dennis Ritchie, C is described as "not a very high level" language.[10]


Assembly language may itself be regarded as a higher level (but often still one-to-one if used without macros) representation of machine code, as it supports concepts such as constants and (limited) expressions, sometimes even variables, procedures, and data structures. Machine code, in turn, is inherently at a slightly higher level than the microcode or micro-operations used internally in many processors.[11]


Note that languages are not strictly interpreted languages or compiled languages. Rather, implementations of language behavior use interpreting or compiling. For example, ALGOL 60 and Fortran have both been interpreted (even though they were more typically compiled). Similarly, Java shows the difficulty of trying to apply these labels to languages, rather than to implementations; Java is compiled to bytecode which is then executed by either interpreting (in a Java virtual machine (JVM)) or compiling (typically with a just-in-time compiler such as HotSpot, again in a JVM). Moreover, compiling, transcompiling, and interpreting is not strictly limited to only a description of the compiler artifact (binary executable or IL assembly).


There are some information, in one is said that C is low level, and another C is high level? When I read book of Dennis Ritchie and Brian Kernighan, there is written "C is a relatively "low level" language"?


It depends who you're talking to, and about what, as to what the answer is. C is a bit of a unique beast, though, because (as Mike pointed out in comments), it's the lowest-level of all general-purpose, architecture-independent programming languages, and these are the languages you're most likely to encounter in modern reality. So, in practice, you're likely to hear C being deemed "low level" unless you're talking to someone who fiddles bits in registers with a soldering iron for a living.


I've started learning assembly recently and as I've looked across the internet I see more and more people saying that assembly is not useless, but it's also not worth the time to program things in a language that requires such time and effort compared to high level languages. Is the efficiency between a high level language program and a low level one really not even noticeable enough to pay attention to nowadays, and is there another low level language like assembly that is more widely used?


Oftentimes, compilers generate a lot better assembly than developers can write. There are certain developers who can beat the compiler. But since writing low-level code requires more attention to details and is harder to write and maintain, it is usually only a small specific pieces of code that get implemented in assembly for efficiency. The difference can be noticeable. But it also can be not-noticable if developers do false-optimizations.


However, programming goes beyond software. Hardware needs to be programmed, too. There are hardware description languages (HDL) that can be used to program hardware (i.e. you can create your own CPU). The most popular HDL languages are Verilog and VHDL.


That's over and done with, a human can't beat neither the smarts built into a modern code generator nor its relentless attention to detail. The kind of detail required to know exactly when you insert a cache prefetch so the data is available at exactly the right time. And how reordering instructions just right gets you the best super-scalability. And inserting nops just right so jump targets are aligned. And how to unroll loops mechanically. And how to take advantage of auto-parallelizing provided by SIMD. Etcetera. And to do this not just once, but over and over again as the code changes.


Well, "assembly" is more of a collection of different varieties, actually. It's dependent on the architecture you're programming for. For example, assembly for x86 could (and will) greatly differ from assembly for ARM, or MIPS, or any architecture you can think of. This is caused by the fact that assembly is a one-to-one translation of the binary code the processor runs. As different architectures have different instruction sets, their assembly language differs too.


So really, assembly is the lowest you can go without writing plain binary code. But, it is not a specific language, rather than a group of languages. So, if you are talking about, for example, x86 assembly, and you compare that to another language of an equal low level, you would find that that other language would also be some variety of assembly. Then again, it would be for another architecture, so it wouldn't be very useful too.


Third, as the CEO of a software company, the success of our company lives and dies on the strength of our engineers, our ability to remove blockers to their effectiveness, and our collective ability to help them grow in their knowledge and skill.


The Developer Skill Matrix is a structured, subjective framework of the coding and non-coding characteristics of software engineers, accessible to technologists and non-technologists alike.

3a8082e126
Reply all
Reply to author
Forward
0 new messages