From: Christopher Dicely Date: 2011-06-10T23:32:48+09:00 Subject: Re: CORE - Literal Instantiation breaks Object Model On Thu, Jun 9, 2011 at 11:40 AM, Ilias Lazaridis wrote: > This is essentially a defect, as the consistency of the Object Model > breaks. > > The statement "Everything is an Object" becomes invalid, because > e.g. a string object instantiated from a literal behaves differently that a > string object instantiated normally via new() (although they share the > same class, and thus should behave the same). The logic in this argument is fundamentally flawed. "Everything is an Object" does not mean "every object of the same class behaves the same". Objects of the same class instantiated with different syntax regularly behave differently. Aside from literal vs. new, you have: #allocate vs. #new generally creation via other methods specific to a particular class (e.g., for Procs objects, proc {} vs. lambda {} vs. Proc.new vs ->() {} vs. method() vs. & to capture the block passed to a method) Others in the thread have explained adequately the practical reasons why you can't have be interpreted as .new() where both are identical [as that would produce infinite recursion], but aside from the practicality you are wrong on the basic theory: different initialization mechanism producing objects which are discernably different in the path of method calls involved in their instantiation and/or their behavior later in their lifecycle is not inconsistent with Ruby's object model, it is rather fundamental to it.