Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:101538 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77528 invoked from network); 5 Jan 2018 02:01:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2018 02:01:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=tendoaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tendoaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.194 as permitted sender) X-PHP-List-Original-Sender: tendoaki@gmail.com X-Host-Fingerprint: 209.85.213.194 mail-yb0-f194.google.com Received: from [209.85.213.194] ([209.85.213.194:42517] helo=mail-yb0-f194.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/15-45945-29CDE4A5 for ; Thu, 04 Jan 2018 21:01:55 -0500 Received: by mail-yb0-f194.google.com with SMTP id j197so412422ybg.9 for ; Thu, 04 Jan 2018 18:01:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=GQ0Y/nxqBmNcOG76B7EJnvrzZCB7B5+dGqLM73Ws5ms=; b=b7PDqSsPIiPpwy78xlGnPAa7nvleb6/SvwpSSZ8MexR3TitAR+21ytz9Oz3j8Cof3P H1psm9KQ9oyPcfF2Rvquk5AwdC6xjD5EYRoQ4JTIfK1s/Av4K1VXJvj4UfTo/rq79JSK VnuS6UC/Z2BcfhMZVvY6RpzHyNv3x+qEwIPTFhXa3ZBnRfht9CEGbAia4BTyQswAEqcR tZuooolqJaa5KwUE4rK0mVnke6947b7xYiOC8vNTIGoA+lOX1cai5E5akQ1ge6RSpu8y IKyNddVddET3WDD1ooYzdScrtFIcIM5rGiXv9B7V0eScUvgHp290yrH0z5znc+Cv1e85 QVTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=GQ0Y/nxqBmNcOG76B7EJnvrzZCB7B5+dGqLM73Ws5ms=; b=sx1i8XDCSxPbgCoCfGC2glKDOmQcYfaf/JdM78QATPLOHmYS2W9AXQm29DIOV1avLY t3dmSm8mOf31psshctqD8B7ehhaFxbTieF3mSbMlxRHXVn95xTlgv5qAjmtvPjgWcu/D GjJNMVUoqchi1c66mmr8vXHm3kNpD91usJUhye1CSCa9irjz7BuqmwR2LRumVO88BVdP EOOL4jDnyCf2qDobvFaEDgfUybEPWyiGkprSb3BMb+ZFh65SXSAbkllyW8rwS5IuceJM iwQP72gyEiTE6KiELtgh+MFtZs2E4eCNABhq/hO60mh9VyPWGqO2844mRnO0EGP8d2xQ XGdQ== X-Gm-Message-State: AKGB3mKGMWg9SQbGfMiH2TLK14hGakbCFqONydGChkOGr1VU9fchw1y3 di2tCUgBFOZB6Lqj9+8U1oLLaOg3+dk+QipBDFY= X-Google-Smtp-Source: ACJfBovXkFAcXeiVwIefnFoJ5njPnO3VFQ4Mkef+lAyEY4blb64lc2Y//OU72+gNgUIPs4VPHFOx3V/aPBWMvBHFsQU= X-Received: by 10.37.115.87 with SMTP id o84mr1511693ybc.304.1515117711901; Thu, 04 Jan 2018 18:01:51 -0800 (PST) MIME-Version: 1.0 References: <9a3a8760-f65a-a5c0-b318-1830a9a986c3@gmail.com> <9352F6DF-9940-49A2-9B1D-FA9258E9738E@lerdorf.com> In-Reply-To: <9352F6DF-9940-49A2-9B1D-FA9258E9738E@lerdorf.com> Date: Fri, 05 Jan 2018 02:01:41 +0000 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="94eb2c09778002c6e40561fdd5d9" Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Strong Typing Syntax From: tendoaki@gmail.com (Michael Morris) --94eb2c09778002c6e40561fdd5d9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jan 4, 2018 at 7:21 PM Rasmus Lerdorf wrote: > > > On Jan 4, 2018, at 13:09, Andreas Hennings wrote: > > > > A system where all variables are type-locked could in fact be faster > > than a system with dynamically typed variables. > > Depends on the implementation, of course. I imagine it would be a lot > > of work to get there. > > I think you, and many others, commenting here, should start by looking at > the engine implementation. Any successful RFC needs to have a strong > implementation behind it, or at the very least a very detailed descriptio= n > of how the implementation would mesh with the existing engine code. > > The reason we don=E2=80=99t have typed properties/variables is that it wo= uld > require adding type checks on almost every access to the underlying zval. > That is a huge perf hit compared to only doing it on method/function egre= ss > points as we do now. I=E2=80=99ve been thinking on this during my drive today to a new job and c= ity. I promise to read over the current implementation before going further, but a quick question - what if the underlying zval wasn=E2=80=99t a zval but a se= parate class specific to the data type but implementing the same interface as zval? The compiler would choose to use the alternate classes when it encounters new syntax calling for their use, in effect adding a static typic layer that augments the existing dynamic typing layer. > > -Rasmus > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c09778002c6e40561fdd5d9--