Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93310 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82354 invoked from network); 13 May 2016 12:11:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 May 2016 12:11:30 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.218.51 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.218.51 mail-oi0-f51.google.com Received: from [209.85.218.51] ([209.85.218.51:35048] helo=mail-oi0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EB/02-01216-074C5375 for ; Fri, 13 May 2016 08:11:30 -0400 Received: by mail-oi0-f51.google.com with SMTP id x19so166863384oix.2 for ; Fri, 13 May 2016 05:11:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=5BgQGwz3bsz4XFcRwJfjs4QU95a/E/M2Q+KQxX4pZ/I=; b=wAN35XDVgHJFX/lDMTrVPmblQmcMSMh8Rpec/KQMbxU20JT+JyOijvmxi13hgrHIWM bWGAkHSOPg39dehkt/SE66Ehq5NUyCGqGeGdlPrhDMtj2zzZqYAE7EjPbGaPPMqK2uYP VCfr9lTuw2/4OVbafLLeWLJZsZ6tYYoOGfZMFVZm6zTKI3BPriDXLGaXFZxBO5lWcS1g bmVUhBySBhtqSWs8UQ6RjLkRCEn9X3HRwFHDR8bgGkYEzl4bzTcEgw7VjOuGL0+SCPVn eDwTzsxfSenSgup7MQCho3M2WM2A7QgLBDpBkFjkhApqiGJrz1D4pqNNGWPKAbV1qcSw JtSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=5BgQGwz3bsz4XFcRwJfjs4QU95a/E/M2Q+KQxX4pZ/I=; b=lGgjDvtB5DJ5oNNnJyccIKJ1wIs5tAnxwDdjnQhl0a4YQxjSFNafyXVlC8zAVbB0px pvWhpSPfZIxT7oQ2RtI9UgzmXWYa/3w3EPz9xR3i81t1usFb4ceHRTdOqZlBkNpblKjm PNgcvc2GMHjAKhs9Z+XsypNkdrkqMIqkWhhliQNfUlhjRKq5+x/+e87FIJykiBD2QR0v lHGv4MWH4przEg376gobyqcI06ztOuRcr4sLpW58fK4rIQkY2TLJ/5mLZemJ7Pc+bd7U QEXXXSF+SKp2HWtzEP9kyDurdecmC5WgeGQp+8KD78c0uTb+zhrJqDjt3zqFwYvwdjk5 mo+Q== X-Gm-Message-State: AOPr4FXazG1rKeDGO81ZuFMhjTXXUpKkG50fDgoCs0hyeNkR8WvLrsV/5Q+w4T9+x3b9QdwSqZyr5zllP9x5Jg== MIME-Version: 1.0 X-Received: by 10.202.102.36 with SMTP id a36mr7484095oic.122.1463141486562; Fri, 13 May 2016 05:11:26 -0700 (PDT) Received: by 10.157.37.120 with HTTP; Fri, 13 May 2016 05:11:26 -0700 (PDT) Date: Fri, 13 May 2016 14:11:26 +0200 Message-ID: To: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: [RFC] Simple Annotations From: rasmus@mindplay.dk (Rasmus Schultz) Dear Internals, I'm announcing a simplified RFC for annotations: https://wiki.php.net/rfc/simple-annotations It's an alternative to the proposed Attributes RFC and the (2010) Annotations RFC. I'm attempting with this to describe a feature that is closer to the language than what is proposed by the Attributes RFC, by permitting the use of any valid PHP expression as an annotation value. Where the Attributes RFC proposes new syntax for what is essentially arrays, this proposal instead permits you to use actual arrays, e.g. without inventing any new syntax. It also allows you to use values of any other type, including objects. This makes the proposed feature more immediately useful, with a minimal learning curve. Compared with the old Annotations RFC (and Doctrine Annotations, etc.) this proposal does not attempt to define or enforce any rules about what annotations are, permitted usage, inheritance rules, etc. - instead it adds a very simple language feature upon which the community may choose to build (and evolve) facilities that implement additional rules and logic. My hope is that, if we can agree on something very small and simple, we can defer the more opinionated discussions about rules and logic to the community. In my opinion, language features should be simple, and consistent with the language - I believe the way to do that, is to avoid discussions about how such as facility should be used, and instead focus on how it should work. There is a lot of opinion built into the old Annotations RFC, and into Doctrine - features that attempt to dictate how the feature should be used. I don't believe the language should dictate what is or isn't correct or appropriate use. Please review and comment. Thanks, Rasmus Schultz