Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92667 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44909 invoked from network); 23 Apr 2016 21:35:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Apr 2016 21:35:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.195 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.220.195 mail-qk0-f195.google.com Received: from [209.85.220.195] ([209.85.220.195:36216] helo=mail-qk0-f195.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/A5-07837-28AEB175 for ; Sat, 23 Apr 2016 17:35:00 -0400 Received: by mail-qk0-f195.google.com with SMTP id l68so8066891qkf.3 for ; Sat, 23 Apr 2016 14:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=KRA4bBTaq1GymQN9/NtXnO7Rkyv1N4tLOW9qVJqF+Tk=; b=xV6FI2fssass4ActYXG7uk0rYSIjgIo9zn2Jo6nA9ZKPII3NaBfcnPujPFMypHSkAr QAedtEOtwVxMm6jPBcj/csKD7YOl/JRVh7NKgq/clOi5+bFLaipJFDpNU2KLssD4dAzC /94VMYxn1C1AKXpBx1vFVBlzKeelsvFzmB9nh6X7Lz2GvVQcaieIRlXNBTyHGAzcLuyC v4NnDd5q6BHwky618+qt6f/9OAxUsgYssZZYWidafQRsoWrQGrknFTIFUNQfCjSzoGkO ITailU0VHvAKrH5ILg5kSSgyJcrl9uh2iuZm+aOVlmAql52bEp97/Cd3qyrO4Q+9ScUM fagw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=KRA4bBTaq1GymQN9/NtXnO7Rkyv1N4tLOW9qVJqF+Tk=; b=M/oME9aQphAT7gfv7Y2ZnyS+3qDg9+MbdtvxMcg5RKBiZyF2mxMocnXL/MKF/4dwSE 8zOjSPzUxbKeTZR/szAsOiTpt3iM1VEADXhRYMigdqzCNAVNP8Jc/VotYLBbGg/Kf66W oout/zzONozOnzbfka8Uc06ueTZNDdaDlw/+9jxuHhlRap2CPpcLjn8tdBEXdtSoEzLa UKIE+ghSqG9Ta27Wh1NCXAKIOzCERB0/fciDN5kPq3lCevojUbP8xHWyNNBnF/2QZz8Z BXGh5NGPDBj3LdFliA6QVPPdVcl6AXZiq7eaBx4DjBX+xiHflp4w8fWeDsnaAv5QLm4w l9Wg== X-Gm-Message-State: AOPr4FXgKqhRDGScoZp+mcIZa68P/Qn/5p70oGpF9fc6BoCYuq/6ddd5LJDj+9pCzbmkBHjvzIoKe7K9K9YRmA== X-Received: by 10.55.80.136 with SMTP id e130mr31513286qkb.28.1461447295965; Sat, 23 Apr 2016 14:34:55 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.140.27.133 with HTTP; Sat, 23 Apr 2016 14:34:16 -0700 (PDT) In-Reply-To: References: Date: Sun, 24 Apr 2016 06:34:16 +0900 X-Google-Sender-Auth: N4D1E9IGhf22nz1-vYX9_F6EpRk Message-ID: To: Dmitry Stogov Cc: internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] PHP Attributes From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Dimitry, On Fri, Apr 22, 2016 at 6:13 AM, Dmitry Stogov wrote: > I would like to present an RFC proposing support for native annotation. > > The naming, syntax and behavior are mostly influenced by HHVM Hack, but n= ot exactly the same. > > The most interesting difference is an ability to use arbitrary PHP expres= sions as attribute values. > > These expressions are not evaluated, but stored as Abstract Syntax Trees,= and later may be accessed (node by node) in PHP extensions, preprocessors = and PHP scripts their selves. I think this ability may be useful for "Desig= n By Contract", other formal verification systems, Aspect Oriented Programm= ing, etc > > > https://wiki.php.net/rfc/attributes > > > Note that this approach is going to be native, in contrast to doc-comment= approach that uses not well defined syntax, and even not parsed by PHP its= elf. > > > Additional ideas, endorsement and criticism are welcome. Nice RFC! Attributes are always evaluated, right? i.e. No INI switch nor declare to control behavior. Just making sure. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net