Home | About | Forum | Manual | Download | Screenshots

Conclusion

Apart for a few minor differences, what you've learned so far is applicable to all imperative languages. The syntax rules that you now know are nearly the same in C, Java, PHP, JavaScript, Perl and many other languages including Lua. But what makes them essentially different? What else is there that you have to learn?

Data structures

The only way of organizing data in memory that we have discussed until now is through variables. High level languages have constructs that allow you to manage entire sets of data. In Lua for example, we have the "table", which is an associative array of values. You can retrieve and store data in tables using their "index" value. I won't get into the implementation of tables, but you should understand that data structures allow you to store and access data in powerful ways.

my_table = {}
-- creates a new table

my_table[1] = "abc"
my_table[2] = 76

a = my_table[1] -- a equals "abc"
b = my_table[2] -- b equals 76

Platform

You already understand the basics of programming, but how do you actually "output" something on the screen? How do you save data to a file or read input from the keyboard? Traditionally, each language has its own extensions and libraries for manipulating the hardware. Fortunately, AGen framework already provides easier, more intuitive ways of loading files and rendering on the screen.

Design

Keeping your code manageable becomes increasingly more difficult as your program grows in size. There's no easy way around this hurdle. You could either stick to the ad hoc approach or strive to become a "proper" software engineer. A properly designed program doesn't have to be rewritten (much) to accommodate new features. Some higher level languages were created with the goal of guiding the overall design of your program. C++ and Java are centered around the "object oriented" paradigm where code is segmented into independent components (called "classes" or "objects") that interact with each other via "messages". Still, constructing a large-scale project requires much consideration and a lot of preliminary thought.

Compilation

Microprocessors understand only a limited set of "instructions" namely arithmetic calculations and operations for arranging memory. Any high-level programming language must be reduced to a series of such instructions that the CPU can understand. A compiler is the application which translates your source code into the CPU's native language, called "assembly". Compilation is an elaborate multi-stage process. Your code goes through "preprocessing", "syntax-directed translation", "bytecode emission", "linking" and other phases eager to "discover" and report errors. To master any language you must learn how the compiler interprets your code.