From: Paul Battley Date: 2006-07-13T18:12:02+09:00 Subject: Re: prototype-0.1.0 On 13/07/06, transfire@gmail.com wrote: > The only thing I see, is that your use of the term 'prototype' betrays > a Class-based OOP background. Ie. You're usimg "prototype" as one would > "class" and "instantiate" them albiet via a deep clone. Using a neutral > term like 'object' does away with that. > > a = object{ a 1; b 2; c 3 } How about this: --- require 'prototype' def Prototype(&blk) return Prototype.new(&blk) end singleton = Prototype do @a, @b = 40, 2 def answer() @a + @b end end p singleton.answer --- Paul.