Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:89923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86923 invoked from network); 29 Dec 2015 23:51:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 29 Dec 2015 23:51:49 -0000 Authentication-Results: pb1.pair.com header.from=tomac120@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tomac120@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.54 as permitted sender) X-PHP-List-Original-Sender: tomac120@gmail.com X-Host-Fingerprint: 209.85.218.54 mail-oi0-f54.google.com Received: from [209.85.218.54] ([209.85.218.54:35801] helo=mail-oi0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 20/9F-51216-59C13865 for ; Tue, 29 Dec 2015 18:51:49 -0500 Received: by mail-oi0-f54.google.com with SMTP id l9so167076232oia.2 for ; Tue, 29 Dec 2015 15:51:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=7kNytf7zd78+GlT1qbJx7fzOGuLreW3g3Te6Kdc9qWc=; b=agBMZN3avl+3Kc2M8i9NvGEXEKc5xbomhOzEK+BumGrPY54zIUMxdnA5wwhOXJ5cPT alfs0JXdmgsveRvoIh95ZpUHR4iV8yvIWgkDAlmY/A2KazMWg3AqLHijQWRtEh+AK3sa vxnyLC2gI4BfBM/1zvjvO2DW6/cYL0Mj/4TeAUM38RCz4r9+JhDvHsTQUX2XXqNiHrQF 591UOMNz1Us39NwEBlSIIhxo6se1DZYu/51D6ELix13yp0La+7XPuQLnUiOnebq9itUG MhOuqS7J6vCECIzj6O3Ht3yVXNcCL3jtR7Qf83e8b2dU4usCJbLKO/xS3Q29f17LaRwO AUFw== MIME-Version: 1.0 X-Received: by 10.202.197.82 with SMTP id v79mr15736508oif.60.1451433107443; Tue, 29 Dec 2015 15:51:47 -0800 (PST) Sender: tomac120@gmail.com Received: by 10.202.220.212 with HTTP; Tue, 29 Dec 2015 15:51:47 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Dec 2015 18:51:47 -0500 X-Google-Sender-Auth: wQvI--RXkAoIknRUH-vDECn9gPM Message-ID: To: Yasuo Ohgaki Cc: =?UTF-8?Q?Fran=C3=A7ois_Laupretre?= , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a113e23cac8d6240528121a91 Subject: Re: Possible solution to implement type checking hints on stack variables From: ejrx7753@gmail.com (Elijah Johnson) --001a113e23cac8d6240528121a91 Content-Type: text/plain; charset=UTF-8 Hi (again), On Tue, Dec 29, 2015 at 6:48 PM, Elijah Johnson wrote: > Hi (all), > > On Mon, Dec 28, 2015 at 6:23 PM, Elijah Johnson > wrote: > >> Hi (all), >> >> On Mon, Dec 28, 2015 at 3:40 PM, Yasuo Ohgaki wrote: >> >>> Hi all, >>> >>> On Tue, Dec 29, 2015 at 5:28 AM, Yasuo Ohgaki >>> wrote: >>> > Object(class) is type, so it makes sense checking class consistency. >>> If we >>> > check object's class, not only the class but also ancestor classes >>> should be >>> > checked. This may affect performance. >>> > I'm not sure if this worth the effort. >>> >>> It sounds negative, so I correct this. >>> >>> Since we have class type hint, it better to support class check. IMO. >>> Almost all cases are simple class equality check. So it wouldn't hurt >>> performance much, I suppose. >>> >>> Regards, >>> >>> -- >>> Yasuo Ohgaki >>> yohgaki@ohgaki.net >>> >> >> I think that it would be worthwhile to get either a RFC or some test code >> on this, the latter depending on how you would assess the difficulty. The >> feature itself has a huge demand and goes along the lines of current >> development. >> >> If something could be developed, then we could assess performance. I >> would estimate it to be small, however in any case the feature is optional. >> We're not anymore considering to increase the size of the z-val. >> >> The feature has 2 stages, one of which would be drastically easier to >> implement and would show us about performance. >> >> Stage 1 - typing only objects already set by comparing classes upon >> assignment, if set a particular mode >> >> Stage 2 - Adding some form of language hint, which will require a parser >> and some method of storing the class hint for null objects. The latter has >> a proposed solution not sounding hard to implement, but modifying the >> parser sound like a more difficult step. >> > > I'm changing the name of this thread. I'm not sure why the original mailer > labeled it "Make strict mode more strict?". This has been a discussion > about extending type hinting to stack variables and resulted in a > possible/plausible solution that we are looking to evaluate. > This thread is totally ruined because some mail client automatically cut the threads. No one can easily browse back to see what we discussed and agreed on. We will have to reformat our idea completely. --001a113e23cac8d6240528121a91--