This is a lisp-like language, so expressions are basically array of atoms
and expressions. When I do a slice() this is to get a subset of the list,
but a subset is not an expression itself.Expression is-a Array, but Expression.slice is just an Array
Pragmatically, I'd suggest that you use the has-a relationship, as mentioned. Make the Array of atoms an instance variable of Expression, and give the Array an attr_reader. If you want to provide convenience methods that access the methods of the Array, that's fine, too. Modify the instance methods of Expression to act on the instance variable instead of on self.
Is there any reason that this would be bad?
Pedantically, it doesn't quite sound like Expression is-a Array. It doesn't satisfy Array's general contract. (See Liskov substitution principle - Wikipedia .)
Devin