3 ms·
> With a general method_missing(), your compiler will not even catch spelling errors anymore. Ruby isn't compiled. Whether or not it catches typos is up to you
by epochwolf 16y ago
> With a general method_missing(), your compiler will not even catch spelling errors anymore.
Ruby isn't compiled. Whether or not it catches typos is up to your logic. All of my method_missing calls eventually hand off to the parent class's implementation when they can't match anything.
> The proper way to deal with duplication, as described in this article, is of course to use functors.
Except this is ruby. Ruby has modules to deal with duplication between classes and code blocks (closures, which can be bound to variables) for general use. It also allows for a rather clean implementation of the proxy design pattern via method_missing. Anything dealing with classes assumes OOP, not FP.
I only have begun to figure out that I don't know anything about FP but your comment seems rather absurd in this context.