Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97696 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12811 invoked from network); 11 Jan 2017 18:41:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jan 2017 18:41:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=anatol.php@belski.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=anatol.php@belski.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain belski.net from 85.214.73.107 cause and error) X-PHP-List-Original-Sender: anatol.php@belski.net X-Host-Fingerprint: 85.214.73.107 klapt.com Received: from [85.214.73.107] ([85.214.73.107:40270] helo=h1123647.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/74-55699-26C76785 for ; Wed, 11 Jan 2017 13:41:38 -0500 Received: by h1123647.serverkompetenz.net (Postfix, from userid 1006) id 8038B782EC7; Wed, 11 Jan 2017 19:41:35 +0100 (CET) Received: from w530phpdev (p54A76A89.dip0.t-ipconnect.de [84.167.106.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by h1123647.serverkompetenz.net (Postfix) with ESMTPSA id 1DE817803A4; Wed, 11 Jan 2017 19:41:33 +0100 (CET) Sender: "Anatol Belski" To: "'Dmitry Stogov'" , "'PHP internals list'" , "'Bob Weinand'" , "'Joe Watkins'" Cc: "'Zeev Suraski'" , "'Nikita Popov'" , "'Xinchen Hui'" References: In-Reply-To: Date: Wed, 11 Jan 2017 19:41:28 +0100 Message-ID: <028b01d26c3a$54c7aa00$fe56fe00$@php.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJIDTw7tnk/PlVzttE3cu1rUzXVbqBIRFyQ Content-Language: en-us Subject: RE: [PHP-DEV] Change in type-hint representation From: ab@php.net ("Anatol Belski") Hi Dmitry, > -----Original Message----- > From: Dmitry Stogov [mailto:dmitry@zend.com] > Sent: Wednesday, January 11, 2017 1:08 PM > To: PHP internals list ; Bob Weinand > ; Joe Watkins > Cc: Zeev Suraski ; Anatol Belski (ab@php.net) ; > Nikita Popov ; Xinchen Hui > Subject: [PHP-DEV] Change in type-hint representation > > Hi, > > > I propose to introduce a unified type representation (zend_type). > > Now it's going to be used for typing of arguments and return values. > > Later we should use it for properties and other things. > > > https://gist.github.com/dstogov/1b25079856afccf0d69f77d499cb0ab1 > > > The main changes are in zend_types.h and zend_compile.h, the rest is just an > adoption for new type representation. > > I don't think we need RFC, because this is just an internal change that doesn't > change behavior. > > > I got the idea working on typed properties together with Bob and Joe. > > https://github.com/php/php- > src/compare/master...bwoebi:typed_ref_properties > > I think it would be better to introduce zend_type and then continue work on > typed properties. > I just did a test compilation and everything looks good. There's one place in ext/com_dotnet/com_handlers.c:305 that would require an adaptation. In this regard a question - would possibly a universal macro make sense, to change the "null allowed" mask ? Also, a macro to change the type, with/without changing the null allowed mask. Just as an API extension to ease the consumer code. I mean, clear, it'd be doable with just a bit more effort, but an API could be handier also for the future compatibility, should the implementation change. For the rest IMO - very elegant approach giving base to facilitate arbitrary types. I also think RFC were a waste of time. Thanks everyone involved! Regards Anatol