Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111607 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3763 invoked from network); 18 Aug 2020 09:59:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Aug 2020 09:59:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 14D001804C0 for ; Tue, 18 Aug 2020 02:00:53 -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=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,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-il1-f179.google.com (mail-il1-f179.google.com [209.85.166.179]) (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 ; Tue, 18 Aug 2020 02:00:52 -0700 (PDT) Received: by mail-il1-f179.google.com with SMTP id t13so16925196ile.9 for ; Tue, 18 Aug 2020 02:00:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dSFjFXHHs5IwQehzVDtVmllbWJF9tqUmFJvOdKOsRIs=; b=OxhBScpZ3L2egJD1y8lAKwINJ31u7LmQ9JhfF8us07zT9Sj7p7UTFm9dcu2yfRQ5uq MSuWCv/kh1Kt+pvuIcfkgkomgMgg8PN+gtLIuaEtRe8XNGmRKMFKCdDvXCLu1Pl8LFud uwhr/0oZINwO3mTzFberftFaANfbnNEpV87kPfiDqhdtZHfyVGs8e3+EO0iYQ5ssqhLJ lyXGCkcepxbcN+37WQmENFpt6niofndFT3l/2GmnOyUUBiVI1Nc2CsMn8p+Nuf7vSMsR M8wm3kkM+kaAblW5pVqI/+aLh7kTm7b0AR/Cy9w7gUaZQH86whlnQyj4MiiLo/A0Ax0b dPsg== 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=dSFjFXHHs5IwQehzVDtVmllbWJF9tqUmFJvOdKOsRIs=; b=lUKQnID3Tpq/gfNyhm5/SZe/VdjoJrOUT+XyaL0kFxzOREd5elQ/SJaovScsJLeQtv qwuQQ9hfBbA5eRGqiK3Au0IGPM74TedPcyLlHZFOQ2Fo5fIY1WhgxuOtAvlISmfjJ/dE L0++FpO6tHkDstoEUE2GoSReLKcIhMBek9AtDwp+Eh9GcfSMU+urQBqb4wj2lK80hXRu WSWe5H6CPYVy44cPozEc7EQHTYkgpMDVYMZx+zMWbW96UknrzZGPhBXwl+YNc2LcDZ7B NUqZaRGIF3Pa7dqfeBOR6O1zjnj98ncfjLBkqgfzS0zx2/6OO6rqQEFcZjENJFnmOvWW J1Sg== X-Gm-Message-State: AOAM531bNVB3FtQLmkvjD56Na0cWzIQ02acbo6hmqucJ2W44ysUHedcC gDgdEDLVPPFCxiw0yy8tKSAT9a+BFu+lmtNTNFmJoM7Z8sM= X-Google-Smtp-Source: ABdhPJwvcWruUYsa90VJGd2hxM9zdEoUHRR53oE6vfSHQ3Zeh7NK9lE7zZr4MIZPMjxWUXZlXbCpJuTP9r4igQNmq0Y= X-Received: by 2002:a05:6e02:dee:: with SMTP id m14mr17059717ilj.207.1597741246207; Tue, 18 Aug 2020 02:00:46 -0700 (PDT) MIME-Version: 1.0 References: <92f3ee69-7b06-4995-546e-95f0218767bb@gmail.com> In-Reply-To: Date: Tue, 18 Aug 2020 10:00:32 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000006c5b6405ad231faf" Subject: Re: [PHP-DEV] [RFC] Better string interpolation From: rowan.collins@gmail.com (Rowan Tommins) --0000000000006c5b6405ad231faf Content-Type: text/plain; charset="UTF-8" Hi Ilija, On Mon, 17 Aug 2020 at 18:54, Ilija Tovilo wrote: > > sprintf-style modifiers are an interesting idea. But I'm not sure if > there would be a huge advantage over using number_format. > > [...] > > Escaping is a nice idea but I'm not sure we want to go that route. > String interpolation is still a bad fit for many templating things... > The above reactions basically mirror my initial reaction to your initial e-mail: an extended string interpolation feature sounds nice, but how does it differ from string concatenation and function calls? That's why I started thinking about additional features to bring in: I was trying to think of the use cases this new syntax would be for, and what new things it would make possible (or rather, easier). If the proposal is to add a completely new string syntax, I feel like it needs a stronger justification than being able to write $"Hello #{Foo::bar()}\n" rather than "Hello " . Foo::bar() ."\n" Regards, -- Rowan Tommins [IMSoP] --0000000000006c5b6405ad231faf--