From: matz@... (Yukihiro Matsumoto) Date: 2000-03-17T18:39:20+09:00 Subject: [ruby-talk:01961] Re: no Fixnum#new ? Hi, In message "[ruby-talk:01942] no Fixnum#new ?" on 00/03/16, Quinn Dunkan writes: |But how could I make a class Myint that derives Integer? If I derive Integer |and do Myint.new, what I get is not so useful since Integer is an abstract |base. But if I derive Fixnum, I now have no way to create Myints since |Fixnums and Bignums don't have new constructors... Fixnums are immediate data, so that you can't inherit from it. Bignums can have constructor, but I haven't prepared for consistency with Fixnums. |Also, is it considered good ruby form to modify existing classes? It seems |scary to me because it's like modifying global values: all the sudden, the |order you import modules becomes important, and all the other nastiness that |mutable globals bring to the table... I do NOT recommend it for serious projects. It is real easy to abuse. But it's handy sometimes as long as you take your own risk. matz.