Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92024 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25612 invoked from network); 30 Mar 2016 14:21:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Mar 2016 14:21:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.43 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.43 mail-wm0-f43.google.com Received: from [74.125.82.43] ([74.125.82.43:38751] helo=mail-wm0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/96-24137-CC0EBF65 for ; Wed, 30 Mar 2016 09:21:00 -0500 Received: by mail-wm0-f43.google.com with SMTP id 20so73575577wmh.1 for ; Wed, 30 Mar 2016 07:21:00 -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=M0PWNdmRMTeasrB/W9iv7rE6B7lBDrsH4YahpwYGy68=; b=Wjv2O/931mK05ZNoxlzAmGffuPkY14r7CUZ1QVBktIGjozzK9oUPGpsNUAylR0g862 07B728eyD17iW1ADRcvSODRZt9GG3r18DPlOLIgl9fVzOjyd8krCwRC1vNi7krEzF75N f30WhbU6OFMxeGnfYxLe+nNPqdfD90QQB3H9DN+aS3oTIg4+oXU7C9FeykP4ypBtsEDv 6aYtod2TD+bHsVUPz6/g9w2aZA7B+iTatzj40LhvM3tyRnjeizDgtvWecRW8hKdVbKlA nMlfSg4JKyhqtn3lLrHn8dyjoQAdApEmkDZB8U5VQFhLUAIB/k1hdDcJpCiQJwbeC37F 6J1w== 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=M0PWNdmRMTeasrB/W9iv7rE6B7lBDrsH4YahpwYGy68=; b=Xs8jUD4xL83q7FOSSZHZM3VWH2jXzc8vwob7APl2m4bsU9EzaWSf4+rpdhVahur0u9 reZNb00Lbgcx7NB+eNyaqOdhUDp0RGvmYPKqrJmyvUw5UjBXlzM1p7FbtUc31udj7jLj sOCYayHDiv8JD18q4lPPKvmOvRdrU2fGCisHJoH3zsXlu7z42mJZvTz1me6UeY9uGQns Ei1SWAb+m/CpMoj3yIVkTJ21X9v81BE4GF3mKqVQ8aC+IdIbRMNXT2YrbW4KTgQoRj8e Ng1b5NfObdc++x3lOmp9GnMN8901QL+kZAJ38+Gzzj+JICwDGXvDmXE/2UeQewT7yA5t LHSw== X-Gm-Message-State: AD7BkJLhpvyy8imgkmKgFM7GwmzCUJglFHZ6iJFeVL7PSTo94ZI45QQtBv0da8vHGimoBA== X-Received: by 10.194.121.194 with SMTP id lm2mr9831572wjb.71.1459347657495; Wed, 30 Mar 2016 07:20:57 -0700 (PDT) Received: from [192.168.0.77] ([93.188.182.58]) by smtp.googlemail.com with ESMTPSA id h7sm19992850wmf.9.2016.03.30.07.20.56 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 30 Mar 2016 07:20:56 -0700 (PDT) To: internals@lists.php.net References: <1458153695.3969.16.camel@kuechenschabe> <3F.70.02405.6803BE65@pb1.pair.com> <56F01545.8080008@gmail.com> <56F14572.701@gmail.com> <56F15EF5.80006@telia.com> <56F16023.1010002@gmail.com> <1459340322.18310.6.camel@kuechenschabe> Message-ID: <56FBE05A.2020305@gmail.com> Date: Wed, 30 Mar 2016 15:19:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1459340322.18310.6.camel@kuechenschabe> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [RFC Discussion] Typed Properties From: rowan.collins@gmail.com (Rowan Collins) Johannes Schlüter wrote on 30/03/2016 13:18: > Maybe we should actually discuss making PHP fully typed and making that > consistent instead of adding one piece of typing step by step. This gets an imaginary +1 from me. Function/method parameters and return types make sense as a special case, because they are "signatures" with lots of special meaning already (interfaces, inheritance variance checks, etc). Cool though the work on this RFC looks, it feels kind of experimental, like Sara's operator overloading extension [1]. It introduces a new idea of a "typed property" which has arbitrarily different behaviour from normal properties and from other kinds of variable (local variables, static properties, array values, etc). From an implementation point of view, I totally understand why, but from a language user's point of view, I'm not sure making such a strong distinction really makes sense. Alternatively, perhaps this work could be re-purposed in combination with some form of getter/setter syntax sugar, to produce true properties, as a separate concept from members? This would make the lack of support for statics and references make much more sense, and feel more like a full feature in its own right. [1] https://github.com/php/pecl-php-operator Regards, -- Rowan Collins [IMSoP]