On Monday, 27 August 2018 at 11:02:14 UTC, Guillaume Piolat wrote:
C++ binds the two in the same operation.
D does not, T.init must be a valid object. This is a major
cultural change, though I believe the D way is superior on the
efficiency stand-point (you can create large arrays of valid
ob
On Monday, 27 August 2018 at 03:06:17 UTC, John Carter wrote:
The last few years I have told myself (and anyone who doesn't
back away fast enough) that "Constructors" do _not_ construct
objects, they are "Name Binders." (Sort of like lisp's "let"
macro)
They bind instance variable names to
Or to put it another way
RAII should be
"Taking Ownership of a Resource is Initialization, and
relinquishing ownership is automatic at the object life time end,
but Failure to Acquire a Resource Is Not An Exceptional
Circumstance"
Not as catchy, but far less problematic.
On Friday, 24 August 2018 at 02:33:31 UTC, Jonathan M Davis wrote:
Walter Bright wrote:
My personal opinion is that constructors that throw are an
execrable programming practice, and I've wanted to ban them.
(Andrei, while sympathetic to the idea, felt that too many
people relied on it.) I won