Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:94313 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85998 invoked from network); 28 Jun 2016 18:10:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jun 2016 18:10:05 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@mindplay.dk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@mindplay.dk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain mindplay.dk from 209.85.213.48 cause and error) X-PHP-List-Original-Sender: rasmus@mindplay.dk X-Host-Fingerprint: 209.85.213.48 mail-vk0-f48.google.com Received: from [209.85.213.48] ([209.85.213.48:33694] helo=mail-vk0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 28/87-41838-B7DB2775 for ; Tue, 28 Jun 2016 14:10:05 -0400 Received: by mail-vk0-f48.google.com with SMTP id j3so33387548vkb.0 for ; Tue, 28 Jun 2016 11:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindplay-dk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HttW8e4wwa9ENmbqhm/hsAd5/RznQH0esMNt9GyhrXI=; b=MPhS/MpDxHqXFembWmc9JRLgQ2nc+mnXbYwx321ilybNMGhnvrJBUnY6GCcuauuOog Yo7BZOnx+w3E5jmQ6By5evt0AUNf5ubQOxlVR4P2a8NGWqE3whi0nT2l8pmWfDgCE6qf XH8skIrdTgHRO+kguhmrSbk686HDn9cU5Y7Ky8z5LXWhwuYtLXZw+TmO4k41FI1hngHY zTaW7Vh3mjG/9vf4Hgr9x9G0mppP9hOxAPXROi0bdAm/9NhkLCGwDNTufyZ93q4cbMEh hlWHG3Za8croOYuNcrKTJ32/FzIStLu5yC63C9vU3GpCluHs1TR8qAF626gsNLvCiody gueA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HttW8e4wwa9ENmbqhm/hsAd5/RznQH0esMNt9GyhrXI=; b=cZe50/efDxtBWlH9VROamjVA7hdOrMw65uv4SfLwb5lNsl9B6d//9GKEnpAOF9/j9B af7vNycPk8R2rEOkug24bI08/8i2oDvwaT5ZmYAAik33zbDZTaInZWnX+HNmv6EvRr9m wUci4rWW0/vT9RekQvBaFmkrVg4xnsjpewkCcRHKGWETYH/losEJ8u4hF/9773yBQbPn 0pB66SGnYsRW/iKMCH+j8JbNBuVTi3ZnNVU7BqyEct3S58RtRrxOWc0FlLi16iol+ohc SGFzVhvt6nNprGCDhAw+eP1Ulm/vryrqAnEhVGlPCWvYR6ERO+W9yeZ8y3vIECikRbgR LhaQ== X-Gm-Message-State: ALyK8tKo4ULL0lm3ZAej7QcVSlAmnzF2JMd+/0gaUgtEZ5RXO5s2SSPr7OfgIILx/iFYjfTzvnSBCiYtupcSfw== X-Received: by 10.176.3.72 with SMTP id 66mr1397664uat.146.1467137401538; Tue, 28 Jun 2016 11:10:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.88.148 with HTTP; Tue, 28 Jun 2016 11:10:00 -0700 (PDT) In-Reply-To: References: <211db59e-9c22-6df4-1f72-66ebbc5095bd@fleshgrinder.com> Date: Tue, 28 Jun 2016 20:10:00 +0200 Message-ID: To: Rowan Collins Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Simple Annotations From: rasmus@mindplay.dk (Rasmus Schultz) Thanks, Richard and Rowan - this gives me more to work with! I will work on a new proposal and ask for more input when I have a draft ready :-) On Tue, Jun 28, 2016 at 7:56 PM, Rowan Collins wrote: > On 28/06/2016 17:31, Rasmus Schultz wrote: >> >> For another, eager construction means we can filter annotations with >> instanceof rather than by class-name, which is much powerful, enabling >> you to leverage inheritance - for example, you'd be able to ask >> directly for all instances of ValidationAnnotation and get those with >> a single call, which is incredibly useful. > > > Sorry for the extra mail with only one point, but I missed this before. This > can be achieved using the fully-qualified class-name by using is_a() or > is_subclass_of(). This obviously needs to trigger the autoloader anyway, but > can still avoid actually instantiating the class. (And thus, per my other > mail, evaluating the args.) > > I think lazy construction (without magic stub classes) gives the best of > both worlds here. > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >