Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:120097 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 75365 invoked from network); 21 Apr 2023 07:10:35 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Apr 2023 07:10:35 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A9B51180211 for ; Fri, 21 Apr 2023 00:10:34 -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, 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-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 21 Apr 2023 00:10:34 -0700 (PDT) Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-38dee9a7795so624505b6e.3 for ; Fri, 21 Apr 2023 00:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682061033; x=1684653033; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tIBvVKPk1NKaFahrHP6tFEi/+ScikM+7i2NvYcB/UTE=; b=m5vjeOiKE3ljabe3DJT10aoH5DjnExEgaMrwUzen2wVJWbQRG0pc92doKVxirZdeXg cXvxIZyOYIc0PJG7hrqV81PcuwSwExSnsZrWDznuWfjeRgonw47lDxm3JcGFXR8UFWd3 4JB0XC0o2qdtaV960ZadmDD3be1ZgPNAi5wbSMmbo7dvPqPO6xIrSPgPuEZ+h2UpFnrG PMED5PtfpzrgfeOjMHrohpHckyNc1zYEeuPPr6dY+WTWN8vn1qyTmgXsfSUzUWqeMLuK TS7S4Olf9l1SC35eC6jkpJXmLf2oVE7/4LzyBopcfmmejMKDEmHI9WfbACdgd5Y8RlSt r6tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682061033; x=1684653033; 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=tIBvVKPk1NKaFahrHP6tFEi/+ScikM+7i2NvYcB/UTE=; b=lfhnOqtbvW1PytumB2kmTKywCBPYaUlwqOCrtZsgVa1BsrmWGFzGs7zfJHvn586BfR 4xHkzNsfBMSpm6M0Ph809bJKrc/pbdpPBi//PDq1ZQkSSGwUwCBud55y/DwLEz7M3ftT xt0pInBa8pyRJ9wVJGvuEYPCUirZ3u31uzRV8zn4NoyC0nTEZ7YPNFE/2PKhQJDaeyEb ZS8BvA1SaTlpkuiYYwy6eTYCCJh1kOqut50F+tVTP1vTHkzSU+WDF3pdEFDkdlIAxoYj FJW9VCKFly4GIFan9gRbgLqWDH+nvrYJuDd5buxW7eundBY96Bb1vzJxGbZ75uBfJ/bf oS9g== X-Gm-Message-State: AAQBX9dyAWpIDkLQTePJZwJyNHmSuq1HcrARUyR7CqMA/vVTvGD9FAXL R7quUr6WviJf7Me6VPh+NkMhQJi4PFJjXP5ri4c= X-Google-Smtp-Source: AKy350ZIyAsGcsg3GL1QT81xteK33J5vXV3HV4BdSHcOg+OWHWCPN7JqAnH8GCXgNbSbPnd8bnpKVmEuINzyh3m9YEo= X-Received: by 2002:aca:bad7:0:b0:38e:62ee:ee96 with SMTP id k206-20020acabad7000000b0038e62eeee96mr2144744oif.58.1682061033122; Fri, 21 Apr 2023 00:10:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 21 Apr 2023 09:10:21 +0200 Message-ID: To: Deleu Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: Re: [PHP-DEV] Expansion of PHP Symbols? From: landers.robert@gmail.com (Robert Landers) Hey Deleu, I ended up on this list in the first place because I wanted to figure out how to implement type aliases. I can confidently say why no one wants to touch it with a ten-foot pole: implementing this will require refactoring the entire type system. There currently isn't a 'type table'; supporting type aliases will probably require one. I was able to hack something together that used the import statements as a way to work without that much changes (I never got autoloading to work, but I suspect that was my unfamiliarity with the code, not that it was impossible): use int|float as Number; at the top and it would work with fairly minimal changes to the engine. Anything more complex or different required a huge refactoring. However, from previous discussions, when that syntax was brought up, it was shot down. It appears that people want code-wide aliases, which goes back to refactoring (to the point of re-implementing an entire type system) and people can't agree that it's a good idea in the first place (i.e., what if you think int|float is Number, but some other library has only float aliased to Number?) and then that can be solved via imports ... but how does that work? Basically, since it requires reimplementing an entire type system, I think the maintainers (this is my impression, I'm not speaking for them) want to be 100% sure what the syntax will be, how it will work, and more importantly, agree as much as possible on that before ripping out the existing system and replacing it with something else. Anyway, that's my opinion on the matter, I'm sure others will have different opinions. :) Rob Landers Utrecht, Netherlands