Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113752 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 49034 invoked from network); 25 Mar 2021 02:06:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Mar 2021 02:06:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 10DC01804D0 for ; Wed, 24 Mar 2021 19:02:10 -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.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) (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, 24 Mar 2021 19:02:09 -0700 (PDT) Received: by mail-qv1-f66.google.com with SMTP id g8so447027qvx.1 for ; Wed, 24 Mar 2021 19:02:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=newclarity-net.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n9LiXYvxG7d9qltnUHodo0BTw614lCjvGrbU9abuKc8=; b=jok394JVsXWq/WjiOuDpFyW/+AAlAqnKdMa+VN/+zwDznjuz/bMKrV8kj0t7/cwOYV yHA9aX8U66D6SVHnI1yYhijHsHTbfSyHFC2porYmMVujniEfktd50kfkM/6HW7hHdOgC u9TbVO6vM8BEp86ROAmALSEA1Eqy5zs/2Nfoip0zSLc3Ozq3ZHAM53LhsLZ7sNUP0Nnk x4D2eA+r30ZN7GLOisofr+WJ/tKntOutU39lsefvNvQ45lbUdFuTJR4elqjrURFKx7Ny 380vF7ns9S+kkocjBnhbb2mUgcVZHDNOdY3LjuuAXBf9E/GtSQOBGfi+19xyk0zXXWi0 9BsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=n9LiXYvxG7d9qltnUHodo0BTw614lCjvGrbU9abuKc8=; b=Sc4hxC4ueFcxT/KdAIHqcWEPKei1mt3HIMyKgKeeNDr/204lAseGetMN5Z5GOcQqga xEfP7vrWDin/wgnVSbOvD5ifyyT0N4SWfTSP2mF66M938HzDIWFx8QDAyUdd0BQ100UH K4jubZ65Pva3+DXIp8T/t6obU8pR9imOpj1LP8DAkHw/TnzU0vYGOiip5YbYw+5fFzPw vqr8BSHw71gsa63ZDaGl6RaYGpLOqlLVqCIzAUQ3untQFnGYbX3+Vn+ZpdLeFJ7FULtG aJ+OsZH8yrANSjCunRTAOzg/pB9h4lvj4elAnoIOivgeP3xpKczUO+7wvcVWzMc+IDgR qakA== X-Gm-Message-State: AOAM533MBgYGsU3oaVdyWBVcOXV1lKZ1029DSWa9Wg5INv8KWe+J9BJH Y6GsCIFQUeO0VSWNBz3sAZ/+/CkNLFnEloDJ X-Google-Smtp-Source: ABdhPJxF2zptRu6jifY50ZWWgECALeclTqqizghIb/q5Vtr0mpFWua/xVmgXS9ZXUX4pcHtLUikfVA== X-Received: by 2002:a0c:f702:: with SMTP id w2mr6361010qvn.0.1616637727139; Wed, 24 Mar 2021 19:02:07 -0700 (PDT) Received: from [192.168.1.239] (c-24-98-254-8.hsd1.ga.comcast.net. [24.98.254.8]) by smtp.gmail.com with ESMTPSA id w78sm3236043qkb.11.2021.03.24.19.02.05 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Mar 2021 19:02:06 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) In-Reply-To: <44ac7866-75ef-44ab-a5f9-4e571652b5e6@www.fastmail.com> Date: Wed, 24 Mar 2021 22:02:05 -0400 Cc: php internals Content-Transfer-Encoding: quoted-printable Message-ID: <21C66BCC-A77D-48B0-A653-9D65ADF06A3B@newclarity.net> References: <44ac7866-75ef-44ab-a5f9-4e571652b5e6@www.fastmail.com> To: Larry Garfield X-Mailer: Apple Mail (2.3608.120.23.2.4) Subject: Re: [PHP-DEV] [RFC] Short functions, take 2 From: mike@newclarity.net (Mike Schinkel) > On Mar 24, 2021, at 8:39 PM, Larry Garfield = wrote: >=20 > As requested, splitting off the short-functions RFC to its own thread. >=20 > https://wiki.php.net/rfc/short-functions >=20 > In response to the feedback that the savings in typing volume is = small, that's true but also not the main point. The main point is to = allow and encourage functions to be written an in "expression style", = that is, as actual functions and not procedures. As the RFC notes, such = use cases are increasing, and is likely to increase in PHP, and that's = overall a good thing for the language. It fits well with a number of = recent RFCs both passed and proposed, and makes writing functional-style = code much more natural. I like it. =20 I hope this passes, and would vote for it if I had a vote. -Mike P.S. I do find myself lamenting that while this FRC makes code more = concise it does not do anything to reduce the (IMO overly) verbose = nature of method declarations that require both a visibility modifier = and the function keyword. And while I know you just stated that = conciseness in not a main goal, it is still a benefit of this proposal. =20= It would be much nicer if we could indicate in fewer characters what the = visibility modifier and the function keyword currently denote. Yes, that = could be addressed in another RFC, but it could also be addressed in = this one =E2=80=94 assuming there was a will do to so =E2=80=94 so now = felt like a good a time as any to bring it up. Assuming others besides just me would like to see function signatures be = made less verbose and would like to see some proposed alternatives, = please ask and I will happily follow up with some ideas. >=20 > PSR-12 may be unnecessarily verbose (I dislike PSR-12 myself, and have = made no secret of that), but it is far and away the most widely used = coding standard in PHP land so we cannot ignore its influence. >=20 > --=20 > Larry Garfield > larry@garfieldtech.com >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php >=20