From: Bira Date: 2011-06-01T04:50:28+09:00 Subject: Re: CORE - Specialized Attribute Definition On Tue, May 31, 2011 at 10:05 AM, Ilias Lazaridis wrote: > ruby 1.9 > > (this is about the *abilities* or the ruby 1.9 language) > > 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" ... > > > . > > -- > http://lazaridis.com > > Just out of curiosity, what exactly do you need the syntax above to do, and why isn't attr_accessor sufficient? -- Bira http://compexplicita.tumblr.com