Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122065 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 38281 invoked from network); 29 Dec 2023 23:41:25 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 29 Dec 2023 23:41:25 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C519618004D for ; Fri, 29 Dec 2023 15:41:52 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 29 Dec 2023 15:41:52 -0800 (PST) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-40d76923ec4so9500825e9.3 for ; Fri, 29 Dec 2023 15:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703893283; x=1704498083; darn=lists.php.net; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=3XT1fTDYZ06cl8RzHDJpAu2uoQbQ1cHDaT+hEdz1tsQ=; b=aHWqZ4AMylbecbzjKNtVGQVAhRoQ7oktBoUHzuqD2YIqMqpRnPD3tdAOnVzUT2GHC7 ZLuDHD7OLUL02CM/YObHfckKBrfWjbH5/ICFkiCXHYEacdHW0bXHW4GtsZMbGUQfPBup X+2UsjvJ31VYMnVLtowIsZ1Igajt7cTU8X7HcXuUM53C2H5ewWlxX8txu20Ass4yRMOd inX5xtxE4S+q960jtKih99XaeIiaRTgfB6ZUTuCuJhwa8YBIPaJh5uG8+CHOyKGRwgXR SwcKTaBuRaKBNtzGELRMvV3ROsKeakYi38PP/hp0eBamQEPulSqEpEGXQ/v9wur2phXY 1kcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703893283; x=1704498083; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3XT1fTDYZ06cl8RzHDJpAu2uoQbQ1cHDaT+hEdz1tsQ=; b=B1AxfzfnFUtobYMv1uEUeBoXnbzG5Kfk/MvFM1RNoAX8aR67Hj5FF2iJAC2kQ54R8k 9DMdJRkKvSaoCZ/RiaTxPBxkMuppmgmaHLpRyffrzEE5AZQkgb9/6uly8CHaZ4EsRxMW bUmAdu7z/znXAPmGmTv39qX7BeK+j9copTEslsl5srV5Z3AdbKHg3POQvRvrmwf4ERJU +H3bh0JuhQ/X9Y5w6E68xuNGZsoMDN0mlalzrQpeNHIz8NDZWcOxrEQtwOcb3z9tiK6U xxTvF2ap8diSYA+evtRTf6xs9SRbuqUTHA9Lc1p+oSXzpYGoJIokXw3a8tjdCs/SrlXy 22uQ== X-Gm-Message-State: AOJu0Yw6CDD4S2yDbzvYh2jpUnFdihcAvZiTzfCN2YVFqWlruYgZSpJ6 5Lp/JPHjbRlNymZ8IBfiJ2IstwFgBmU= X-Google-Smtp-Source: AGHT+IGuvO3qXT+7WqBt1/l/YWc9ktoyDFJAdKG0ohgi4ItSEgxFH4smoVUvFvDsRtdMLalfM9Xlfg== X-Received: by 2002:a05:600c:2248:b0:40d:3768:e78 with SMTP id a8-20020a05600c224800b0040d37680e78mr6787632wmm.185.1703893283198; Fri, 29 Dec 2023 15:41:23 -0800 (PST) Received: from ?IPV6:2a02:1811:cc83:ee30:8e76:2662:766d:ebaa? (ptr-dtfv04vjm7u23t23d7u.18120a2.ip6.access.telenet.be. [2a02:1811:cc83:ee30:8e76:2662:766d:ebaa]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c468f00b0040d4e1393dcsm24915886wmo.20.2023.12.29.15.41.22 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Dec 2023 15:41:22 -0800 (PST) Message-ID: Date: Sat, 30 Dec 2023 00:41:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: internals@lists.php.net References: <756bcf2b-f98d-4203-9004-1cbfd402337a@gmail.com> <8632ff2a-0169-4cbb-b5d8-3bafb841f1ee@app.fastmail.com> In-Reply-To: <8632ff2a-0169-4cbb-b5d8-3bafb841f1ee@app.fastmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Pre-RFC: Fixing spec bugs in the DOM extension From: dossche.niels@gmail.com (Niels Dossche) Hi Larry On 29/12/2023 17:58, Larry Garfield wrote: > > I am also on team "yes, let's just do it right." If that means the new classes are only 99% drop ins for the old ones, I'm OK with that. People can switch over when they're ready and do all the clean up at once. > They are indeed going to be very similar, but at least having better return types would be good to give one particular example. e.g. we currently have a lot of methods that can return an object or false. The current living DOM spec always throws exceptions instead of returning false on error which is a much cleaner API. Furthermore, we have the DOMNameSpaceNode that can be returned by some methods and has been a point of confusion for static analysis tools (I did a PR on psalm to fix one of those issues). That node type won't be special cased in the new classes API so the (inconsistent use of the) union of DOMAttr|DOMNameSpaceNode will go away. > I'm not sure about making things final. I don't know the domain space well enough to have a strong opinion at the moment, but my main concern would be ensuring that it's still extensible in reasonable ways. Eg, if I wanted to add a Web Component element to a page, I want to do that without fugly workarounds. I don't have a strong opinion at this point on what the right way to do that is. > Yeah indeed. > --Larry Garfield > Kind regards Niels