3 ms·
I recently implemented a simple object system [0] using only closures and macros in a Lisp-dialect [1] I'm working on. One thing that struck me is how little i
by codr7 8y ago
I recently implemented a simple object system [0] using only closures and macros in a Lisp-dialect [1] I'm working on.
One thing that struck me is how little it bothers me that objects look like functions from the outside, and that any callable value could be used in their place.
It helps that the whole thing is quarantined in a separate library and that objects live in a separate namespace. And that it rests on top of a strongly typed environment.
Judging a type system outside of its context based on some arbitrary check list is pretty useless from my experience.
[0] https://github.com/codr7/g-fu/blob/master/v1/doc/functional_objects.md https://github.com/codr7/g-fu/blob/master/v1/doc/functional_...
[1] https://github.com/codr7/g-fu/tree/master/v1 https://github.com/codr7/g-fu/tree/master/v1