Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93510 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92824 invoked from network); 25 May 2016 15:56:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 May 2016 15:56:56 -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.192.178 as permitted sender) X-PHP-List-Original-Sender: smalyshev@gmail.com X-Host-Fingerprint: 209.85.192.178 mail-pf0-f178.google.com Received: from [209.85.192.178] ([209.85.192.178:35754] helo=mail-pf0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 86/72-14311-74BC5475 for ; Wed, 25 May 2016 11:56:56 -0400 Received: by mail-pf0-f178.google.com with SMTP id g64so19922437pfb.2 for ; Wed, 25 May 2016 08:56:55 -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=ufOutvgLphUMAEbPQTE+bJnbGxjaEr5YzZc3+O0a32w=; b=u1tYISLfYZ45AtQVSBTzLHiDMmceT8ykBpj2GsudkGzzPO0U1sVCvX7CfenOvso9zY 7B5tF3IjXc86Q+rbjomZNoCjckB6iDVsR5jYLAWgcmFojkXReqCOPgAVh/2R+ccHY03A ZYwTUnIOu7xOqQhS36JXj6Rrw1QT5qfcOVd/Fes/25gb/nPXaZY1rJCZ/0m6x7tYDD+6 glLlkHOc+x2KvJo1XJvJMnD9zPv1YEG1pRi0UWCyoT9NlmynwK+Yd2CbjFDkOiL/a+Sy xCQ26Lw2yuw2lDHeN91ZLw3RDRRIDdRT69RRP/ThQ450R+ZGD0runMI8H5Fj2vuPeeNH T4Kw== 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=ufOutvgLphUMAEbPQTE+bJnbGxjaEr5YzZc3+O0a32w=; b=Vk2dbiXoHs8lUiTslUZWNmHPE0avHq6CPChXC50qdot5urARxmdImr4APZ1N9OVF/T TeVvzFvHGYh3fXNoHrCNXq5FgTR569bTghyLy0sRHcXwnbvwwzEc233SXb/yIZLs8O+q YlVL+pu359CWNmk0yO4CDkMfbKq/yHTkyL8lBJNxfgTuE2zrI6lxqGId7xA+DecgZEwb 5QXLR9Kkb4CqJb1BLAeuUDb3bCU/KA5rEx3FgdQirhgJ8vedbmTGyfwQsERJAC4y38Ew yWk1wBANaOvhlTgFpgHrUS7tq5hQDqH6ezp0CeGRikA5g7acarDTcNa8Fp8csVPI6p7R cSIA== X-Gm-Message-State: ALyK8tJadXd3f96yw/c+hIzroftAI0jG9uBIskTJC/xhD0/+IBCXv4pS6xjGZX4RPkbpZg== X-Received: by 10.98.85.194 with SMTP id j185mr6910598pfb.68.1464191813110; Wed, 25 May 2016 08:56:53 -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 ke3sm6125851pad.41.2016.05.25.08.56.50 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 May 2016 08:56:50 -0700 (PDT) To: Andrea Faulds , internals@lists.php.net References: <80.72.63510.DAFA5475@pb1.pair.com> Message-ID: <68fd73e7-ad19-3758-7b7a-6013cc26385f@gmail.com> Date: Wed, 25 May 2016 08:56:40 -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: <80.72.63510.DAFA5475@pb1.pair.com> 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! > * uninitialised - the constructor (or indeed, other code) is yet to set it > * null - the property is left intentionally empty For declared properties, this always has been the same, and I'm not sure why would we want to change that. This also has a potential to be a huge BC break if we change it not to be the same, since pretty much all the code assumes it is the same. We'd essentially have to invent another null, which is exactly the same as null but isn't null. I don't see a reason to do this. > * some other value - the property is intentionally given a value > > A simple example might be a Lisp-style linked list cell: > > class LinkedList > { > public int $head; > public ?LinkedList $tail; > } > > In a properly initialised LinkedList, the $head is some value, and the > $tail is either another linked list (the remainder of the list), or null > (we're at the end of the list). This is a very weird list, as it can't be empty. -- Stas Malyshev smalyshev@gmail.com