Comparative Flashcards

1
Q

What is Object Oriented programming and give 3 examples

A

Programming style, using objects and classes to define the system
C#, Java and C++

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is procedural programming and name 3 examples

A

Programming style, structured around procedures/functions

Python, C and FORTRAN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is functional programming and name 3 examples

A

Programming style, structured around higher order functions (closures), in a controlled manner
Lisp, Haskell and ML

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is declarative programming and name 3 examples

A

Strucutred around the things you want to be true

Prolog, ASP, Lisp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does it mean for a programming language to have no style, and give an example

A

Unstructured language, so no support

Assembler, machine code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a “style” in the context of a programming language, and why are they needed?

A

An approach to programming or an aspect of the design of a programming language, designed to keep things structured, turning things into “blobs” to abstract finer detail
This is a near necessity with larger programs, especially if teams are working on it

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define what a “family” is in the context of programming and give some examples

A
A family is a collection of languages that share similar features and often have the same styling
e.g.
C - Procedural
Haskell, Lisp - Functional
Prolog, ASP - Logic
Python - Procedural and scripting 
Java - Procedural and OOP

Reminder, they’re rather fuzzy and aren’t strictly defined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is an unstructured language? Briefly describe it

A
No structure
Used in early CS days
Good only for small programs
Allowed us to realise that structures are needed
Assembly code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a procedural language? Briefly describe it

A

General programming, C, Fortran, Cobol, Pascal, Oberon, Agol, Basic, Maple
Use of functions to provide structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a logic language? Briefly describe it

A

Prolog, ASP
Don’t describe how to do something, just what you want as an answer
Much less popular, difficult for general usage
Used in early AI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a functional language? Briefly describe it

A

General and symbolic programming
Lisp, Haskell, ML, Erlang, Scala
Use of higher order functions to provide structure and control complexity
Functions are first class (are values in their own right)
Datastructures are treated holistically (add one to all values in this vector, rather than iteratively adding one to each)
More natural way of thinking, if OOP and procedural wasn’t standard.
Better for parallel computing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a macro language? Briefly describe it

A

Improve readability of other code, abstraction and textual manipulation
Cpp, Latex, M4, Macros in Lisp
Usually lexical based
If you see something like this, replace it with that
Used in conjunction with other languages, i.e. C preprocessor to modify code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a scripting language? Briefly describe it

A

Control other elements of a system, program glue
DOS batch, sh, Python, Sed, Perl, ruby, JS
Not good at classical number crunching, but typically string processing
Often interpreted over compiled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is an event driven language? Briefly describe it

A

Interactive systems
Visual Basic, Simula, SPICE, swing, Tcl/Tk, Qt, GTK
Typically event driven libraries using existing languages
Based on the concept of things happening off events rather than pre defined orders
Typically can be implemented in normal languges, but some like Simula are designed with it in mind
Gui

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is a simulation language? Briefly describe it

A

Simulation?
Objects interact by events (e.g. molecules colliding)
Triggers behaviour, change of direction for example
Simula, SPICE etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is a type and why is it different to a class?

A

A type is