Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105663 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 7848 invoked from network); 10 May 2019 16:36:17 -0000 Received: from unknown (HELO mail-yw1-f68.google.com) (209.85.161.68) by pb1.pair.com with SMTP; 10 May 2019 16:36:17 -0000 Received: by mail-yw1-f68.google.com with SMTP id a130so4735659ywe.13 for ; Fri, 10 May 2019 06:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ncsu.edu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=/w5vb9tNy7GwRCoA7l3gLDCLzzzHm1A13WRuFvfA6Qw=; b=PFPsGTAr3Mintju8uiHskO91qmV9nZoVikV16l3H3IgVxf+XdRnjmzt9UWOZ4/ERf1 mzC7Y0uxJITZKghBoNSqBWm+GiHe6RItcnvpU4VgRXBW/n/fOA138kUGBcLyrAEPoOuc PK3BuhYt7KyGbrDAjCwg867z5CLtnnf6etZuBG2ctMFRdKAGa+iC8Q6ZHlH6FFfIkuZw 0MThP2c2jEyp6paaz0KEn2h/VGzP8n5yzyLGiogbt7CtFrHiMrJtG7tk9dUrfGHYjpOo 55vlGf1dFr0Q4XvwlCn4MUOtp9Vzo+1GuZu+V7NzSBJC24wUmLPtsiYuxvSbkGu4t2ig 6j7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=/w5vb9tNy7GwRCoA7l3gLDCLzzzHm1A13WRuFvfA6Qw=; b=CYj+ciusoMZaCh+VxqWgEHCuLS0znrs9KuGqp6gjt0iSeCmn4d5EyehyZXP1HwuHX5 pCtrQqELjDrMsCLJ/lCJ0wSEBZNphSfl2tquaZihqShkTqpeSgdueNzo25EnFVFlb7Ks ynzKdCOO6hEY461qFTRpOlhm0MY++ZhDAw4TUGl8GC0VOx04FNPnQVeNtVJ/9GYAf1lR /U2f6Qryz2ADoRCFTFA/WHvKyBQQRARYtLkaN3Mqv/HFZ8r8dmtGLIrMqTWlM3NbXlfz Did8hCUzKX85dQysJFFxZbwNooFtQCZC6NihHBOEH+rVyMheUnf4yuXhQajEUo6SyS04 EgvQ== X-Gm-Message-State: APjAAAUdEcMErj9EsAP8E6dJHwzk3XV9SGvDCqQHE3daKzGjauVvBV8i 0NrhRrvrvQuLhaTyymMw/Q4IWmwEBaNbchr2UMKl0PAYzkdNQg== X-Google-Smtp-Source: APXvYqzUS1MHE5wEzy6jeAiBm27QTq7JpumKty60oqcKRNy8pxmEgTHFq7WUU1V1mQ7hcT9bf3Xznsi3ARuCsw2dpZI= X-Received: by 2002:a25:dd3:: with SMTP id 202mr5149367ybn.352.1557495655516; Fri, 10 May 2019 06:40:55 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 10 May 2019 09:40:44 -0400 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] PHP header files, restrict to declaring code only From: mdwheele@ncsu.edu (Dustin Wheeler) On Fri, May 10, 2019 at 9:15 AM Lynn wrote: > > 2. Certain features, can be restricted to php-header files only, meaning it > does not affect > "normal" PHP files. This might open up a whole new range of syntax > possibilities that > are currently blocked, such as `@trigger_error()` vs `@Annotation()`. > Hi Lynn, thank you for opening this discussion! Could you explain how the range of syntax you suggest (regarding annotations) is currently blocked? I'm not challenging your claim; I *personally* don't know and am interested. While certainly not supported natively, comment-based "annotations" can be implemented in user-land and processed via reflection (See doctrine-annotations[1]). There has also been previous work and discussion in the annotation space [2][3][4][5]. Based on my light reading, I couldn't find any objections to annotations with side-effects, but I could see that as an argument. However, I'm more curious what your perspective is. Personally, I really like the idea of being able to declare "side-effect free" as a feature. I don't know if I prefer the idea of a `phph` file, distinguished by extension (so I'm glad you mention alternatives such as `declare`). That said, I think that's mostly from shock and not wanting to ever go back to a world that included *.php4, *.php5, *.phtml, etc. :) Hope all is well, 1: https://www.doctrine-project.org/projects/doctrine-annotations/en/latest/index.html 2: https://wiki.php.net/rfc/annotations 3: https://externals.io/message/82813 4: https://externals.io/message/64895 5: https://externals.io/message/64722 -- Dustin Wheeler | Software Developer NC State University mdwheele@ncsu.edu "If you don't know where you're going, it's easy to iteratively not get there."