Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126893 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 3A8971A00BC for ; Fri, 21 Mar 2025 11:36:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742556813; bh=GFTGIhq1RfidehNl+6UHExMcFTbGkWf4bYX3zVwUwdI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nDIcXQPFtxt9z9/GpbeuZytcQd81zKQq8gl6dIhRVrgrzxCeyesbJNizib5rPOMJg Arv/AIPwVhMFqJSKTpWSSWeykQ2T3coYBXlNLm4QV+RHamcqL9VakOGWYx1LP0kSjy 1wKy0Iprcid1CMlRVK0BCiy6rZ15aM/RjAC9e+vT8Xfm38KC0mJOIEgugOn0ZIDHla iCrKS1CWF+MGL4O+haWoTKd2VFGo+0iCwh8+2NtuLd9XE+reyFEnlJHEsvVmgA3aN6 csT2GGl6iwOsSnt3TFx0th811Qq+B7uDArgb5HSmhLw1WS9tfdpA8gigsvjRKn74oc 1EsM73kklucdA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A83FE180032 for ; Fri, 21 Mar 2025 11:33:32 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.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 php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Mar 2025 11:33:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1742556961; bh=SmzoJwDAQGncjVLd4HMZUVurY4N0ToHGxWRNZbnhuAQ=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=Io8ZSq8rnIu58meH7+MQ9NXVhkgn9knMRanm5vW4Qq2jJLikIIYCUPdvwYFfDo8EE D1RalZi0xEEG9hwoKJBPLEakmmkZaVMo2vbrSsiOTOrBRomMm2HtmV4SfavJOw9QNf urdHUKkP5ufXGHW8hfcruZg2zSzvj5BP5SIRTbBsE290w06don0b4U77DoZ72s2mIN Dz3xR5VUI+hFHnb6ydt9z73wuoJTlZrMHCDBa2wzej1ylazvcFGBSEhD7Fsm8TZo7i mi/Jk9ut2rrgoJR0YdNZqRlkylVnvY0qCZn60YVH6dqeBAZ3O5n67IwDjBxvXjP9Sg MvpYRWO6bGztg== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 21 Mar 2025 12:36:01 +0100 To: Juris Evertovskis Cc: Daniel Scherzer , internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] [Discussion] Never parameters In-Reply-To: <17f97184100adbe822868f23251659a4@glaive.pro> References: <17f97184100adbe822868f23251659a4@glaive.pro> Message-ID: <739c7d158f17a27bbe5beebf36682bc7@bastelstu.be> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-03-20 21:04, schrieb Juris Evertovskis: > I'm not opposed to having a bottom type, but the `try`/`tryFrom` issue > feels caused by another shortcoming. > > In my view`from` and `tryFrom` are factory methods that construct an > instance by being called on the class itself. As such they should not > be subject to LSP at all, just like __construct is not. Indeed. I said the same in the PR on GitHub: https://github.com/php/php-src/pull/18016#issuecomment-2715887293. Static methods within an interface are not useful. The `never` type would however still be useful for non-static methods in interfaces and to round off the type hierarchy. Best regards Tim Düsterhus