Just about everything, including 20+ years of history in Ruby. You’ll
need much better arguments than “consistency” and concision.
What you’re missing is that new, the class method, is doing more
behind the scenes. What really happens is closer to:
object = allocate
# initialize a Foo instance here
While you almost never see an override of Object.allocate, there’s
nothing that prevents it from happening for your own classes.
See also http://ruby-doc.org/core-2.5.1/Class.html#method-i-allocate.
On Sun, Aug 19, 2018 at 1:59 PM Mark A. Kolesar <firstname.lastname@example.org> wrote:
For consistency and conciseness the object constructor should be renamed
from initialize to simply new.
@a = a
@a = a
my_a = Foo.new("test")
Less typing, more consistent. What's not to like?
Mark A. Kolesar
Windows provide a limited view. Come out into the open and embrace freedom!
Austin Ziegler • email@example.com • firstname.lastname@example.org
http://www.halostatue.ca/ • http://twitter.com/halostatue