When instantiating an object in Ruby, one mostly uses what appears to be the method #new
.
o = Object.new
But there usually is no 'new' method. Instead what happens (and correct me please if I am wrong), is that a method called #initialize
is executed to create the new object.
Why did the Ruby creators decide to introduce this distinction between defining and calling this method?
Edit: While the alleged duplicate question asks (besides another, more concrete question) for the relation between those two methods, I want to know WHY the relationship was chosen.