Shyouhei Urabe wrote: > A class is a datatype. If one class and another have real identical data structures in common, there should be some relationships between them. Note what I'm talking about is about their data structures; not their behaviours. Ruby has ducky types so class inheritance depends exclusively to their ways of storing data. Data class is there because two T_DATA based classes should have some relationships in between. And yet, it is possible to define a T_DATA based class which does not inherit from the Data class. It is a good practice to avoid this situation and to inherit from Data? What benefit does Data provide? In 1.8, rb_cData is used in these extension files only: Win32API/Win32API.c iconv/iconv.c stringio/stringio.c tk/tcltklib.c curses/curses.c win32ole/win32ole.c And rb_cData is used as a base class in only 3 cases in these files. (Otherwise, it is used directly in Data_Wrap_Struct.) What common data structure (or other relationship) is there between Iconv, StringIO, and Curses::Window? But Data_(Wrap|Make)_Struct are used in quite a few more extensions with no reference, direct or indirect, to rb_cData. AFAICT, rb_cData is not documented in README.EXT. > Another reason why it is visible to you, is that MRI tend not to hide > its internals to chat you. If you have any good reason to hide the > class from your eyes, there can be chances for us to do so. But we > have not met such reasons. Agreed, if it's there it should be exposed. But still not sure why it's there?