--1926193751-337301410-12552981556945 Content-Type: MULTIPART/MIXED; BOUNDARY="1926193751-337301410-1255298155=:16945" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --1926193751-337301410-12552981556945 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT Hi -- On Mon, 12 Oct 2009, dreamcat four wrote: > On Sun, Oct 11, 2009 at 6:55 PM, Robert Klemme > <shortcutter / googlemail.com> wrote: >> Having said that I am not sure that you actually need a language construct >> when you can do this: >> >> >> class A >> class <<self >> def foo >> @foo || superclass.foo >> end >> end >> > > It shouldn't be mandated to re-invent the wheel in any programming > language, even if its fun style / fun to write. Here is why Robert: > because you would have just put 2 bugs into your code. But using the available techniques in a language to put together something higher level is not "re-inventing the wheel" (unless you do it repeatedly). The language cannot be expected to incorporate an abstract construct for every use case. > 1) It breaks when you want to set foo il in a subclass. You can fix this with a defined? test. > 2) Not having an accessor definition will break other code. > > puts A.instance_variables.inspect >