On Wednesday, January 23, 2013 01:12:45 Dmitry Olshansky wrote: > 23-Jan-2013 00:28, Minas Mina пишет: > > From Jonathan M Davis: > > "...At this point, I don't think that the situation with default > > constructors and > > structs is going to change. It's a result of requiring init properties > > for all > > types, and is thus a "forced fault" in the language..." > > > > Why does requiring init properties for all types results in this? What > > does that even mean? > > I don't buy it either. 0-argument constructor have nothing to do with > requiring .init.
init prevents us from having _default_ constructors. As much as no-arg constructors are normally default constructors, they're technically separate concepts. static opCall shows us that it's perfectly possible to have no-arg constructors. However, there's a certain danger in simply making a no-arg constructor for structs not be a default constructor, as pretty much anyone coming from another OO language will expect it to be a default constructor. For the most part, static opCall solves the problem. - Jonathan M Davis
