From: Ryan Davis Date: 2011-06-01T05:45:11+09:00 Subject: Re: CORE - Specialized Attribute Definition On May 31, 2011, at 06:05 , Ilias Lazaridis wrote: > class Persnon > attrib name String opt1 opt2 > attrib age Integer > end > > The main questions: > a) Can such an "attrib" method be implemented with ruby code? > b) Can such an "attrib" functionality be implemented on the C-level > (as extension, not as modification of source)? > > Any examples? > > Please notice the requirements: > > 1) "name" and not ":name" > 2) no comma between "name" and "String" and "opt1" ... I know this is a futile gesture, BUT... No, not with your requirements of changing the grammar. If you don't want to code in ruby, go find a language that better suits your needs. If you do, work with it, not against it. What you describe above is simply NOT ruby. Haskell might be a better fit.