Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93379 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20223 invoked from network); 17 May 2016 16:05:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 May 2016 16:05:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=larry@garfieldtech.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=larry@garfieldtech.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain garfieldtech.com from 66.111.4.29 cause and error) X-PHP-List-Original-Sender: larry@garfieldtech.com X-Host-Fingerprint: 66.111.4.29 out5-smtp.messagingengine.com Received: from [66.111.4.29] ([66.111.4.29:50941] helo=out5-smtp.messagingengine.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0D/81-11000-F314B375 for ; Tue, 17 May 2016 12:05:19 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id CCE8720A12 for ; Tue, 17 May 2016 12:05:16 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 17 May 2016 12:05:16 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=2Q0mKv6oJLmV1Y7 nfH8fOhn6eG4=; b=sM7OtYTnyCjItqaXIzuTdl/PVWFuL1GnUSVW1d7QC8vYZgr q5NFisETBZFSU7V0HbARjPoaqP5URVDLyU+Qi1mAlaLUCPfhkvgPEpeMWdBf9TtV uVs6sVj6Fp8anbw7KVGaosFJn/FKwciuU/vR4QMsbGt4S+QDaMHuNJWjqp2A= X-Sasl-enc: 4qVzSHvv3iWyVH0x8KpjOt1bVXk8jQtrPz1DEbI7cIei 1463501116 Received: from [192.168.6.220] (unknown [92.103.57.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 76B3A6800AF for ; Tue, 17 May 2016 12:05:16 -0400 (EDT) To: internals@lists.php.net References: <61e6a083-91c2-799f-9757-02f56fe184e9@gmail.com> Message-ID: <573B413B.9010106@garfieldtech.com> Date: Tue, 17 May 2016 18:05:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Simple Annotations From: larry@garfieldtech.com (Larry Garfield) On 05/17/2016 04:22 PM, Rasmus Schultz wrote: > I'd like to finish this RFC, but I have two remaining issues. > > The syntax is a minor issue - since any valid PHP expression can be > used, the bit-shift ambiguity is technically an issue, however > marginal. > > A lot of people commented on the syntax when I posted the RFC on > reddit - they don't like it. > > Anyone have any ideas for an alternative syntax? It needs to be > delimited, e.g. needs to use opening and closing delimiters or a > recognizable opening delimiter... Here's some ideas: > > @{ new Table("user") } > > @[ new Table("user") ] > > {{ new Table("user") }} > > +{ new Table("user") } > > I don't like any of these really, but the bit-shift operator isn't > going when the stuff inside is an expression which could include > bit-shift (is it?) > > The other issue is the dependency (context) injection example - no one > seems to be able to cite an actual use-case, and if that's the case, I > should probably just remove it from the RFC entirely? > > @Larry can you think of a case example in the myriad annotations > you've seen in Drupal code? :-) That's on my todo list for later this week. :-) I'm recently arrived in Paris so jetlagged beyond coherent thought at the moment, but I will see what I can do on a Drupal case study. --Larry Garfield