Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112215 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 45761 invoked from network); 9 Nov 2020 16:11:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Nov 2020 16:11:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 478731804F2 for ; Mon, 9 Nov 2020 07:33:18 -0800 (PST) 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_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 ; Mon, 9 Nov 2020 07:33:17 -0800 (PST) Received: by mail-oo1-f48.google.com with SMTP id t142so2287284oot.7 for ; Mon, 09 Nov 2020 07:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ivil7eplXOCi/+8BWeoTnQxNpJO24C31aGCF1Ghty7U=; b=qQ8P0oCzmzaxYjRNB48YHDZoA/7lIRSWeio1u7uGQpFShAR4JkUeYQeWeS7Wk2leke mn2kKgN4Eo11X0vcasJfpOBjyKogdsu/yuS3YQ7KMcGhHwhuzw8WQBshXoytYT8vcXxn eJNCPLZUMaptxy0N+cbtlKjYoywSDkEIEX/KfoYslf5Qa4KtEa00Bc/4I/sDYY0cJHOB 6GvqkKQVjURzTZbCw4DpHVbUoaphn/+eT9ix4jNejhMowyna8dmz5fP3A+hKI/vHukfZ a/28BUqxl/BCz8ngK54td47gq2g9d87BKik0GQCnh7CVzv7AuCbwy2HGDNrnUcRMT+Wj l+Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ivil7eplXOCi/+8BWeoTnQxNpJO24C31aGCF1Ghty7U=; b=OQslELJv2S7L8D6Wl+zsfZa5wD7s1cFdw+h0wnoz6Rtp0WHxFxrtZL+bovt+mMaqDK 2RHKiNkxcuGUpfh4cY35M09DtEz6GjU4O6ar5Vk4AiFl51TOA0cv7yqRKhPtjKFdKCbh C3b40z0ndMWkjWs4CAKW3UZrmzboSYTIBiM4GSj4KuAllzVc9MVpa2ZRLw8iaf9fkhf1 O6OcMNJk6ZhjqoHln6+e5UPXh9LXeE3xX0x6atze+eDq8Uvpr77wXvzQM5ekNN+4EJvX O4n+PBjsDAUtO/kBTNuw+P4JxspSIg0vvW2NGJxNXFf1GwuWRMD/L0jBBwczh/8WWzS6 +7oQ== X-Gm-Message-State: AOAM530zhvGdQsG7wLRcowi5zoH9r5t+QcMha3ODM/m15UqbLkJK+KlU g2F1021h7Qo/zRinhL4A6+AwHoLfGp4KR9/R/Rk= X-Google-Smtp-Source: ABdhPJyvb/gLj9WAil+qogdyeC9a012CS+rSE940IFqnQl2AoPNUm/dmGfPut6144GyXgNRwfVIj2KJxwDwNnGy7A3g= X-Received: by 2002:a4a:e1c6:: with SMTP id n6mr6026245oot.68.1604935994442; Mon, 09 Nov 2020 07:33:14 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 9 Nov 2020 16:33:03 +0100 Message-ID: To: Sara Golemon Cc: Eugene Sidelnyk , PHP Internals Content-Type: multipart/alternative; boundary="000000000000d6084c05b3ae475a" Subject: Re: [PHP-DEV] Alias for `int|float` From: enunomaduro@gmail.com (Nuno Maduro) --000000000000d6084c05b3ae475a Content-Type: text/plain; charset="UTF-8" Agree with what has been said. We probably should leave this "alias" discussion to a near future where people would be able to create their own types like so: ```php type Number = Foo|Bar; ``` - Nuno On Mon, 9 Nov 2020 at 16:25, Sara Golemon wrote: > On Sun, Nov 8, 2020 at 11:09 AM Eugene Sidelnyk > wrote: > > > What do you think about creating shorthand `number` for `int|float`? > > > > Others have pointed at a few reasons why not, but I'd like to add that if > we allow type aliasing, then projects can choose to define this or not. > I'd rather see the power (and tradeoffs) placed in the hands of script > developers. > > -Sara > --000000000000d6084c05b3ae475a--