Now part 1.1 has been finished, and I have to say it's quite a different
experience.
But there is hardly more, since this is my first playing with functional
programming and I can't grasp much. Programming in Lisp IS fun, and
gives me some new and strange feelings.
====
1.1 is titled The Elements of Programming, and in sequence introduces
the fundamental parts of programming (languages): primitive expressions,
means of combination and means of abstraction. (The authors emphasize that,
when we describe a language, we should pay particular attention to the means
that the language provides for combining simple ideas to from more complex
ideas.
In this part there are only numbers and procedures, which are no much
different from other languages. Lisp treats data and procedures the same,
which differs from C-likes (but Python also has an elegant model of objects,
for now I am not sure of Lisp's view of variables and objects, it just says
'the name identifies a variable whose value is the object).
Lisp's means of combination is united and elegant, and very interesting :-).
It is powerful, which can be seen even from the simple toy programs in 1.1.
The book then demonstrates several of Lips's means of abstraction: 'define'
viables and procedues, the later being much powerful.
There is a 'substitution' model for apply procedures, which can use
applicative order or normal order.
And we have expressions to do condional processing and other things,
including the special forms: cond, if, and, or, as well as 'define'. 'Not'
is an ordinary procedure.
====
Procedures are black-box abstractions, thus enabling and stressing the
decompositon of the big problem into small subproblems. It also take us to
the level of 'procedual abstraction'.
Regarding this abstraction, there are local names, bound and free variables.
====
Environment seems to be a big thing and comes later in the book.
====
Since it just begins, this post may well need update. The book is in
an academic way, and results the academic taste of my post ;-)
Tuesday, August 19, 2008
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment