Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75285 invoked from network); 20 Jan 2013 16:02:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Jan 2013 16:02:38 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.41 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-la0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:40465] helo=mail-la0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/44-25745-C151CF05 for ; Sun, 20 Jan 2013 11:02:37 -0500 Received: by mail-la0-f41.google.com with SMTP id em20so5350413lab.14 for ; Sun, 20 Jan 2013 08:02:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0Vz0Gtf9ozdQU7eirg1VhsA6Lz7AnmDYh/eAQWK0kDk=; b=w1IFtXuzY96ECtuVUrdAQ4jyTTVFtFAjMnsLn5CCm0SlFPC1m0QC2G/fJ7hC/cjKDP B6Xyln3jpNCYsk8UN0PrSY4QhP+JIxM7Rb7x5j7bYz0jOyoen0Nv5Bar5l0WLqgK902u lNENWbNzJW6Q25qHjJ7k4ObUtci3Rb/2Xi5BNwwhQVLcN9WELu63nvcaf4Z0gbb7/Mmj QiCLmjJlHyDlhdJPXyH6zT8Uuf4T4poVh8JoWpa5U7/ysRcKBcBNVHK8ATytEu0GYNjH G3PMNMEu9ze/eody3iwTZwjFRh/D/yDgw6F+4QHy5uVCGKizos58ZgEittWYXKdAa7aS BcfA== MIME-Version: 1.0 X-Received: by 10.152.104.199 with SMTP id gg7mr14462939lab.14.1358697753979; Sun, 20 Jan 2013 08:02:33 -0800 (PST) Received: by 10.112.138.131 with HTTP; Sun, 20 Jan 2013 08:02:33 -0800 (PST) In-Reply-To: <50FC11AD.6080506@zerocue.com> References: <4ED7146272E04A47B986ED49E771E347BB3D6ABCB3@Ikarus.ameusgmbh.intern> <50EC5F8F.8010703@mrclay.org> <50EF3C9C.3020701@sugarcrm.com> <50FC11AD.6080506@zerocue.com> Date: Sun, 20 Jan 2013 17:02:33 +0100 Message-ID: To: Clint Priest Cc: PHP internals Content-Type: multipart/alternative; boundary=f46d040890c1fba98204d3ba7811 Subject: Re: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors From: nikita.ppv@gmail.com (Nikita Popov) --f46d040890c1fba98204d3ba7811 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Jan 20, 2013 at 4:47 PM, Clint Priest wrote: > > On 1/20/2013 9:26 AM, Nikita Popov wrote: > >> I now added a patch for this proposal: https://gist.github.com/**4579298(For >> more detailed individual commits see here: >> https://github.com/nikic/php-**src/commits/alternativeSyntax >> ) >> > One thing I hadn't noticed is that the proposal was to move the typehint, > what happens in this case then: > > public DateTime $date { > get; > set(stdClass $value); > } > > Would the above produce a compilation error on the stdClass part? > Yes, that's an error. And I'm not sure what that is supposed to mean in the first place (it has two different typehints at two different places...) This proposal will allow a typehint before the property name and only there. Allowing one in both places doesn't make much sense to me. Nikita --f46d040890c1fba98204d3ba7811--