
Andrew Coppin
Luke Palmer wrote:
OO is orthogonal to functional. Erlang is pure functional, Lisp is a bastard child...
2. I'm curios as to how you can have a functional OO language. The two seem fundamentally incompatible:
By writing an object that takes a parameter in its constructor (eg. Int) and has a member of type () -> Int, you have a closure, which is a let binding. Then you most likely have expression nesting, and you're done. You can, of course, also take a C struct and call the whole thing a chunk or whatever, but that's beside the point. In Java, you have inner classes, which make writing in a functional style verbose and ugly, but quite straight-forward. Heck, you can even use reflection to only allow non-sideeffect stuff. Any sufficiently restricted subset of any high-level assembler is an awkward implementation of your favourite declarative language. -- (c) this sig last receiving data processing entity. Inspect headers for past copyright information. All rights reserved. Unauthorised copying, hiring, renting, public performance and/or broadcasting of this signature prohibited.