Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102200 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52816 invoked from network); 8 Jun 2018 07:33:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jun 2018 07:33:50 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.45 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.45 mail-wm0-f45.google.com Received: from [74.125.82.45] ([74.125.82.45:35721] helo=mail-wm0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2A/97-62758-D513A1B5 for ; Fri, 08 Jun 2018 03:33:50 -0400 Received: by mail-wm0-f45.google.com with SMTP id j15-v6so1780995wme.0 for ; Fri, 08 Jun 2018 00:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=1qZelFZjiR5S9Y0Jvbv8EQlKFtOE6Wf94SFff95hcNE=; b=OVEUXozzMxr/JwwiC5ox8IEcY0ukcoUg7Uu/fcRbH10jVFCGqPbO/fhY+sXqnQgT/f 4YPX5PlAzOk2OPmMs1fzzED7hTSd0n/21fHy0Yi4xAHfUtM6XKi0/E0pFBApGuriu0tz wiha6ia52/5tVN5Mpwf5NXW0BZPmktKF2LEEgf6aruyJuSIxs5Lo/klJFH6cmi6yhouu Mm9WgNWgGIP3E99I/6aPkzZh+eaAOK79ToRp0aj/+J3G+TKsLLADf4mwy4iXN+KHV00j m6yAUFnyIwTLco7lNbqBx+E3p62k7zx4Akylawz4DvDkmQPlbt+unQ+/QFCjMe6jxHz6 WYZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=1qZelFZjiR5S9Y0Jvbv8EQlKFtOE6Wf94SFff95hcNE=; b=VLuza95+uuh1SIGhEO/IvZO+sxMa5WTZI3VPkXO0IgMOAUunAWeDORZ3We4Hxy5Pk2 0YhHmwng8Gc38kmi2r3Z1/Y55Q0xQ5WB6Pvkryc873/ZbGNy9lpQJUJbXNVgVxGEKOFZ 1lUS7ra0clui7pnm242ih6MQFZB3jpeDRA7YUzSDWXHiH2mXUCetrVnMBsi4TBOsgyrE aKLSP9gs+Kq76GZ85i5JDNh7mGmsiOpRDp6Tf8oISHSlwCyzeDlMzWNcerm65n9PpxiK 31FvRQfCe5xVYD/Ysue1FdpQ1nfwJopfms3j8l0BsjyYfXr/wV4uq90rIortF9RAyJhX l+9w== X-Gm-Message-State: APt69E05AAHTnbXgdPypj7lLk5eQOadwZ5AVn5LOxfvuOTAPwj5Dr+B7 qgRmmtyb8k2pHAuHWI5zoTR8Lfi9H5aaz9mhSeg= X-Google-Smtp-Source: ADUXVKLiWTcu1bAwXixNMOS8Hm4vegQ7Pz3IusWyvDZy8SsG0iqBWdyOPgIN62pwzws4qSDRdUQSyrmH46H41G/YkaU= X-Received: by 2002:a1c:d106:: with SMTP id i6-v6mr663915wmg.1.1528443226204; Fri, 08 Jun 2018 00:33:46 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:adf:f18f:0:0:0:0:0 with HTTP; Fri, 8 Jun 2018 00:33:25 -0700 (PDT) In-Reply-To: References: <0d108361-f5fa-fe76-b6ad-66e23bfa88f5@loot.at> <3c36b189-108d-bce7-bea0-7a3d6a432607@gmail.com> Date: Fri, 8 Jun 2018 09:33:25 +0200 Message-ID: To: Ryan Jentzsch Cc: Rowan Collins , Internals Content-Type: multipart/alternative; boundary="0000000000008eaffc056e1c6b09" Subject: Re: [PHP-DEV] Better types without runtime checking From: ocramius@gmail.com (Marco Pivetta) --0000000000008eaffc056e1c6b09 Content-Type: text/plain; charset="UTF-8" On Fri, Jun 8, 2018 at 9:29 AM, Ryan Jentzsch wrote: > Thanks Rowan for the detailed explanation. > I thought that leveraging `__get` / `__set` internally would have addressed > many of the type checking issues that you mentioned. > I've used __get/__set in userland to enforce property types and hoped that > an internal C based solution would something that is reasonable to code and > implement. > > Also, can anyone in internals respond to this inquiry? > https://github.com/php/php-src/pull/1797#issuecomment-394434391 Added type checking to __get and __set is one of the primary reasons for a downvote of the typed properties RFC ( https://wiki.php.net/rfc/typed-properties) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --0000000000008eaffc056e1c6b09--