Which programming languages aren't considered high-level? [closed]

自作多情 提交于 2019-11-28 21:16:55

问题


In informatics theory I hear and read about high-level and low-level languages all time.

Yet I don't understand why this is still relevant as there aren't any (relevant) low-level languages except assembler in use today.

So you get:

Low-level

  • Assembler

Definitely not low-level

  • C
  • BASIC
  • FORTRAN
  • COBOL
  • ...

High-level

  • C++
  • Ruby
  • Python
  • PHP
  • ...

And if assembler is low-level, how could you put for example C into the same list. I mean: C is extremely high-level compared to assembler. Same even for COBOL, Fortran, etc.

  • So why does everybody keep mentioning high and low-level languages if assembler is really the only low-level language?

回答1:


According to Wikipedia, the low level languages are machine code and assembly.

From the source:

In computer science, a low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture. The word "low" refers to the small or nonexistent amount of abstraction between the language and machine language; because of this, low-level languages are sometimes described as being "close to the hardware."

Then, to answer:

So why does everybody keep mentioning high and low-level languages if assembler is really the only low-level language.

I don't know who "everyone" is, but I would venture a guess that back when high-level languages were not as commonplace as they are today, it was more relevant to talk about low-level vs. high-level (because there was a relatively significant amount of programmers writing assembly code). In modern times it is a less important distinction. Personally, I rarely hear people using these terms except to differentiate between assembly or not (except for those times when you might hear someone raised on Python referring to C or C++ as low-level, but this is not in the spirit of the original definition).




回答2:


You will find that

many of the truths we cling to depend upon our own point of view.

For a C programmer, Assembler is a low-level language. For a Java programmer, C is a low-level language and so on.

I suspect the folks programming the first stored-program computer with 1s and 0s would have thought Assembler a high-level language. It's all relative.

(Quote from Return of the Jedi)




回答3:


You're asking a relatively subjective question; it's a question about terminology, that vernacular, and perspective.

For example, is Lisp a high-level or a low-level language? What if the implementation is running on a Lisp Machine?

Often, when people attempt to build a spectrum from low-level to high-level, what they are trying to quantify is a degree of "closeness to the hardware" as opposed to the degree of "abstraction."

Qualities which count toward an implementation's closeness to the hardware:

  • The programmer directly controls the memory layout of data and has access at run-time to memory addresses of data.
  • Mathematical operations are defined in terms of the hardware or loosely defined in order to conform to different types of hardware.
  • There may be a library providing dynamic memory allocation, but use of dynamic memory is manual.
  • Management of memory during string manipulation is manual.

Converse qualities which count toward an implementation's abstraction from the hardware:

  • The programmer does not have run-time access to address of data (references instead of pointers).
  • Mathematical operations are defined in specific terms not tied to specific hardware. (e.g., ActionScript 3 supports the Number type which self-converts from integer to floating-point rather than experience overflow.)
  • Management of dynamic memory is handled by the environment, possibly through reference counting, garbage collection, or another automated memory management scheme.
  • Management of memory during string manipulation is always hidden from the programmer and handled by the environment.

Other qualities might render a language very abstract compared to the hardware on which it runs:

  • Declarative, search-based syntax. (e.g. Prolog)

With factors like these in mind, I would revise the spectrum you have written as follows:

Lowest level:

  • Assembly language of the platform in question.

Low-level languages with higher-level flow control than assembly:

  • C, C++
  • Pascal

High-level languages:

  • FORTRAN
  • COBOL
  • Python
  • Perl

Highest-level languages:

  • PROLOG
  • Python
  • Scheme

Python appears twice by intent -- it spans a portion of the spectrum depending on how the code is written.




回答4:


As low-level, I would add:

  • .NET IL
  • Java JVM
  • Other P-Code used in environments like VB6



回答5:


The "level" of a language is a moving target. In 1973, PL/I was considered a high-level language. Today, C is considered (at least by language professionals) as a low-level language [see footnote]. Some of the reasons:

  • Exposes machine-level representations of numbers
  • "Integer" arithmetic can overflow
  • No real support for strings, or at the very least, strings are not first-class
  • Manual memory management
  • Address arithmetic
  • Unsafe

A high-level language might include

  • Support for integer types independent of the target machine
  • Default integer arithmetic never overflows unless the machine runs out of memory
  • Strings as first-class values with, e.g., concatenation built in
  • Automatic memory management with no address arithmetic
  • Safe

Some candidates as "high-level languages" by this definition might include Icon, Scheme, Smalltalk, and some of your favorite scripting languages.

Back in the day when I was a young scholar and dinosaurs roamed the earth, people referred to Icon as a "very high-level language". As recently as 15 years ago you could even attend a learned symposium on Very High Level Languages. But that term isn't used much any more.

Why does everybody keep mentioning high and low-level languages?

Even though the difference between "high" and "low" keeps changing, distinctions like the ones listed above are still important. And there are so many distinction that the words "high" and "low" can be a useful shorthand. But not that useful—to a cynic, a high-level language is one that looks at least as powerful as whatever my favorite language is, and a low-level language is everything else. In other words, "level" can easily degenerate into mere name-calling.

Footnote: It's hard to find citations for terminology used at professional meetings, especially when professionals don't use the terms "low-level" and "high-level" because they're not so technical. But danben asked about citations, and I found a couple:

  • "To provide the required precision, experimental programs are usually written in a low-level language (eg C or Pascal)," in a refereed article on computer vision.

  • "The C programming language is well-known for its flexibility in dealing with low-level constructs," in an important paper by Necula et al.


P.S. Don't count too heavily on Wikipedia for good information on programming languages, especially if the Wikipedia reference cites no references or sources




回答6:


Purely guessing here, but this may be a case of language-shift, whereby the distinction between low- and high-level langauges is slowly evolving in peoples' minds into the difference between managed- and unmanaged-languages, typed-and untyped-languages etc.etc. (at least in the way people are using the terminology).




回答7:


To a large extent, "low-level" and "high-level" not binary categories but are a continuum. There are some languages that are clearly low-level (assembly, machine code), but beyond that there is really only "higher-level" and "lower-level".

As I see it, "lower-level" languages require code that looks more like the architecture of the computer, and "higher-level" languages accept code that looks more like the structure of the problem. But with that, languages can be high-level for one problem and low-level for another.




回答8:


Low-level Binary Assembler

ET IL Java JVM Other P-Code used in environments like VB6

Definitely not low-level

C BASIC FORTRAN COBOL Python Perl Pascal

High-level C++ Ruby Python PHP PROLOG Scheme



来源:https://stackoverflow.com/questions/2624781/which-programming-languages-arent-considered-high-level

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!