Re: [RFC] Default constructors

From: Date: Tue, 18 Nov 2014 23:11:02 +0000
Subject: Re: [RFC] Default constructors
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-78968@lists.php.net to get a copy of this message
Hi! > "Been in PHP for a very long time" != "how it was intended to work". Can > you explain why this would be the intention of anyone designing the > language? Of course, been for a long time is not the same as intended. But if you look at how ZEND_NEW is done, it's clear it's intended. And the reason is simple - if there's no function, it's not really possible to initiate a function call and handle it properly, since the engine expects certain data there and there's nothing to provide that data. So, ZEND_NEW having no function just skips the whole function call thing altogether. > It's a mistake that was made a long time ago, and nobody's thought it > worth the effort to fix, but it's still a mistake, IMHO. It's not a mistake - at least, not an unintentional one, it was a decision. If you think the decision was wrong and it can be done better - cool, let's see the patch.

« previous php.internals (#78968) next »