Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113542 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 55636 invoked from network); 15 Mar 2021 15:19:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Mar 2021 15:19:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2AC791804B8 for ; Mon, 15 Mar 2021 08:12:46 -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,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-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (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 ; Mon, 15 Mar 2021 08:12:45 -0700 (PDT) Received: by mail-lf1-f42.google.com with SMTP id 18so57366501lff.6 for ; Mon, 15 Mar 2021 08:12:45 -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 :cc; bh=s2xc9NlCUjQhzWI97n87kRzN8WFYnjf5+TVATGPBg2U=; b=D3J9KpFMOEUGeMMVKx+aAf7iIgjwpMwkfULzQbTLRh9KNeDpSFb86dMfLwhMcdu++x bRsTZ7v9wks2RH9ovcIvMKDDniQ0tfzjzSF6n1BYBch6S38nh1FMdq5NIGYRvFvchiA/ 20tQegPm+Xk6tAaUYWBaJ8PUmN1M8ecW4D5KMPoNt1nZ45YpN9IT+ldZzTeeh1Y9j4gG qQO+C5sACPWtHCuN/xVa4+0EchzVIU4q2rImgRJS0uXDpD0P5LqQ2QnWsjzMRgw+CS6Q SiKzEpyKZgsQtZqMAr8JUUmyxErUkDo5CP4Yu8AxY/3W+flSl2F4zTj62FfOJxlivAj5 zP4w== 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:cc; bh=s2xc9NlCUjQhzWI97n87kRzN8WFYnjf5+TVATGPBg2U=; b=mQAfTRz71uMZVCOELbKld6cBZtu33bBIaRWh+Anm8yOjBlLVhzNpBr186dP/BHobnA Lrzh043Kg37Lo/T403hCKknDxPNh00sI/AmJLqJLmghFQcNVpqK/sE/ze/coAbDXPMnS 6pQ9VpfK912XjfkLRzpFqVPwjW1x/0dI+l2hye+nP0Y1tTehsKkqWTWdWERT0YSsiAzS xN5ocBuy66CjNF0pRsqmwrwLCYD+29DBZo0SSdBqGWk/iPOIfHVYn29/hWa6rgec1Nxt x5RmTYqosOsf6vcuE1HY2Y1OYZyQuWvYu3SejLYeF0SDu/U8avVVoXd86KIH5X9hDzl0 zDdw== X-Gm-Message-State: AOAM532BMi1iTp5XXwgGvr6RfTPFyAlHFCHx5KWIqy3W9z8tD0xKFJNJ leTixzz+HsGWN5Jjmcf3smVIgAvlWjYzxO5GA3s= X-Google-Smtp-Source: ABdhPJw5zmOCmb3DqEWZ0q/5i8bPO7PsfnKjIb8ZA/NyYaAv5d6rL4wpHxHOhLT8RzcIV56RNwS4HaqKjIDR9rzi2YQ= X-Received: by 2002:a05:6512:3a86:: with SMTP id q6mr8757932lfu.286.1615821162025; Mon, 15 Mar 2021 08:12:42 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 15 Mar 2021 16:12:26 +0100 Message-ID: To: Sara Golemon Cc: tyson andre , "internals@lists.php.net" Content-Type: multipart/alternative; boundary="00000000000062181c05bd94aeb6" Subject: Re: [PHP-DEV] RFC: Add `println(string $data = ''): int` From: nikita.ppv@gmail.com (Nikita Popov) --00000000000062181c05bd94aeb6 Content-Type: text/plain; charset="UTF-8" On Mon, Mar 15, 2021 at 4:09 PM Nikita Popov wrote: > On Mon, Mar 15, 2021 at 4:08 AM Sara Golemon wrote: > >> On Sat, Mar 13, 2021 at 1:54 PM tyson andre >> wrote: >> >> > >> > I've created a new RFC https://wiki.php.net/rfc/println >> > This proposes adding a global function to PHP to >> > print a string followed by a unix newline (`\n`). >> > >> > >> This isn't solving any problem that anyone is actually having. >> Yes, that includes you. You're not having this problem because it doesn't >> exist. >> >> We already have twice as many ways to output a string as any language >> needs >> and you want to add another because you'd rather type "LN" than "\N" ? >> Hard, negative ten thousand no on this. >> This is genuinely absurd. >> > > My opinion matches Sara's, though maybe I wouldn't put it quite in those > words ;) > > The difference between these two lines is one character: > > echo foo(), "\n"; > println(foo()); > > I don't think this one character is worth adding another way to output > strings, next to the two we already have (echo, print). Especially once you > take into account the not entirely unambiguous semantics of printlln(). > echo foo(), "\n" is entirely clear, and distinct from both echo foo(), > PHP_EOL and echo foo(), "
\n". > Apparently I am incapable of counting in the absence of a monospace font. The difference is actually two characters, but I think the point still stands... And in some cases it will actually be the other way around, because echo "foo\n"; is two characters shorter than println("foo");. Nikita --00000000000062181c05bd94aeb6--