Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122694 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 C62141AD8F6 for ; Tue, 19 Mar 2024 18:12:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1710871952; bh=Sez2VopzCdJgAyhA+GxTBCOZcTamsyVqOxUD+1N5RLg=; h=References:In-Reply-To:From:Date:Subject:To:From; b=MUQOUWqEHQvT2DNhlwflHc8w1ZcEspA+MSv57rly65ILsKN70t1rfZVMZlpUMmNqZ 0+RR3pB1Vqf3Vv5CjxRJ7PEfkSPkMaNI+8YtvNOFTua++LUEXywlxFbURDcVXOPbSO 4vhDrM4nlHkflMWr9lDnUZkggcISsR6hd5xAUfyMmfL8rIqKcsIxywowYmFvM42Re9 QaavVAstlTPIzl77pmdXpGakdEuztJWN68OKIuVaSwetCOQwSWN5DJ3m7dUek7hQ1I t/6FeFe6waotM/nQAMGce/rZqKKb/a7zpXIwdnW8YO12xpRXDHIwxAOHSQ9yMBlEKQ bVG6XQfdVnBKA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 1B23F180080 for ; Tue, 19 Mar 2024 18:12: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=-0.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, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (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, 19 Mar 2024 18:12:31 +0000 (UTC) Received: by mail-qv1-f50.google.com with SMTP id 6a1803df08f44-690de619293so35395286d6.0 for ; Tue, 19 Mar 2024 11:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710871930; x=1711476730; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Sez2VopzCdJgAyhA+GxTBCOZcTamsyVqOxUD+1N5RLg=; b=dOp9FIGmdhICBb1oaNqrXKGhsgXfQev0BR5QZViqa9zfxM1Q8BaAUkg0++odgqxfFF WLZrcE91IDxn6sQfsauV1s+VQ0bih8cogCbFNUzZpbSs0dzE8xw9ig5CYAyNoOCvePGB KJ+ywGCbJfbPowVdOGb29UEc0wPuZoiaaPreMjcO2Yek5refQQReFBLO8Dt5DTn3NiCq CbFFcvYc8VOJa0KOE0685KQjOGY+Upnj4mVM54g52MTGbXTfBYDTyAaJy7S1DoZiAcdb bYxnDV0ugEpoNEoS5JQnOiTgY+pE7c0z+aJ1rLZV4QPkRJseeqRza6Y0wai9MJoYUFdX 0R8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710871930; x=1711476730; h=content-transfer-encoding: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=Sez2VopzCdJgAyhA+GxTBCOZcTamsyVqOxUD+1N5RLg=; b=crgV4JgtxmAqPGI0ffmvdfZnmL4jXd4rtZlgYXHx+guXJhqdwmcaoHJQgz7aLSCarO j7sS9Za9zefgitwXOqtSsJk5iugq/bxt7eodXQ4gT32DzZlYfF/EjCwovhmLZ3iUElIB j7z1G773DuRmp2GDbfJkj4jcAG0tbJrUr8wFmXOQmyqrrEqpPjtq274FkoOWbK5XrIi4 d95bfBe4tO5RhlGimMQ7CT1hlasWCHu973//v+rzbhdZmqfhfdLv3bwTk4rbw6msQ6VD oQvsl3MCX5BPOYYfDUsgAI6ptBQyhQCVPtUD1vx0OsObqw+jU5sDj9lxJCrNkqva/C+a 5tjA== X-Gm-Message-State: AOJu0YxPrr3ndbo6pMxDDGrtlc2b6OrkoNEYNZwE1o9H/XGTtGR1pg04 Qq9odtAL9KzWYleq6JLrNhoL5pEDVNNeWXjwMBFHx1CeY0KwH1WpF7M8V1vCeNFdEPzFi/O1D4s Fn6Xk7Q7AuxBExW/pWBTEJVPXw/CSsEZ1L0k/JRRI X-Google-Smtp-Source: AGHT+IFHD2aIQRzzHdSiPXVUhWGO5p6Qnj8SuPna8Dt8T0J7nA2up2cX0CjBPbNbH05W7vCeH+8WT0RrGe9rnVElPxc= X-Received: by 2002:ad4:5187:0:b0:696:2023:e2f7 with SMTP id b7-20020ad45187000000b006962023e2f7mr5832980qvp.10.1710871930164; Tue, 19 Mar 2024 11:12:10 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 19 Mar 2024 19:11:59 +0100 Message-ID: Subject: Re: [PHP-DEV] Proposal: AS assertions To: internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Marco On Tue, Mar 19, 2024 at 7:04=E2=80=AFPM Marco Aur=C3=A9lio Deleu wrote: > > > On 19 Mar 2024, at 14:51, Ilija Tovilo wrote: > > > > =EF=BB=BFHi Robert > > > >> On Tue, Mar 19, 2024 at 5:24=E2=80=AFPM Robert Landers wrote: > >> > > See https://wiki.php.net/rfc/pattern-matching#throwing_alternative. I > > believe this idea would combine nicely with pattern matching. It has > > many more uses there than just simple class type matching, and could > > even be used for things like destructuring. > > That looks like a PHP dream. Has there been any work regarding that? https://github.com/iluuu1994/php-src/pull/102/files The implementation is mostly complete (it might slightly diverge from the current specification. Bob has called for a different implementation approach that might be more complex but potentially easier to optimize, I'll have to play around with it. There are also still some design decisions that we aren't completely sure about. For now, Larry and I are just trying to get property hooks over the finish line. Ilija