Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114138 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 33860 invoked from network); 24 Apr 2021 19:51:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 24 Apr 2021 19:51:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3F3881804BD for ; Sat, 24 Apr 2021 12:55:20 -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, 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-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (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 ; Sat, 24 Apr 2021 12:55:19 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id m7so48616161ljp.10 for ; Sat, 24 Apr 2021 12:55:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1F9Nf+0R5StwNPbuzREtCZ7GUJBuuKCs+Y7um79L0bY=; b=T/Jt3Kv6YvFKvRlQ0C9dGv9Go6jhX0BhqFjga+meCOTnIvQx94kQTduCmA/VAQl3Zo tAG/e2uv3KphZquWX0gIlX6DFxXJ8NbReKYu/ku3CkJKYnCJ4s+kP0o81xhVairRUJAi Jzi8/WlsFGzPwIUykaS8IfsEJdaInki2RQQmtxIuYUROh7wrjGcnq69CTcJ2SI+MqxD4 C46H4ePMfAUOBGWmiUQoVNzXkPOY8ayOI/EfpSxTxaaCpFmS3BrVpBh7IlDTrKOzfXHG 3a5evmsSdbS+wlWnNdzkEulpGPqI1w/Q4wEh2lJ/5qUwd+pTddBGuAK20vmqXi0gq/q6 +/rQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1F9Nf+0R5StwNPbuzREtCZ7GUJBuuKCs+Y7um79L0bY=; b=jZrvdehyyYePDJ7drex5r3aqxsmq4/ZE7g4Z9XRqsph3Ja/Sh5ALHs7m7docDZOJ9Y Vq4c6eR3C67Hgmr1IPbdmnEkXkSNPAlxzj/G8/uxloPqUIlXRV7Hjx2yT7U5DkxN9dNe aeJqxBd8k4EbrlISlGnh3Hgb/vU7sic5a13s8NeC0PwC8CRKIEP3xS4fYyVJ7x7ykbfn VGnqLOXU+nopwTcgo/Uh06HKXjxjDzvUI2kAN2NvoQh+JjoMNabBc3pM3jXqMnmR55ie iJ804dEfvNGKL4XedOfpM8ZnstZ12dTRCKcjQNqTu7/227LWKt8gXSdiC1DVoiP9yKTg +iHQ== X-Gm-Message-State: AOAM530JlY2e5IMNFUd4793vCJjKutbH4RYKddpzxvVtUKETsWQOtbN+ baIkC/lBUkuLbzcD1mVjd/dnG+zN0NinrQYiygY= X-Google-Smtp-Source: ABdhPJzOFzyIBGWzPha4wcy71c+tSxxpnNS/ErmxXRZVuf90HBCwVdYn77GYD9SrT7owqNUfbHZ/sIlniZk7RIfrYbE= X-Received: by 2002:a2e:9114:: with SMTP id m20mr7178010ljg.196.1619294117356; Sat, 24 Apr 2021 12:55:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:4e13:0:0:0:0:0 with HTTP; Sat, 24 Apr 2021 12:55:16 -0700 (PDT) In-Reply-To: References: <5b9f1500-615a-48f1-815f-1d48b327ef90@processus.org> <179049b1475.11134368b213512.254739612773841999@void.tn> Date: Sat, 24 Apr 2021 21:55:16 +0200 Message-ID: To: Marco Pivetta Cc: Saif Eddin Gmati , Pierre , Saif Eddin Gmati , PHP Internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][Draft] Sealed Classes From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2021-04-24 21:51 GMT+02:00, Marco Pivetta : > On Sat, Apr 24, 2021, 21:44 Olle H=C3=A4rstedt w= rote: > >> 2021-04-24 17:59 GMT+02:00, Saif Eddin Gmati : >> >> Doesn't this violate the principle: It should be possible to add new >> >> features without touching old code? >> > >> > This depends on which syntax is picked, both `for` and attribute synta= x >> will >> > be completely BC. >> >> I'm not talking about BC, but the maintainability of the new feature >> itself. For the shape example, you'd need to edit the original file >> for each new shape you add, which is detrimental for maintainability >> and scalability. So what's a good use-case? >> > > The main use-case of sealed types is being able to declare total function= s > around them. What is "total function" in your discourse? :) Can you find a more concrete example? Preferably one that's relevant for web site/app development. Shapes is a bit too generic, I think. Olle