From: William Morgan Date: 2005-07-08T05:07:19+09:00 Subject: Re: Inheriting Array and slice() behaviour Excerpts from Austin Ziegler's mail of 7 Jul 2005 (EDT): > In an OO language, a slice of an Expression should be an Expression if > Expression is a descendant of Array. I'd say that's probably a requirement for a well-written OO Expression *class*, depending on what exactly it's supposed to be doing. The question is whether the language should---or even can---enforce that. In particular, what if Expression#initialize takes parameters that, for sub-expressions, need to be determined from some combination of the receiver's state and the arguments to #slice? That's the situation here, and it needs to be explicitly handled by the author. Anything Ruby does automatically will be wrong. -- William