Thread: High or Low Level Language ?

  1. #1
    Registered User
    Join Date
    Sep 2011
    Location
    Athens , Greece
    Posts
    357

    High or Low Level Language ?

    Hello to all.
    I Have a general question. I was looking up weather C is low or high .
    Some sources said that is low because it deals with pointers and memory management which is a low process.

    On the other hand many sources such as ->

    webopedia said that is high because :

    C enables a programmer to write programs that are more or less independent of a particular type of computer. The C Standard leaves lot of parts of the language unspecified , hence the behaviour of a programm may vary from one platform to another.... the abstraction here.

    What is your opinion?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    38,655
    "high" and "low" are terms used by Taxonomists and other cataloguers.

    It depends on their classification rules (which vary), and your viewpoint (which varies).

    To people who actually USE the language, the only real question is "is this the best tool for the job?".

    I doubt carpenters worry about "high" or "low" when it comes to choosing between chisels, hand saws or power planers.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Mid level, is what I'd call it.

    Certainly it isn't high, imo.

    Might want to prepend that level statement with "Wonderfully".

  4. #4
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    I doubt carpenters worry about "high" or "low" when it comes to choosing between chisels, hand saws or power planers.
    Obviously one would use a high level chisel when working on crown mold and a low level chisel when working on baseboard.

    Soma

  5. #5
    Registered User
    Join Date
    Sep 2012
    Posts
    357
    I call it a "Just-right Level" Language or JLL, as opposed to HLL or LLL :-)

  6. #6
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,906
    I have always heard C language being described as a "medium-level" language, grouped with languages like Java, C++ and FORTH - And low-level languages being Assembler based (non-portable)

    However, trying to find a source for this, I've seen C being described as "low-level" in lots of places Defining High, Mid and Low-Level Languages - Code Commit for example. I couldn't find a standard definition either
    Fact - Beethoven wrote his first symphony in C

  7. #7
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    It's both.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  8. #8
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    I agree with iMalc it really is both.

    The problem with the high/low taxonomy is that besides its irrelevance it also gives the wrong derogatory perception, that for example a "low level language" is "not as good/useful" as a "high level language". That is complete rubbish. The fact of the matter is that for some things a "low level language" is just what you need, while for others it is more useful to use a "high level language" that provides more abstraction, etc. It really all depends on what you are trying to accomplish.

    EDIT: I should also mention that in a recent poll of most used programming languages (can't remember which one) C came in first surprisingly, low level as it may be considered.
    Last edited by claudiu; 09-26-2012 at 03:39 AM.
    1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
    2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
    3. Get rid of conio.h and other antiquated DOS crap headers.
    4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.

  9. #9
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Low and high are relative concepts, not absolute.

    When talking about programming languages, the boundary (the level where something transitions from being "high" to being "low") is arbitrarily defined.

    Relative to assembler, C is generally considered a "high level" language. However, relative to other programming languages (say, Ada, Java) C is described as a "low level" language.

    Describing a language as "high level" language or "low level" can be done positively or negatively. People who care about being able to "get close to the machine" describe C as "low level" and consider that a positive attribute. Zealots of <name your other language> often describe C as a low level language in a derogatory way, usually because they are trying to convince people to use the advantages of their preferred "high level" language rather than C.

    Similarly, someone who loves programming in assembler on some obscure hardware will call C "high level" in a derogatory way, because C is not as close to the hardware as assembler. However, someone who wants to use C to get close to the machine, and want to discourage using assembler, will call C "high level" since they perceive that makes C better than their loved assembler.


    Personally, I consider the more important question is whether C is useful for doing whatever tasks you need it to do. If it is, then use it. If not, then find another language that is useful to you, and use that. It doesn't matter whether your chosen language is described as "high level", "low level", pink, green, object-oriented, functional, multi-paradigm, contractual, into bondage, sadistic or anything else. It is its usefulness that matters.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  10. #10
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    Low level. I agree with grumpy, except that I don't consider machine language or assembler as a "language" because they are defined by the hardware's instructions - a one-to-one correspondence. Whereas a language is something that requires substantial parsing and conversion from user's syntax to the machine's op codes. Therefore, among non-op-code languages 'C' is low level. Anyways, that's how I see it.

    Mr.Lnx "webopedia: C enables a programmer to write programs that are more or less independent of a particular type of computer. The C Standard leaves lot of parts of the language unspecified , hence the behaviour of a programm may vary from one platform to another.... the abstraction here."
    - I disagree with that. The fact that the C standard has so many holes that make its execution characteristics machine dependent does not make the language "high". It just makes the hardware's flavor seep through to annoy the programmer. Things like endianess, 'int' size, ASCII interpretation. The 'C" standard, whether it was through laziness or deliberate, leaves even its fundamental data types open to particular platforms. If the 'C' language is to take any credit for leaving things open, it's certainly at the expense of the programmer who must now contend with portability issues.

  11. #11
    Registered User
    Join Date
    Sep 2011
    Location
    Athens , Greece
    Posts
    357
    Thank you !

    Let's summarize

    1. There is no (important) value if C is low or high.

    2. High or low ? Is arbitratily defined as you said before.

    3. Abstraction has nothing to do with the fact that C standard leaves parts of the language open (implementation-defined) ???

    what is abstraction finally ?

  12. #12
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by nonoob View Post
    <snip> I don't consider machine language or assembler as a "language" because they are defined by the hardware's instructions - a one-to-one correspondence. Whereas a language is something that requires substantial parsing and conversion from user's syntax to the machine's op codes. Therefore, among non-op-code languages 'C' is low level. Anyways, that's how I see it.
    You have a very narrow interpretation of the meaning of "language". One english-language dictionary definition of "language" is a "set of symbols or signs used to communicate". By that definition, any set of hardware instructions is a language (used to communicate with the machine).

    There is no requirement that a language require "substantial" parsing. It is true that a language requires parsing because parsing is a process of interpreting data to extract meaning. For a human, assembly often requires substantial effort to interpret, but to a computer (or, more accurately, an assembler) it does not.

    Quote Originally Posted by nonoob View Post
    The fact that the C standard has so many holes that make its execution characteristics machine dependent does not make the language "high".
    It doesn't typically make the language "low" either. There are ambiguities in most languages. According to the Oxford English dictionary, the 500 words used most in the English language have on average 23 different meanings.

    By several definitions, english can be described as either a high or a low level language, albeit not a computer programming language.

    If you dig into the corners of most programming languages, there are instances of ambiguity, things not properly defined. Some languages are marketed as being unambiguous and having left nothing undefined because they have some "benchmark" implementation .... which might mean a compiler behaves consistently if it is certified as complying with the benchmark, but does not mean that two humans will interpret a specified code in the same way.

    Quote Originally Posted by nonoob View Post
    It just makes the hardware's flavor seep through to annoy the programmer. Things like endianess, 'int' size, ASCII interpretation. The 'C" standard, whether it was through laziness or deliberate, leaves even its fundamental data types open to particular platforms. If the 'C' language is to take any credit for leaving things open, it's certainly at the expense of the programmer who must now contend with portability issues.
    The things left unspecified (or implementation defined, or undefined) in the C standard are mostly deliberate. The purpose is to allow a C implementation (compiler, etc) to be implementable on a wide range of hardware. Many of the things left undefined in C might annoy programmers, but they are undefined because instances cannot always be reliably (unambiguously, consistently) detected or reported.

    Despite grandiose claims made by advocates of some programming languages, I have yet to encounter any programming language or facility that has absolutely no portability issues, except for languages that are specific to a particular platform (eg hardware or operating system) - assuming you believe that complete inability to port a program equates to no portability issues. It is true that C has more "portability issues" than some other languages, but it is also possible to port C code - either without modification, or with minimal modification - to a wider range of target platforms than is possible with most other programming languages.

    It is also possible for two speakers of any natural language (english, chinese, russian, swahili) to misunderstand each other, because of variations in how the languages are interpreted (accents, quality of teaching, etc). Programming languages are no different.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  13. #13
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,906
    I don't consider machine language or assembler as a "language" because they are defined by the hardware's instructions
    I'll have to side with Grumpy with this one - I believe that any programming that has rules to its formation is a language.

    (Also, wiki's page for Assembly is called "Assembly Language" - Wiki would never lie... :P)
    Fact - Beethoven wrote his first symphony in C

  14. #14
    Registered User
    Join Date
    Sep 2008
    Location
    Toronto, Canada
    Posts
    1,834
    I guess we can quibble about whether assembly "language" is a language or just an instruction-by-instruction collection of mnemonics. A notation. I view a true language as something that is a considerable abstraction from machine code. One that required language theorists to devise on a white board using state tables. Whereas any hardware chip straight off the assembly line has a set of instructions that’s written up in its spec sheet - that are the basis of a mnemonics table and opcode equivalent bit patterns. No language is layered on that so far.

    The reason assembly gets the word 'language' attached to it is because words/mnemonics are typed in by the programmer. Machine-language in its rawest form used to mean entering bits using switches on the front panel. I suppose binary and switch toggling can be called a language if you stretch it. In that case anything is a language if it involves even the most trivial conversion from one form to another.
    Last edited by nonoob; 09-28-2012 at 07:20 AM.

  15. #15
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,323
    Quote Originally Posted by nonoob
    The reason assembly gets the word 'language' attached to it is because words/mnemonics are typed in by the programmer.
    Actually, I think that is the reason why it gets the word "programming" used to describe it, i.e., programming as the activity of writing a program. I see the reason as to why it gets the word "language" attached to it in that it has grammatical structure in its syntax and vocabulary. Likewise for "machine language".

    Quote Originally Posted by nonoob
    I suppose binary and switch toggling can be called a language if you stretch it. In that case anything is a language if it involves even the most trivial conversion from one form to another.
    Yeah, it might feel like a stretch, but the notion of "language" according to linguists and some areas of computer science are definitely not what most people would perceive as "language", yet they are so when you look at grammar.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. High level assembler...
    By CommonTater in forum Tech Board
    Replies: 3
    Last Post: 09-25-2011, 06:05 PM
  2. Is C++ or C language is a high Level language?
    By uthmankhale in forum C++ Programming
    Replies: 5
    Last Post: 08-25-2011, 06:00 PM
  3. Replies: 0
    Last Post: 08-25-2010, 08:04 AM
  4. C/C++, low or high level?
    By Sentral in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-23-2007, 11:43 PM
  5. nVidia's NEW high-level programming language for 3d graphics
    By Captain Penguin in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-13-2002, 08:16 PM