Since modern functional languages (i.e., not lisps) by default use early bound polymorphic functions (efficiently), and that object orientation is just a special way of organizing polymorphic functions, this is not very different if you know how to correctly create encapsulated classes .
Lisps use late binding to achieve a similar effect. Honestly, there is not much difference, except that you do not explicitly declare the type structure.
If you programmed extensively using the functions of the C ++ template, you probably already have an idea.
In any case, the answer is small “classes”, and instead of changing the internal state, you need to return a new version with a different state.
Marcin Oct. 10 '08 at 16:20 2008-10-10 16:20
source share