High Level Low Level Language

A language that is actually low level enough (i.e. to create an operating system, or embed assembly in its syntax, or..) but also high level enough.

"Enough" is a relative term.. but low level languages have some qualities and high level languages have some known qualities.

High and low are also relative.. but for example as a point of reference, everyone knows Assembly is low level. And if one can embed assembly into a language, that almost makes it low level enough to do anything... Some HighLevelLowLevelLanguage's have the ability to embed assembly, but it is not mandatory for a HighLevelLowLevelLanguage to embed assembly.

An example of a HighLevelLowLevelLanguage that doesn't necessarily embed assembly is one like OberonLanguage (which compiles itself and compiles an OS, but has high level features such as garbage collection, automatic strings, arrays, etc).

Another example is FreePascal, which one can write an operating system in, but it also has extremely high level features available such as Ansistrings, Widestrings, dynamic arrays, optional object orientation.

Another example is Ada, which can go to the bare metal.. but also has high level features.

A HighLevelLowLevelLanguage should be able to compile itself without help from other low level languages, since it is low level enough to do so. This is not a mandatory qualification for whether it is a HighLevelLowLevelLanguage though.

Actually, it seems a lot of the Algol style languages are HighLevelLowLevel?.

C++ can be considered a HighLevelLowLevelLanguage.

Current mainstream implementations of Java, PHP, Ruby are not so low level, and doesn't qualify as a HighLevelLowLevelLanguage.

Arguments could be made based on some special version of Java such as a Java compiler written for lower level purposes... but for simplicity sake this article discusses the popular implementations.. i.e. the Java Run Time, the PHP scripting language, the Ruby scripting language, etc.

Being able to compile is not enough to qualify as a HighLevelLowLevelLanguage otherwise any language that can a) write bytes into a file and b) call system() or the like to execute external programs qualifies. The embedding of assembly was on the right track. I think better criteria are a) being able to execute client processes in the scope of the application and b) being able to store these externally. In the simplest case these may be assembled byte blobs that are run in a sub process (but can take direct parameters from the parent).

That is why it is made clear in this article that that is not mandatory for qualification, it is just usually one of the qualities. Example C can compile itself.

[I'd say that the basic criterion for a low-level language is the ability to write device-drivers for new pieces of hardware - more explicitly, to support this through appropriate syntax and semantics (so you don't need to write another language inside your own to compile to BLOBs upon which you 'call system() or the like'. This does require the ability to control representation and memory placement down to the bit level, but does not require direct access to assembler or pointers (the applications of which may be abstracted declaratively).]

[There is, of course, no such thing as a 'highest' level language, but I'd argue that an 'appropriately high-level' language is one that lets you express your intent and skip expressing the arbitrary details about which you are unconcerned - any time you are forced to express a detail that you consider arbitrary (e.g. the size of an array, the sort algorithm - even the choice of sort algorithm, the storage mechanism for strings, etc.), it is an indicator that the language you are working in is lower level than you'd desire for the problem. Of course, no fixed well-defined language can be 'appropriately high level' for all problems. One could attempt to stratify different base languages (on the 'high-level-ness' of their primtives), but I think it is better argued that it is the ability to readily extend the language to BOTH support your expression of intent AND allow you to leave out the details about which you are unconcerned that most clearly marks a 'high level' language. This is affected by syntax; if you are stuck writing explicit 'for' loops when you want a 'foreach' (and you, for example, don't care about the order or how it gets from one to the other), then the language is failing to be properly extensible. Under this definition, one can note that most languages have limits on how far they can rise before they start losing efficiency (crossing 'layers' of abstraction), run afoul of GreenspunsTenthRuleOfProgramming (see KeyLanguageFeatures), or slam into walls (syntactic limits; limited ability to store contextual information about programmer intent, etc.), and sometimes one causing the other (e.g. when programmer intent is for efficiency or realtime guarantees, but crossing layers of abstraction is hurting efficiency or violating guarantees). These limits, thus, determine how 'high level' a language has the potential to be. Of course, the implemented extensions and libraries determine the more present-tense form.]



Examples:


See Also: HighLevelLanguage, LowLevelLanguage


EditText of this page (last edited May 13, 2008) or FindPage with title or text search