blob: 0bf25d98b9f37bbddc07e000bee4b8b72740d636 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Every powerful programming language should have the following three things:
* Primitive data types and procedures
* Means to create compound elements from primitive ones
* Means to create abstractions; compound elements are named and can be manipulated
Primitives are elementary particles of programming languages.
Primitive data are booleans, integer numbers, floating point numbers and characters (which are encoded as integers).
Primitive procedures operate on primitive data: + * / etc.
Expression: anything that has a result.
Combination: list of expressions wrapped (delimited) by parenthesis
(+ 1 2)
^ --> operands -> evaluate -> arguments
operator |
^ |
procedure <-----------------------<
prefix notation:
- unambigously specify any nr of operands
- arbritary nesting (+ 1 (+ 1 (+ 1 2))) is easy
bookmark: https://sarabander.github.io/sicp/html/1_002e1.xhtml#g_t1_002e1 1.1.2
|