Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117876 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76645 invoked from network); 8 Jun 2022 13:43:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 8 Jun 2022 13:43:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2CFDF1801FD for ; Wed, 8 Jun 2022 08:29:05 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 8 Jun 2022 08:29:04 -0700 (PDT) Received: by mail-yb1-f174.google.com with SMTP id w2so37099860ybi.7 for ; Wed, 08 Jun 2022 08:29:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ZHinTBXSLFKnSkoAHWCG/Lynx5eflR9/GGuRSqKaE5E=; b=gAdbJOXVO/TEmakrx1+BzQEGhjRFbuPnrp7TfzlDYsbt4W+fRM5hzXe7ymAe6y8SEy hEO3tjGyDSJoHHMq9t/0NCUbf/pyjOTYw9qzme9QGV6+41vu7iuGn/Hr1DntFs5aRrfw FnqKvitb853HJb1jNCMo0csO/rQ7Hh9qk8qflgGtumaL64IvN27f0HgCsVke3AaIDafO EoLzFPTsTkAj0sHcOPMADFORx671VIdi3w3b3Xz1XrQUFwb1MPio+8YVgI7HNYBp3rN/ 1dHTOHRnwXzK9CbTYGHLOcr0FM2J0ORBxkkxSfugdPPZpo0vxpUHs263biTTl+gIBGYn nU+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ZHinTBXSLFKnSkoAHWCG/Lynx5eflR9/GGuRSqKaE5E=; b=BoADDPjm30U6cagmOXovn2HGroXB3HiSLkJH+QBgkJ85SXSk4JjCyWkPg2xc2duX03 7CGiEJKXFabMkrXGjJjADpXTzF6FpUnwLd5GUm45TrcqOQ2K+Yu1qXtW3PsZ3/rsjPMp wulcS0EphmeilhG303b2iUGCnKQ7lt1htM0IshAAmYCKq1J8xrWDMu7HTJeVjZuxetvm dDHyGfCsrvOm2EHmH0jl6kYRQ+cpcHxTXoFqUaMBQNIfG40LkGwSJaHTRaIheltXEeVE AeunxHZpJYUzyQFzU56OqaeYOil7s7RdvFPXYOYrRMKyHtn34JzLPQQlR7nQ+Ysv+uqT 9gCw== X-Gm-Message-State: AOAM530VZR6No8/wbRzbW9lu/yNzG1F7I4O5WH7kSRmpLCBAngTnM7R2 EWTUY/WYdHqfLoswHYXQ6nqZkFPGK/0qUqatv8rMrEpayg== X-Google-Smtp-Source: ABdhPJyZoK70KxYCKBNJM9kQHweSUnRF3hQJ5cGfsGrnkFgrLDGYzrostuavzDlWhrWLKl17tteQKIlpSdoo6rREO7U= X-Received: by 2002:a25:47c6:0:b0:65d:91bc:a149 with SMTP id u189-20020a2547c6000000b0065d91bca149mr33859404yba.14.1654702143824; Wed, 08 Jun 2022 08:29:03 -0700 (PDT) MIME-Version: 1.0 References: <563B99A1-88D9-4EA9-AAB3-982C3A6495C6@gmail.com> In-Reply-To: Date: Wed, 8 Jun 2022 17:28:52 +0200 Message-ID: To: internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Adding new closing tag =?> for keeping trailing newline From: guilliam.xavier@gmail.com (Guilliam Xavier) > Declare statements shouldn't have any impact outside of the file in which > they appear. Declaring strict types doesn't force other classes that > interact with the defined class to also use strict types. A declare to > change how newlines after closing tags are handled within a single file > forces anything that uses the classes/functions defined in that file to > know that it handles them in a possibly different ways. Indeed (via includes)... Also consider this hypothetical example: ``` - 0 - - 4 ``` Note the use of both ?> and =?> *within the same file*; a declare would not allow that. > I personally don't see a need for a new closing tag. I'm not usually swayed > by the "it adds confusion to the language" and would be against removing > such a tag if it existed and that was the reason for removing it. However, > I do think it's something to consider when adding something new to the > language. In this case, I don't think the positives outweigh the negatives, > especially in light of the fact it's really easy to accomplish this without > changes. I personally am generally in favor of removing "magic" stuff (even if this isn't exactly proposing that but to add a "straightforward" alternative). Other example, consider starting from this: ``` - first - foo bar - last ``` Now if you want to "variablize" the `foo` part, just change it to e.g. ``; but for `bar` you have to remember and write e.g. `` (or add a blank line after it [or a trailing space... no, please don't]), only because it happens to be at the end of a line (and don't forget to re-change it if you later append a `qux`)... PS: An[other] argument against could be something like "please don't add more things encouraging the use of PHP as a templating engine (unsafe etc.)", but the main target is *non*-HTML (e.g. Markdown or raw text) templates. -- Guilliam Xavier