On Tue, Mar 4, 2014 at 7:57 AM, Jan Wedekind <j...@wedesoft.de> wrote: > Hi, > I have written a small blog post about object-oriented programming with > GNU Guile and GOOPS [1]. Having used the Ruby programming language for some > time, I am quite spoiled when it comes to objects ;) > It took me a while to figure out defining constructors and dynamic > instantiation of OO primitives. I hope it'll save somebody else some time > one day. > Any comments and suggestions are welcome.
I liked this as a introductory article, but you should really fix the bug: "The same program would be much less verbose if Scheme was a dynamically typed language:" Scheme *is* a dynamically typed language. It's hard to say what you really mean here, because the ability to re-use the same operator can be done in both dynamically and statically typed languages (see for instance Haskell, or Python). The way this is usually done is through "interfaces," or in Haskell "type classes," which are similar in functionality to "interfaces," but completely different from a theoretical stand point. In the Lisp world, this sort of thing can be done using generic methods, or in the case of Clojure, something called "protocols" which again is pretty much just reification of an object with a specific interface. -- http://www.apgwoz.com