On 3/11/06, kwatch <kwa / kuwata-lab.com> wrote:> To define abstract method in Ruby, I use NotImplementedError like the> following:
In the last four years of using Ruby, I thought I needed abstractmethods in the first few months. Then I learned what value Modules asmixins gave me.
I do not believe that this is a common enough need that it needs to bein the core of Ruby.
I encourage you to do what others have done with this sort ofmismatched feature and make a library that implements it and make itavailable for use. Your pure-Ruby implementation looks more thansufficient.
More than that, though, I encourage you to rethink why you needabstract methods. Most of the time this is because you're thinking interms of C++ or Java inheritance, when Ruby's mixins are both morepowerful and applicable in most cases where you would define ahierarchy that has abstract methods.
-austin--Austin Ziegler * halostatue / gmail.com               * Alternate: austin / halostatue.ca