Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:103239
Return-Path: <rowan.collins@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 65883 invoked from network); 24 Sep 2018 00:00:34 -0000
Received: from unknown (HELO mail-wr1-f53.google.com) (209.85.221.53)
  by pb1.pair.com with SMTP; 24 Sep 2018 00:00:34 -0000
Received: by mail-wr1-f53.google.com with SMTP id z14-v6so133954wrs.10
        for <internals@lists.php.net>; Sun, 23 Sep 2018 13:08:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-transfer-encoding:content-language;
        bh=bz3neVIjjQH2Q0RpEgYLxZTrbfM64L2Zp+3Fqz1Y0Ag=;
        b=qhPpHS94QbsBgr8RvBOsrecgrLeCTZN6P8WgeGC+Vd4zkECPu3ItlDJKcwsIFC4MSE
         Xl0OFzqNS+CwoO3/hhqBL2Ycl5HjCzA46LjkmPdxiXNiuFyE0JlZ09H8lq4/boCFNBqR
         jDeZZzGOQEy40wR2CSnJEWqm80vBHmoKRV3Xvfits17SHCbRoEgRXJQLZyhkwMWa1Jg+
         rC8mvrBMAqYXAmyI6DDThSVOgyt49Rm9pNBp8Iqx446hV9mpO17cwKY3qnmk+icPm399
         UjePrmwehORklt6fYhxXyTdeod63nfKnxDtY/dS5n5VrcLImIpqMOby4zr/rKlrx7PVy
         IdZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-transfer-encoding
         :content-language;
        bh=bz3neVIjjQH2Q0RpEgYLxZTrbfM64L2Zp+3Fqz1Y0Ag=;
        b=cr2xmrjRN5qp/mQqXwjNd1Uy7czj4JESvI5hzKk7se3WFI/GkmQVhJ9zMqizNQPE+H
         pV1DNxh1eV4bD5yrVgP4wroeq69dlFvayTxArgoOJFy/c/9Yp9yQA79qtnErySs7mLMs
         I+9oK7cStBeCUYEGrTzOCV2woq5vAMRdvd1yYDyKgkNX7DySRtIj8r539PDFqAaZXq6x
         6v5hp4VrOf/HxdbzPMn9sNvr8TGEI3VqMGpSnkuXv2qNyS4jJRpgmIAc+0A7Jwaz78VR
         K+4Coeh/mKPJLmhN9PxwGBe4zIHHbQrHOLRFWUtGIKzODiOlNzgXiDcmNBmj8WWW6mfX
         X//g==
X-Gm-Message-State: ABuFfoiBwLPcLLZgdIbVAW9/G8y8HInXoLJNGPqLNswX3cd23yxXvwl4
	pNUnasUc5ogc+ETDtqsDafVx5hKM
X-Google-Smtp-Source: ACcGV63m+UG/hdfa/7YMDIbZxCyPyNtUl4P+GCMTQOMq114H4HD1hBuh34ZVheqCJTiyRJdtkUUtYA==
X-Received: by 2002:adf:ee11:: with SMTP id y17-v6mr6008432wrn.63.1537733280480;
        Sun, 23 Sep 2018 13:08:00 -0700 (PDT)
Received: from [192.168.0.14] (cpc84253-brig22-2-0-cust114.3-3.cable.virginm.net. [81.108.141.115])
        by smtp.googlemail.com with ESMTPSA id k63-v6sm28997888wmd.46.2018.09.23.13.07.59
        for <internals@lists.php.net>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Sun, 23 Sep 2018 13:07:59 -0700 (PDT)
To: internals@lists.php.net
References: <AM0PR0702MB3684F2B7EFF1826F515BA940E2040@AM0PR0702MB3684.eurprd07.prod.outlook.com>
 <D23FE5D3-4C11-424A-9837-F5F838D4CDBC@gmail.com>
 <CADqTB_h1oWExsgmxR6RHbX1Eew2YiQTGjR2PgJc=4uW4qAJHYw@mail.gmail.com>
 <1681263.Ri4PIu1jiQ@vulcan> <1476841B-EEBA-4513-8DD8-7ACE1F662372@gmail.com>
Message-ID: <95a7902d-8451-06ee-debf-6f03c4fd7190@gmail.com>
Date: Sun, 23 Sep 2018 21:07:56 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.0
MIME-Version: 1.0
In-Reply-To: <1476841B-EEBA-4513-8DD8-7ACE1F662372@gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-GB
Subject: Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2
From: rowan.collins@gmail.com (Rowan Collins)

On 23/09/2018 19:41, Claude Pache wrote:
>> 3) Object properties may be type hinted and the class author has until the end
>> of the constructor to make sure they're fulfilled, otherwise TypeError on the
>> spot (what I'm proposing).
> Just to be sure you don’t miss the herd that this elephant is concealing:
>
> In addition, you *must* forbid unset() on those properties...


We "must" forbid this IF we aim to guarantee that the object never has 
uninitialised properties; but the current consensus is that we can't 
make such a guarantee without changing a lot of other parts of the language.

There are strong feelings that unset should be available for use in 
lazy-initialisation hacks, so this is likely to remain one of the 
back-doors which will let elephants in, unless and until someone comes 
up with a replacement for that hack.

Regards,

-- 
Rowan Collins
[IMSoP]