Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120646 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73473 invoked from network); 20 Jun 2023 13:30:02 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jun 2023 13:30:02 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 245B01804D7 for ; Tue, 20 Jun 2023 06:30:02 -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=-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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 20 Jun 2023 06:30:01 -0700 (PDT) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-30e3caa6aa7so4708405f8f.1 for ; Tue, 20 Jun 2023 06:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687267800; x=1689859800; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FEz2HFtAUqzBx5D3d2VrVTQsQI6Gj8PspKT+xa14tyw=; b=KG9rkpPweQhhV+nlXCGYafuX+ypo+gahz3wzawnEblJ1IwJgKRDlgYM9+dfqId0+w8 9gvuFESnuBeUQ1+DGCMYs8lIdrWmfETKcWdK8ROe/4dz5+Of1ATePR9FnNiYOwg09o27 DYFNor/8fpAAcaM/N/101CLckEraYu+Gs5spSxw5p+5EXbwxotO2cwCaOSKOKLoud9cZ xxSu7r2/bda4nzJasgFdTAQXuUb9suAilrHkbQiarI55+nK9+pGbFYXohQtyN4K8l3UH 1ZM+G+3DAFyM1vY06SSgw+jGV7wZiXxRyNP6eTEOeawqWKVx3lHd01OGwUYY/qpXb41c jEBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687267800; x=1689859800; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FEz2HFtAUqzBx5D3d2VrVTQsQI6Gj8PspKT+xa14tyw=; b=Civ3hb+asYizR5Zx1+/P8CWmTBc78IqTpEYGdIt/2XTBZXUcXkVGYHaGkhHxzBul8N bLacGDu4NUL24czJSWuXwRBV4LdyrzCW0Wh/JnjuWBIJJDrHtjd+ECN3igcr1xVWJbn8 zP+TS5MF6oWafxJzR634yARA99F6myKEAVuUf8O9Vth5b5L8q3e33h2zQkpJKjmpxuqc TK6wWrPZRXnGw+sB4V/tHnUv45P+SErLOp4DtIc4DSQm5k+ISFrkjXmUIx9wl3M1MtG4 tPxLssAVLCC7+AL2PDdJ0C5irOYGtkrf8bu80jX4wkXrtS7PrKE3HdpWGoT2gnMADuy2 ZscQ== X-Gm-Message-State: AC+VfDz5Rqk9+tmUUCAJ/Yyoz5WbAuf0kVOoqMvv1O/gnxHyEbMgfE+p JHq7IsR5MjKqv/kzE+6KpcYw3xJQLk29I0BezSQ= X-Google-Smtp-Source: ACHHUZ6Upj0ulNrmX603lC6lORbwDRJIrwU4Y3OA7HEoYgzPUNXlo5DgvaBZkHuGzTmoR7N9igMM+QcIe+KJtpsmh2c= X-Received: by 2002:a5d:67cd:0:b0:311:18d2:ff5c with SMTP id n13-20020a5d67cd000000b0031118d2ff5cmr10704495wrw.27.1687267800232; Tue, 20 Jun 2023 06:30:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 20 Jun 2023 14:29:48 +0100 Message-ID: To: David Gebler Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000dfbad305fe8fa5ab" Subject: Re: [PHP-DEV] [RFC] Interface Default Methods From: rowan.collins@gmail.com (Rowan Tommins) --000000000000dfbad305fe8fa5ab Content-Type: text/plain; charset="UTF-8" On Tue, 20 Jun 2023 at 13:29, David Gebler wrote: > Yeah I suppose I'm just saying "Interface default methods" can be > interpreted a few different ways and there's key differences between > Java-style, versus syntax sugar for mixing an interface and a trait in to > one unit, versus a user can effectively extend multiple abstract classes > but with interface keyword. > As far as I can see, "Java-style", and " effectively extend multiple abstract classes" are actually the same thing, and per my e-mail that's what I think the RFC is proposing. The "mixing an interface and a trait" interpretation would not lead to the method resolution shown. Additional constraints in Java around calling *public* methods outside the interface are just a consequence of how it performs static analysis and compilation on *all* classes, not something specific to interface default methods. The lack of those constraints in PHP is likewise not something that's specific to this proposal, the language *always* allows you to attempt any method call on any object, including $this, even if a type checker would say the call is invalid. Regards, -- Rowan Tommins [IMSoP] --000000000000dfbad305fe8fa5ab--