Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126947 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 799071A00BC for ; Tue, 25 Mar 2025 23:06:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742943820; bh=PMaTbj7zx76C4BIJPHYUkq5MX6KZVJMsDDPDtxtgjGU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RfBHh7Lk9MuIqllyu46aHJxU9dEyYDyaWV4UCvNrqwbu+jLqgNDr4Cslb7AIdXzTW 1UxpM/M9Q7GFg6171Pe0UD5HjQ3vrh4eEN4ukTImvLDlU9slXV83OQ1jWDi8p5dw9y EmQqSdL9ldyXNoQafXZkFByjOjhdndO9lLWQ2ybJTH+7y1GAbSK029iqUfdJdzi+A/ 3zErT0InIFJ/+7epDY9iEPQoBt+lDFQDE/6M09oTN9PxByrH9ADTVUeYJONkIXnnHp JP1YxzIzDtfBB+hE2KwzQAmVpX/lJCbsoWF+YT/OcjvdC0pMUzR/FaRr0ASIZvoToA qbef4kjXqPCIg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C601718055C for ; Tue, 25 Mar 2025 23:03:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,HTML_MESSAGE, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mx1.dfw.automattic.com (mx1.dfw.automattic.com [192.0.84.151]) (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 ; Tue, 25 Mar 2025 23:03:37 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by mx1.dfw.automattic.com (Postfix) with ESMTP id 0F96B3C0057 for ; Tue, 25 Mar 2025 23:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; h=content-type:content-type:x-mailer:mime-version:references :in-reply-to:message-id:subject:subject:from:from:date:date; s= automattic1; t=1742943965; bh=PMaTbj7zx76C4BIJPHYUkq5MX6KZVJMsDD PDtxtgjGU=; b=CufIgwtnBk1XpDJk/4FzUzUNZuW6JTyrNRlzn+fLYx3QZWqd4G 0EUWGZuoJiueRuyKBX4LXwj/pdqimibIAwGXdaDRy1hJtc/Sz8IgITdonMoclfcM xj9MWhNSpJ4Jm4vPxeksU9Wdw0YNoX+iSsArx1rJpAClPJeZc04AQXyCmChnsquV KqGJkkRKqiS5HUPw5E9HjnC1F8+nWcccJ4kxmziKcxTXcTCM1lVVEC2kaiL10jsY bC6GqXZWX0AfeGIf1aQjA5z4spv97tARK0b5y+8aFlzu+T6pja17wNUlyn2txKRl SArGNiMh9ZLIRN7X7oHfGQUnz1H2oYEdD7Lw== X-Virus-Scanned: Debian amavisd-new at wordpress.com Received: from mx1.dfw.automattic.com ([127.0.0.1]) by localhost (mx1.dfw.automattic.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HUM5Of4dcpFo for ; Tue, 25 Mar 2025 23:06:05 +0000 (UTC) Received: from smtp-gw2.dfw.automattic.com (smtp-gw2.dfw.automattic.com [192.0.95.72]) (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 mx1.dfw.automattic.com (Postfix) with ESMTPS id B1BBB3C0146 for ; Tue, 25 Mar 2025 23:06:05 +0000 (UTC) Authentication-Results: mail.automattic.com; dkim=pass (2048-bit key; unprotected) header.d=automattic.com header.i=@automattic.com header.b="j3GqQaYs"; dkim-atps=neutral Received: from smtp-gw2.dfw.automattic.com (localhost.localdomain [127.0.0.1]) (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 smtp-gw2.dfw.automattic.com (Postfix) with ESMTPS id A2C90A036D for ; Tue, 25 Mar 2025 23:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=automattic.com; s=automattic1; t=1742943965; bh=PMaTbj7zx76C4BIJPHYUkq5MX6KZVJMsDDPDtxtgjGU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=j3GqQaYsK1CadBhwKHkKv9MxEFcME44OXGsijzFR822y7nbwZBnieoBCskIrpxgo0 JRKxT5/Gfg22n1+x6he8fKXelFgoF7+5WQnmtbv9EbM4XXSTE8NnTxlEDX60qG24PB QBikD0YwJO/kXBDB5vucR28uT+PRwqotD/riM1GjHXJ2ZgXgU1A/khSea6G1oWhXYD 52lfo1/02nc4d/n0sBkULV2slVtWOAtGZ9oWjpSy9wR98xrbRmYmbkkRvdio5kz6np nMOyqeBwZX740CIq3YUSvyAM4dnBKITopHlmkC1bq96YOE7uPxrfQG5eeKJQlzuVNa Hyt945OgYl0XQ== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-gw2.dfw.automattic.com (Postfix) with ESMTPS id 9E35EA0350 for ; Tue, 25 Mar 2025 23:06:05 +0000 (UTC) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2254bdd4982so155134475ad.1 for ; Tue, 25 Mar 2025 16:06:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742943965; x=1743548765; h=mime-version:references:in-reply-to:message-id:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=acB4zWCRJSCTILAQjfF657iFV66ygp30Z3tckwDHPDQ=; b=KoxMVx1YfoBtc+tUypKayZsLcMRFVV+sz9WPjP8k2RR9LS/dOF+NIsDS3mGCt8rA1R KPuZmmw8FWEOACnqYb6iUxehSmlFYYvVQ2s3HC+UyJpMdA40f2nNOREDqMnV9wuRDk2e UYVfM32g6NcYi3jxjGCez1yvOcxxkeCi4ZW+ejMkPkbivLGYwngdHLoYXleqR9Zh9efu ayL1C9ILjaQbAywKfDEhXUHJlOvZy68hm2MR5xjodRZ7yYVaSxm+YSyO23abWe0IduF8 qw1sDwp8bsWA6N4ZFrUxz7RkErp9/RAzpg3p8WXrQLEinxheLH/5NKOPVStYV9eaaaQg NS7A== X-Gm-Message-State: AOJu0YyReYanmKFBIxr9lQtRPkNoWN2CMr7wyGViXXBsp0RklVK9e1ta mqEFobKNfhCPLOFZyIzNYQHf6dRvDM9pyojt/v9Y9Wxc1MPH+CBBsnf0zAtjtDoXBd/MeLMJPRp rKinee0xfPStOA3QXRjqZVGJ8yYOoaG0pN7RAwN8MRCs3e3Ob+kz6JbIAV+XV46w= X-Gm-Gg: ASbGncv49YrYx5MMipO+4z1IbiL4ZQ1nwU2viKLhHrcqCFOZ8cKJFjbedkO6K0Idv+q iG5jryxuroVTDzAJN59ezsK2sOz9y/1cyNyeyU8HArO8NbsTfD7B8jUyiIZ4gN8Y9A/E2H0840w 11g8EH0L25wh2JFgG5mjUiwjp+3e6GDekYMgEpH3aGweaGhzPweCnbjY9cYhpGJe54M9RqY7ZZz qqvoDXkb0Ax5D3YJ0oyhHPh+zFGw3ZJcfInzAmZD61HJf5iUj3dWYmrXHoFjVTor8ogCALmnvT7 F0gV/iym9KrRCRtBxTnWFwfrGK/Ea3TegUfirCHhkgvgzWykdyXjAlpFBkc= X-Received: by 2002:a17:903:8cd:b0:21f:35fd:1b7b with SMTP id d9443c01a7336-22780e1a303mr308729745ad.50.1742943964526; Tue, 25 Mar 2025 16:06:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHv91aR8MLPCS0ozGkKhbz0Oxp29g1p/Ow9PDMYcCtkNWT8JyPIXCvMyllTj7HZcuUQ7rLXQ== X-Received: by 2002:a17:903:8cd:b0:21f:35fd:1b7b with SMTP id d9443c01a7336-22780e1a303mr308729325ad.50.1742943963984; Tue, 25 Mar 2025 16:06:03 -0700 (PDT) Received: from [169.254.128.61] ([2600:381:bd29:da1e:7dc1:9997:c254:57f8]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22780f45029sm97049335ad.53.2025.03.25.16.06.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2025 16:06:03 -0700 (PDT) Date: Tue, 25 Mar 2025 16:06:03 -0700 (PDT) X-Google-Original-Date: 25 Mar 2025 16:06:00 -0700 X-Google-Original-From: Dennis Snell To: =?UTF-8?Q?M=C3=A1t=C3=A9_Kocsis?= Cc: Internals Subject: Re: [PHP-DEV] [RFC] [Discussion] Add WHATWG compliant URL parsing API Message-ID: In-Reply-To: References: <1BCB4144-231D-45EA-A914-98EE8F0F503A@automattic.com> <8E614C9C-BA85-45D8-9A4E-A30D69981C5D@automattic.com> <044E7A8E-B79D-44DB-B572-102A80CDFC3C@automattic.com> Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-Mailer: Unibox (443:24.3.0) Content-Type: multipart/alternative; boundary="=_64F249A4-8E09-4112-8058-911B957A49B8" From: dennis.snell@automattic.com (Dennis Snell) --=_64F249A4-8E09-4112-8058-911B957A49B8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On Mar 25, 2025, at 3:23 PM, M=C3=A1t=C3=A9 Kocsis wrote: >=20 >=20 > Hi Dennis, >=20 >=20 >> I am myself also a bit lost on the countless names that I tried out in t= he implementation, but I think I had toHumanFriendlyString() and toDisplayF= riendlyString() methods at some point. These then ended up being toString()= and toDisplayString() after some iterations. I would be ok with renaming g= etHost() and toString() so=C2=A0that their names suggest they don't use IDN= A,=C2=A0but I'd clearly need a good enough=C2=A0suggestion, since neither "= MachineFriendly", nor "NonDisplayable" sound like the best alternative for = me. I was also considering using getIdnaHost() and toIdnaString(), but I re= alized these are the worst looking names I have come up with so=C2=A0far. >>=20 >>=20 >>=20 >=20 > What about getPunycodeHost(), getUnicodeHost(), toPunycodeString(), toUni= codeString()? Or getAsciiHost() and toAsciiString() may also work. These ar= e the best names I managed to come up with so far. >=20 >=20 > In the=C2=A0meantime, I renamed RFC 3986's toString() methods too accordi= ng to another suggestion: > - toString() became toRawString() > - toNormalizedString() became toString() >=20 >=20 > The new names mirror exactly what their getter counterparts do. >=20 >=20 > M=C3=A1t=C3=A9=C2=A0 >=20 >=20 Hi M=C3=A1t=C3=A9, I=E2=80=99ve been pondering these names for the past week and a half and I = couldn=E2=80=99t think of anything, but at first glance I like getUnicodeHo= st() and getAsciiHost(). These communicate=C2=A0a little bit the nuance, th= ough they aren=E2=80=99t totally in-your-face (which in this case I wish th= ere were a more obvious pair that is). Other pairs I was toying with but don=E2=80=99t like are: =C2=A0- getPrintHost() / getDataHost() =C2=A0- getDisplayHost() / getAPIHost() =C2=A0- getDisplayHost() / getEncodedHost() =C2=A0- getDisplayHost() / getEscapedHost() (the same pairs would apply to the other methods, like toDisplayString() / = toEncodedString()) This seems to be taking a lot of effort and time, but thank you still for e= ngaging with it =E2=80=94 naming is hard! But it=E2=80=99s worth it. --=_64F249A4-8E09-4112-8058-911B957A49B8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Mar 25, 2025, at 3:23 PM, M=C3=A1t=C3=A9 Kocsis <kocsismate90@gm= ail.com> wrote:

Hi Dennis,

I am myself also a bit lost on the countless names that I tried out in t= he implementation, but I think I had toHumanFriendlyString() and toDisplayF= riendlyString() methods at some point. These then ended up being toString()= and toDisplayString() after some iterations. I would be ok with renaming g= etHost() and toString() so=C2=A0that their names suggest they don't use IDN= A,=C2=A0but I'd clearly need a good enough=C2=A0suggestion, since neither "= MachineFriendly", nor "NonDisplayable" sound like the best alternative for = me. I was also considering using getIdnaHost() and toIdnaString(), but I re= alized these are the worst looking names I have come up with so=C2=A0far.

What about getPunycodeHost(), getUnicodeHost(), toPunycodeString(), to= UnicodeString()? Or getAsciiHost() and toAsciiString() may also work. These= are the best names I managed to come up with so far.

In the=C2=A0meantime, I renamed RFC 3986's toString() methods too acco= rding to another suggestion:
- toString() became toRawString()
- toNormalizedString() became toString()

The new names mirror exactly what their getter counterparts do.

M=C3=A1t=C3=A9=C2=A0

Hi M=C3=A1t=C3=A9,

I=E2=80=99ve been pondering these names for the past week and a half a= nd I couldn=E2=80=99t think of anything, but at first glance I like getUnic= odeHost() and getAsciiHost(). These communicate=C2=A0a little bit th= e nuance, though they aren=E2=80=99t totally in-your-face (which in this ca= se I wish there were a more obvious pair that is).

Other pairs I was toying with but don=E2=80=99t like are:
=C2=A0- getPrintHost() / getDataHost()
=C2=A0- getDisplayHost() / getAPIHost()
=C2=A0- getDisplayHost() / getEncodedHost()
=C2=A0- getDisplayHost() / getEscapedHost()

(the same pairs would apply to the other methods, like toDisplayString= () / toEncodedString())

This seems to be taking a lot of effort and time, but thank you still = for engaging with it =E2=80=94 naming is hard! But it=E2=80=99s worth it. --=_64F249A4-8E09-4112-8058-911B957A49B8--