Hi --

On Fri, 16 Dec 2005, Mark J.Reed wrote:

> ajmayo / my-deja.com writes:
>> Oddly, there is an inconsistency here
>
>> q = String("abc")
>
>> q = String.new("abc")
>
>> are both legal but
>
>> q = string("abc")
>
>> is not, which you would extrapolate by extension from the Proc/proc
>> analogy. (because
>
>> a=Proc {....}
>
>> is not legal.
>
> That's because there's no automatic correlation between the class Proc and the
> method proc.  Lowercase proc is just a static method of the Kernel module that
> returns a Proc: it's there as a convenience, because "proc" is less typing than
> "Proc.new".

Except... they're not quite identical, and actually as of RubyConf
2003 (I think) Matz agreed that 'proc' would be deprecated in favor of
'lambda', because having something called proc and something called
Proc.new that weren't the same was confusing.

It's still there but hopefully will be phased out soon.


David

-- 
David A. Black
dblack / wobblini.net

"Ruby for Rails", forthcoming from Manning Publications, April 2006!