Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115237 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27778 invoked from network); 30 Jun 2021 11:11:22 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 30 Jun 2021 11:11:22 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1D0A01804B3 for ; Wed, 30 Jun 2021 04:31:36 -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,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 30 Jun 2021 04:31:35 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id u11so3169546wrw.11 for ; Wed, 30 Jun 2021 04:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=IUm/L4iiW3ilGrj0P+Ssa1oHU66ehlcPX1/q1BQjg/4=; b=kCqaqyB/kef0NflAxBn3+YaW8oDU8SYUZn92YFRPfEiFChlA1kEuzjlm2O9TJpoQtO cI6zk6uHp2pz6JWLQxyrxzITXKf+U8gtEMi4pma8dd7NKbU3uzhT1I58LN37jzSLZzNv KkSRHGidVue+z9OB6AjTaUFBAPh8QgbyEiv8ssPB6ogwO793EoJRUqX3QJ4Dx3vi/fMH u1qKVU7Ft/uWsL1IgQ9WB885gErOhnEpMz55IwgDCx+2zouyEmoBS0KhLJhXa6DktTFW G7czGbQX7PigG2tU6lQUbR6oJMTvbMupwMH5r42ie0BIaULtQ80q4b68U0Qc8n+fCeZl c5dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=IUm/L4iiW3ilGrj0P+Ssa1oHU66ehlcPX1/q1BQjg/4=; b=oYNaOarh20kcMXiZaB2VKHXgjrINmRoSqTWTtcaboFkpKdj2vQ2ZWIVBQm3mz4ccza Pr+Oi9vC5DPwQzgexH/P12Y0/j5iRZWowftg8Ehav57m5t9dmQAKp2BkKJl19Z1za5Ct QHLktv9bERVCyPUDaY7C2o3yQ1QteB6KHVBcu73C91QiVyeiJMIyE32NzIPLQe2L/bqS 32WkD6f1MOHfy7gh7F9ixuRcnnzJi2wTFxt4c3eDIEUeYT4Dp1/0slLttpX1SovhCsSF u2DFFVnV4+mBGhIMcgXPBNWCndVO1an94UiCwY78qCaLqo5jHIyQE6+AtrIbuwoyE5Ff Gm8g== X-Gm-Message-State: AOAM530zGFF9nlCibr79ckvOXimr8vxAKheeIy6nFjaM8E2+pq3vV7Yd 5L0Nx5QhP3zJzWFKa5pQPUSPqw2CMpw= X-Google-Smtp-Source: ABdhPJy+sAWDWWxQ5i2U1L5q2AZnv2JGkixjuOuuPAAOE1VMW2h/8yV+0szwv80mG90T3PPOO7f5Pg== X-Received: by 2002:adf:8bc9:: with SMTP id w9mr37807422wra.378.1625052694255; Wed, 30 Jun 2021 04:31:34 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id 204sm21706071wma.30.2021.06.30.04.31.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Jun 2021 04:31:33 -0700 (PDT) To: internals@lists.php.net References: <17a588d53cc.f512f451993137.1114693900572862097@manuelcanga.dev> <17a59fe12e6.bbd740bb1055351.7212410057372869791@manuelcanga.dev> <17a5c8b2f41.12a6d7a4d57462.368224063523322555@manuelcanga.dev> Message-ID: <7ffdece9-fb3d-a043-1365-59fb34198ef2@gmail.com> Date: Wed, 30 Jun 2021 12:31:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <17a5c8b2f41.12a6d7a4d57462.368224063523322555@manuelcanga.dev> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Alternative syntax for Nowdoc. From: rowan.collins@gmail.com (Rowan Tommins) On 30/06/2021 11:51, Manuel Canga wrote: > I see this purpose as a simplification of Nowdocs. Just like `[]` with `array()`. A PHP code base might have thousands of array literals, some of which will be very short, and maybe nested inside each other. That makes the saving of 5 characters per literal add up to a big difference across the code base. On the other hand, nowdocs will generally be for long strings (otherwise, a single- or double-quoted string would be more concise anyway), and will happen a handful of times across the code base. Saving 5 characters per nowdoc (``` instead of <<<'EOF') is therefore a much more minor difference. In exchange for that small gain, we'd be adding an extra rule in every PHP parser (IDEs, code style tools, etc), and an extra thing for new developers to understand (the documentation for how to write strings is already long enough to get bored halfway through). I think there is more cost than benefit. Regards, -- Rowan Tommins [IMSoP]