Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64895 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60796 invoked from network); 12 Jan 2013 16:29:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jan 2013 16:29:06 -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.212.45 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.212.45 mail-vb0-f45.google.com Received: from [209.85.212.45] ([209.85.212.45:52433] helo=mail-vb0-f45.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/C6-24230-15F81F05 for ; Sat, 12 Jan 2013 11:29:06 -0500 Received: by mail-vb0-f45.google.com with SMTP id p1so2358228vbi.4 for ; Sat, 12 Jan 2013 08:29:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=JA2KdyzWKEA00exKi8wpmOxov+gwgGSygH+0zjLFDaE=; b=KURqnb+0Dll69Kd+wy6OyyiOEKXB62fGYVO4cCKe95oxIx2M2gqONO5sKhTd9KTYtS Ymn0UaxKiz1Rb0qUYjsl3u/xJ+SxRgE3oZMkI9Y0Yoh7IYzDiBUtLMWpk7cv088X8F/0 u5aVPteAJkVelUDqqxYDXkK0R6toygY34enaqetYoVyXTHRRetmRvRg7u47IDUCYU3Lq 2PoYFGWVHOvzy81Qdfb26q4XSX/pqKs2aFs/h90KwFKhAjl2PYt0MjAKLFzAeJSt8+vs zyEWEKO/gg2sRg/sOWiUyKMxCynAKj3hlbvCirCy3zTuh+oQS6Oq78+IbTWyqGjvckmh MssQ== MIME-Version: 1.0 Received: by 10.58.15.227 with SMTP id a3mr100759850ved.38.1358008142716; Sat, 12 Jan 2013 08:29:02 -0800 (PST) Received: by 10.58.102.137 with HTTP; Sat, 12 Jan 2013 08:29:02 -0800 (PST) Date: Sat, 12 Jan 2013 11:29:02 -0500 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=047d7b5daf50f2dfa104d319e85f X-Gm-Message-State: ALoCoQkVpVQvHgJvs8jf+giSIW04FBZhEvlQFqPKYNieIxWGEWVhbioNBTtyRuMXwDLNa3RW5oek Subject: annotations, vision, goals From: rasmus@mindplay.dk (Rasmus Schultz) --047d7b5daf50f2dfa104d319e85f Content-Type: text/plain; charset=ISO-8859-1 I hear a lot of interesting arguments in this big annotation discussion, and now there's the ongoing vision discussion, which got me thinking. It is true that there is broad community interest in annotations - part of the problem here, is that different groups have differing opinions about precisely what annotations are, how and when they should be used, the syntax, and a bunch of other things. To name a similar example, there is also broad community interest in e-mail clients - and countless userland implementations. Nobody is pushing for a standard e-mail client in PHP. Granted, e-mail is a run-time library feature, not a language feature, but I don't think it's an unfair comparison, since annotations aren't really so much a language feature either, if you think about it - much of the discussions revolve around API issues, and like someone pointed out, you could do metadata in other ways, without altering the language or parsing docblocks. I'm not making this point to argue against annotations, but it lead me back to another idea that has surfaced in discussions before: a source-directive feature. This sounds like a much smaller feature, which would be much simpler to define and agree on, and much simpler to implement. A source-directive would empower the community to define and implement the syntax, and not only for annotations, but for other features, such as aspect-oriented programming, which I believe was once proposed as an RFC (?) and declined, probably for the same reason... it's a feature with too many variations and opinions, lots of complexity, and it's probably another one of those language-features where the discussions end up revolving around run-time issues more so than language/syntax. It would be nice if every developer in the world could all agree on everything. But we can't, we don't, and we're not going to - and that's not a bad thing, because it means PHP is open for innovators to find better ways to do certain things in userland :-) The big advantage to having something like implemented and maintained in userland, is that these features can thrive and grow if they turn out to be successful - or, if everyone decides in a year or two that annotations suck, they can stop using them and move on to something else. It also means that developers don't need to wait for a year or more for their sysadmin to deploy the next minor PHP update that fixes a bug or makes a minor addition to that feature. Perhaps it's time to think about "lower level" language features that facilitate implementing "borderline" language-features, and enable the community to write better, more reliable implementations of things like annotations and AOP, rather than writing it for them? And perhaps a source-directive isn't the solution in this case, or perhaps it's only part of the solution - but what I'm saying is, maybe instead of lumping on more features that do one thing, perhaps it's time to turn things around, view things in a different light, and try to think about things on a somewhat more "meta" level? What's are the smallest "building block" language features that would enable the community to build bigger features such as annotations in a better way? I love annotations. But I love my implementation of annotations, I probably won't like yours, and that's not necessarily something we should need to agree upon. Is it really the responsibility of the language to deliver high-level features that support patterns? Or should it deliver simpler features that support the implementation of those patterns? - Rasmus Schultz --047d7b5daf50f2dfa104d319e85f--