Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93533 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48305 invoked from network); 25 May 2016 21:29:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 21:29:47 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.54 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.220.54 mail-pa0-f54.google.com Received: from [209.85.220.54] ([209.85.220.54:34200] helo=mail-pa0-f54.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3D/2D-14311-B4916475 for ; Wed, 25 May 2016 17:29:47 -0400 Received: by mail-pa0-f54.google.com with SMTP id qo8so21513008pab.1 for ; Wed, 25 May 2016 14:29:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=MMX1SkFE85i0XuVpiFk5kwQOmbUvo9fVvD4DlnRtIBA=; b=KJwk70O9Fdf5R7FfYnvFraDN1ADKHvAUPi3YFfTI1XmTYRM35wencqmvst6C5P5tni hnrtwmCoq4Bkw1DTNSpmj6neLTEB4vextuynnrJwcz3Kz8LZzSsnqKhJSrst1g7My32n 6sKOaPlC2OkXJ1xkjwMYjuXmv2488ZYOHWEv8tYAEOJE8uXy3u879AVnx5gvFVzxp220 fySAELMGTCHiPYVJqjkFNu6DuOWcHWZfFQ7bXJRwmKIq1BVuPO5sOYAms5pbqFMHNPDR Q588PgoSuLRvEum7WcN0hcK1hCvPDAF/pAeTLgfAPAnRox+qDcms4CleggiT4gtqJAaK g5Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=MMX1SkFE85i0XuVpiFk5kwQOmbUvo9fVvD4DlnRtIBA=; b=jr7+Ckxeegc02D+KoaL6iac2EnXG30eBe8MUVY83/CYZK+vrGmfm0r4SVo87mJDGRs Jayr0/AQN7ljM9aDw8zBkJdMQoRIG/8DKm9kKUJVUQIVZDQkubeEvcQgSecbN6NLhaHP IdQBSwj4qNBqvkGOdVbft4hTwptC2Kl//4zrkMf7PerwIHQM6PrIqnjx2LpFjIxVWvZH kXi03ZMgXnUjaLYaQ0bnXhBvQXKh+hf7FhreyL/l7UETYEUKeWiuNQh7kSFZpf+ctgxI SDEjSAR8gTv4Dy5Tgt5+0sCc03E4KMGqdqEfbgkLktHpcOdiSPQJBfOqZqtp4N8ujdYi b6Lg== X-Gm-Message-State: ALyK8tKPdWZVp/pePSuD4R5u6QMR34aOoINIVQktVPRRphxEfvpGXnwVpMuECnsTqNcUuQ== X-Received: by 10.66.63.98 with SMTP id f2mr9006771pas.123.1464211784488; Wed, 25 May 2016 14:29:44 -0700 (PDT) Received: from [192.168.1.65] (76-220-46-95.lightspeed.sntcca.sbcglobal.net. [76.220.46.95]) by smtp.gmail.com with ESMTPSA id e184sm678981pfe.14.2016.05.25.14.29.42 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 14:29:42 -0700 (PDT) To: internals@lists.php.net, Andrea Faulds References: <80.72.63510.DAFA5475@pb1.pair.com> <68fd73e7-ad19-3758-7b7a-6013cc26385f@gmail.com> <11.87.14311.EC5E5475@pb1.pair.com> <46620281-18af-094f-d484-8fc69bd7dc11@gmail.com> Message-ID: Date: Wed, 25 May 2016 14:29:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC][Vote] Typed Properties From: smalyshev@gmail.com (Stanislav Malyshev) Hi! >> True. But I don't see how would it work for typed properties - what >> exactly would happen after unset? Would it be - as it is now - that it >> is as if the property was never defined, or would it be something else? >> > > In my opinion it should simply vanish along with its definition. I mean, > isn't that the definition of unset in general. Right, that would be the easiest way. But then you lose guarantee that variable you marked as "int" is indeed always int - you could unset it and then set it to whatever you want because it no longer has a definition! OTOH, we do have precedent for properties that can not be unset - namely, static properties can not be unset. They can be nulled-out, of course, and they default to null. I have no idea how "static int $x;" would work though. The current RFC doesn't implement it, which definitely would be weird since people would expect if you can have typed object property, you can have typed static property, but that's not what the RFC says. -- Stas Malyshev smalyshev@gmail.com