Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:113394 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 27023 invoked from network); 4 Mar 2021 22:20:26 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Mar 2021 22:20:26 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 33D391804B8 for ; Thu, 4 Mar 2021 14:11:17 -0800 (PST) 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-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 ; Thu, 4 Mar 2021 14:11:16 -0800 (PST) Received: by mail-ed1-f48.google.com with SMTP id dm26so13466831edb.12 for ; Thu, 04 Mar 2021 14:11:16 -0800 (PST) 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=SPgFFfV7bjxpvz0V8go/76fFP+LOThlt7MJP2/nTmTc=; b=habTuKTnY4Tq2j99/icG58L41YIC7+eru+RLKKXJtjTjl9oX5GbEk0G1jhYansyChn tYf26adXs8eErgMtOcKaOMdSyTsxJTuB+6ASiFwA/nGi7PRTY7kdQFU/gfXPv6B7y4sk ithwZUckaGCHd/BoaGSu3SY4WveKxfhWGqoE4ClX6mLeggeTHufwmJfI+th/nAbhP/HY FzktMt4xrC2d0yT1F6ohlnnY6oWosQ0uPofUMW16owxHHyoKzXxZEyr/gCp1LCPBVPGY l+nuIzOsnDANdt+t1rLDFeZe2LfaOMgCOmDPeS3tBdVC4U1Lzletq142u9WSfdYigA6O veFQ== 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=SPgFFfV7bjxpvz0V8go/76fFP+LOThlt7MJP2/nTmTc=; b=NcFW4VaZnbq6OnsBYl6PDveX8BSwGh+BSyCvwS5y1cuR9XV7FGXG6tYyhs9wLKP9lN wFsf3PKMBXhy5P/TWdMKMxwhwTZiNY1c50/lfVefG1XDTpmHdEhoIFlFkd1laR3jjp/3 5SaeU3GVFPTSLO17dMp+XuVojq5w7a5pDsCkSrwtl8kBFqxAdaW4ZSsnpzFzptINdW0J 2LLA9hG53a1TNgMV3fYjxnkwnp8Qkgtsl5TO6sPA2YEhu2M8UJequzmUgqy/q/wYzX9Z 2ANnPWqcVr5eqAH/DiAfMzl9EdRuIy0iCyhhbQu5kl8tcT4jjCaNqHR0xUUiIR1/aHvi IbjA== X-Gm-Message-State: AOAM531ijsxb6L8dBWg30wpgF1GR3Q7n/Sp9wvYx+3kvPeAFrUSWz3tu ZUADCNwAeCF8gWkoaGliap7IY7y5vzDLhfWt/GM= X-Google-Smtp-Source: ABdhPJzHimFb00Y7Orq36CTFXVS1fSIfuw3F4JW74f3iWd9SnOdtcFrHZ9RqKvn0Noi6HtP/hoKZB57ebgSYiq0BlHM= X-Received: by 2002:a50:cd19:: with SMTP id z25mr1583093edi.122.1614895873968; Thu, 04 Mar 2021 14:11:13 -0800 (PST) MIME-Version: 1.0 References: <2dcc41aa-6518-baf1-5548-de0c41e0a8f3@allenjb.me.uk> <8e32e4bb-2a0b-8607-c541-ccf2c5ba362a@gmx.de> In-Reply-To: <8e32e4bb-2a0b-8607-c541-ccf2c5ba362a@gmx.de> Date: Thu, 4 Mar 2021 22:11:03 +0000 Message-ID: To: "Christoph M. Becker" Cc: AllenJB , PHP internals Content-Type: multipart/alternative; boundary="000000000000eace9505bcbd3e3f" Subject: Re: [PHP-DEV] [RFC] Extend error control operator to suppress exceptions From: george.banyard@gmail.com ("G. P. B.") --000000000000eace9505bcbd3e3f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 4 Mar 2021 at 21:53, Christoph M. Becker wrote: > On 04.03.2021 at 18:46, G. P. B. wrote: > > > On Thu, 4 Mar 2021 at 16:06, AllenJB wrote: > > > >> On a related note I dislike "documentation burden" as an argument > >> against improvements. I obviously understand "open source, volunteers, > >> translations, etc" but I've heard this a few times now as an argument > >> against fixing various issues (another example is that many functions = in > >> the manual document that they can return false, but there's absolutely > >> no explanation as to when this can occur except a single paragraph tha= t > >> lives on its own page that nobody is ever likely to find if they don't > >> already know it exists and you can't tell which functions it actually > >> applies to even if you do). Obviously the project doesn't, but if you > >> followed this for everything (to the extreme), you'd never introduce a= ny > >> new functionality because it would mean adding more documentation page= s. > >> If this is an issue, does the project need to consider if there are > >> better ways to handle documentation? > >> > > > > The matter of fact is that at this time there is mainly 1 person which > > solely > > works on the documentation, and that is Christoph M. Becker (aka cmb) > > with some occasional contribution from other individuals (me included) > > even with an issue tracker we are far from having all the changes for > PHP 8 > > documented, and even some PHP 7 behaviour is not documented. > > So documentation burden is a thing, should it prevent feature additions > to > > the langage? Obviously not, and we mostly deal with this "just" fine as > for > > the docs of the major PHP 8 features were written by their respective R= FC > > authors. > > > > A big reason why there was no documentation for false return in the > > signature is that until recently we did *not* have the capability to > display > > union types via the Doc render (PhD), this is now being corrected but i= s > > a tedious job of syncing the docs from the officials stubs to also sync > > named arguments. > > Allen's point is about the undocumented return values when calling > functions with unexpected parameter types (e.g. calling strlen() on an > object). There has been quite some discussion about this over the > years, mostly on the docs mailing list, and I still don't think this > should be documented for each function individually, because it is by > definition *undefined* behavior. If it was defined behavior, we could > not have elevated this to TypeErrors in PHP 8.0 due to the massive BC > break. The fact that this documentation would take years (assuming the > current bandwidth) is secondary. > Ah right, yeah I don't think those should be documented as it is UB, and iirc it usually throws an E_WARNING with a null return that's why I got confused by the usage of "false return", apologies. > Regarding syncing the docs form the official stubs: M=C3=A1t=C3=A9 did a = great job > of semi-automating this, so it isn't *that* much work anymore, but in my > opinion it is important to also keep the documentation correct for PHP > 7, and this requires a lot of manual review, and not rarely looking up > the actual behavior from the implementation =E2=80=93 that is quite some = work, > and the reviewer's constant reminder how incomplete and out-dated large > parts of the manual actually are. > > -- > Christoph M. Becker > Yes agreed, and I know Mat=C3=A9 and you have been working on this a lot, keeping up the French translation up to date with those changes is challenging at times because it's not just the function signature change but there are various amendments to the documentation as a whole. Yesterday I worked on updating the OpenSSL docs and it took me about 3h30 to perform the syncing process. George P. Banyard --000000000000eace9505bcbd3e3f--