Compiling to Machine Code Some languages require programs to be transformed directly into Machine Code- the instructions that a CPU understands directly. This transformation process is called compilation. Assembly Language, C, C++ and Pascal are compiled languages.
.Because compiled programs almost always run faster than interpreted, languages such as C and C++ tend to be the most popular for writing games. Java and C# both compile to an interpreted language which is very efficient. Because the Virual Machine that interprets Java and the .NET framework that runs C# are heavily optimized, it's claimed that applications in those languages are as fast if not faster as compiled C++.
Level of Abstraction
The other way to compare languages is level of abstraction. This indicates how close a particular language is to the hardware. Machine Code is the lowest level with Assembly Language just above it. C++ is higher than C because C++ offers greater abstraction. Java and C# are higher than C++ because they compile to an intermediate language called bytecode.
How Languages Compare
•Fast Compiled Languages
•Reasonably Fast Interpreted
Machine Code is the instructions that a CPU executes. It's the only thing that a CPU can understand and execute. Interpreted languages need an application called an Interpreter that reads each line of the program source code and then 'runs' it.
Interpreting is Easier
It's very easy to stop, change and re-run applications written in an interpreted language and that is why they're popular for learning programming. There is no compilation stage needed. Compiling can be quite a slow process.A large Visual C++ minutes to hours to compile, depending on how much code has to be rebuilt and the speed of memory and the CPU.
When Computers first appeared
When computers first became popular in the 1950s, programs were written in machine code as there was no other way. Programmers had to physically flip switches to enter values. This is such a tedious and slow way of creating an application that higher level computer languages had to be created.
Assembler- Fast to Run- Slow to Write!
Assembly language is the readable version of Machine Code and looks like this
Because it is tied to a particular CPU or family of related CPUs, Assembly Language is not very portable and is time consuming to learn and write. Languages like C have reduced the need for Assembly Language programming except where RAM is limited or time critical code is needed. This is typically in the kernel code at the heart of an Operating System or in a video card driver.
Assembly Language is the Lowest Level of Code
Assembly Language is very low level- most of the code just moves values between the CPU registers and memory. If you are writing a payroll package you want to think in terms of salaries and tax deductions, not Register A to Memory location xyz. This is why higher level languages like C++, C# or Java are more productive. The programmer can think in terms of the problem domain (salaries,deductions, and accruals) not the hardware domain (registers, memory and instructions).
Systems Programming with C
Perl- Websites and Utilities
Very popular in the Linux world, Perl was one of the first web languages and remains very popular today. For doing "quick and dirty" programming on the web it remains unrivalled and drives many websites. It has though been somewhat eclipsed by PHP as a web scripting language.
Coding Websites with PHP
PHP was designed as a language for Web Servers and is very popular in conjunction with Linux, Apache, MySql and PHP or LAMP for short. It is interpreted, but pre-compiled so code executes reasonably quickly. It can be run on desktop computers but is not as widely used for developing desktop applications. Based on C syntax, it also includes Objects and Classes.
Pascal was devised as a teaching language a few years before C but was very limited with poor string and file handling. Several Manufacturers extended the language but there was no overall leader until Borland's Turbo Pascal (for Dos) and Delphi (for Windows) appeared. These were powerful implementations that added enough functionality to make them suitable for commercial development.
C++ - A Classy Language!
C++ or C plus classes as it was originally known came about ten years after C and successfully introduced Object Oriented Programming to C, as well as features like exceptions and templates. Learning all of C++ is a big task- it is by far the most complicated of the programming languages here but once you have mastered it, you'll have no difficulty with any other language.
C# - Microsoft's Big Bet
C# was created by Delphi's architect Anders Hejlsberg after he moved to Microsoft and Delphi developers will feel at home with features such as Windows forms.C# syntax is very similar to Java, which is not surprising as Hejlsberg also worked on J++ after he moved to Microsoft. Learn C# and you are well on the way to knowing Java.Both languages are semi-compiled, so that instead of compiling to machine code, they compile to bytecode ( C# compiles to CIL but it and Bytecode are similar) and are then interpreted.
ActionScript - A Flashy languasge!
Basic for Beginners
Basic is an acronym for Beginners All purpose Symbolic Instruction Code and was created to teach programming in the 1960s. Microsoft have made the language their own with many different versions including VbScript for websites and the very successful Visual Basic. The latest version of that is VB.NET and this runs on the same platform .NET as C# and produces the same CIL bytecode.[h3Lua A free scripting language written in C that includes garbage collection and coroutines. It interfaces well with C/C++ and is used in the games industry (and non games as well) to script game logic, event triggers and game control.
Links to Other Programming Language Resources