Coffeehouse Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Creating programmaing languages

Back to Forum: Coffeehouse
  • User profile image
    spiderLab

    I am not a computer scientist, I know my way around programming in high-level languages, and learning everyday(almost). What I often thinking of is how do they create these languages?

    So far I've found out on my own,(please correct me if I am wrong) that these languages when compiled is translated to machine language

    Does that mean when you create a programming language you are programming using numbers as your tool?

    Maybe a bit silly, but I want to know how this stuff works, from top to bottom.

    thanks in advance for enlightening me

  • User profile image
    Manip

    Most modern computer languages don't get what you input and convert it directly to machine code, but instead they convert it to an intermediate language.

    - Binary (machine code)
    - Assembly (1 binary = 1 assembly)
    - Assembly + Lib, Macro's (Pre-defined functions etc)
    - Intermediate Language
    - Programming Language (C/C++, BASIC)

    The compiler moves down and converts the 'code' into all those stages until finally binary is the result. Some compilers use an internal intermediate but not all. This should not be confused with JAVA/.Net because this intermediate code is not stored/executed.

    Most compilers are written using normal mid level languages. Currently 'C' is the most popular platform for this job. This is the case because C can operate as both a high and low level language thus giving the developer a lot of power.

  • User profile image
    samdruk

    I'd only add that I'm quite sure that C++ is more popular than C for compilers. I wouldn't go so far as to say there's a clear majority--there are far more programming languages and compilers in the world than most engineers experience regularly. There are only a few generally available general purpose PL's, but many more used for specialized types of programming. There was a time that large machines came with their own custom PL's in fact (think telephone switches, factory automation equipment, etc).

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.