Languages and Environments Flashcards
Low level?
language that a computer will understand; consists of 0s,1s (machine code etc.)
High level?
language that a human will understand, use of English words such as repeat, if, loop etc.
Procedural?
code will be processed logicall and in a set order; passes data from one procedure to another using parameters.
Declarative?
consists of a knowledge base of facts and rules that can be queried
Object orientated?
Objects are created using classes that will contain code and data. data associated is known as attributes and its values are known as states; sub classes can inherit attributes from a pre defined class
Interpreter?
takes each line of source code, translates it into machine code then passes it to processor to carry out that instruction; it works its way through line by line.
Advantages of interpreter?
will run even if not finished, easy to spot errors.
Disadvantages of interpreter?
no copy of machine code is saved meaning the source code has to be translated every time, longer, slows down the running, you will need a translator program or you cannot run it.
Compiler?
reads the source code and translates the entire program into machine code once; machine code then saved and kept and doesn’t need to translated before ran.
Advantages of compiler?
one translated once, does not need translator program, quicker
Disadvantages of compiler?
you have to wait until code is complete and the errors have been fixed before the translation can be finished and the machine code is run, everytime it is changed needs to be re-translated.