Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103220 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 56936 invoked from network); 21 Sep 2018 18:44:13 -0000 Received: from unknown (HELO mail-io1-f51.google.com) (209.85.166.51) by pb1.pair.com with SMTP; 21 Sep 2018 18:44:13 -0000 Received: by mail-io1-f51.google.com with SMTP id q5-v6so12508538iop.3 for ; Fri, 21 Sep 2018 07:51:06 -0700 (PDT) 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 :cc; bh=yaDojnmpNMhfThfhJ++jodm+bhFEgvPUu0e+o1LnIEs=; b=Ban2yccTKOWwh6hvr//Bzew3pVk+3AVmhyo7G7Go8RfrjAleo0FUrZHoyTLNf5Zulm 6wmoxVsFfOdB1mPOTbG2n07+k3ED1+bIFX7aLYar7yKsX8T50hZY1fr/VjxWsqdpOdLn coGCm7yWGrfh1V/PUGQR1LjD5ErrQbsuydCw5uKZoF6GYG2grl57gtHDjZBtv10S8/t4 BFuQXvprMnT2biVRh62UoMllsCDnSbpQFnQ28T/gBrEgA1kQg4vWcZZwSae2t90h4CMe kuC94MDFnMx20qjkrFOaftmCOr7OU8UBgzJ8OL1NvHvdS3bPSFIXT83vVf9emAACrNoE d9BQ== 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:cc; bh=yaDojnmpNMhfThfhJ++jodm+bhFEgvPUu0e+o1LnIEs=; b=TiuFpttL33ai6alhr0IpWMT8a5n9D0avFzEMlA6u3lrxZtRgfvY6OSr0Gz8UzEGm5J vh8wcpfGsRAf58hJ4NzyQeXi2x7WVFP40ZFEVs/MUj84VoV8CLFgkA9fo7HYoqRRDbdP c3UmBxyqgI1epsuAto9YoGk3n0IMPpZKsrfLzpWd0rfwJjAgWufF/UMqiJ7Vil5V5uI7 0nznV+JHMcVdY78guABQu1lw/JwSg4B2bdrfY2WHVjx0VNtr9w/fTSufI56FXmiCpTYA VGZpzqpitM4xwqpxUMsuSTbB1vEImvIjlqj8xGZGJ4O99i3R85Gqr8cy9V4RgCMHeiTa 2bHw== X-Gm-Message-State: ABuFfoiFdxoXGXFyR6up41mjiYV55vrepqFa+UUopzAdArj8Q9BtcuuG iD0JKmqxtK8rTWfkiNDcYRh55LOK7gQjoGIh7edqfMvT X-Google-Smtp-Source: ACcGV60ns4BoyCB4ltdlUAamiVGayTXjGPuhaFsp+pMl52PO1OVD9y50MP4B8/BqiPTJZnfMSFQiee1VKJlhRRN5k3Y= X-Received: by 2002:a5e:df04:: with SMTP id f4-v6mr13648097ioq.235.1537541465920; Fri, 21 Sep 2018 07:51:05 -0700 (PDT) MIME-Version: 1.0 References: <4983605.CXexPrWP49@vulcan> <2663518.pfEvELVovc@vulcan> In-Reply-To: <2663518.pfEvELVovc@vulcan> Date: Fri, 21 Sep 2018 15:50:54 +0100 Message-ID: To: Larry Garfield Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000e75cb3057662c415" Subject: Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2 From: rowan.collins@gmail.com (Rowan Collins) --000000000000e75cb3057662c415 Content-Type: text/plain; charset="UTF-8" On Fri, 21 Sep 2018 at 15:11, Larry Garfield wrote: > Perhaps another disconnect here is that, in practice, the consumer of an > object property is, in my experience, almost always "me". I almost never > have > public properties on my objects. On the rare occasion I do, it's for a > "struct object" I'm using internally as a more self-documenting and memory > efficient alternative to a nested associative array. My impression is that people will be encouraged by this feature to implement more value objects with public properties, where they currently have getters and setters doing nothing but type checks; and thus more code will be exposed to uninitialized properties if there is a bug in a constructor. Indeed, it's arguable that if all properties were private, there would be no need to enforce type hints all, since analysis of where they were set would be trivial. Regards, -- Rowan Collins [IMSoP] --000000000000e75cb3057662c415--