Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107700 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41767 invoked from network); 25 Oct 2019 17:54:08 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 25 Oct 2019 17:54:08 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id A70FD2D1FD1 for ; Fri, 25 Oct 2019 08:40:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Virus: No Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Fri, 25 Oct 2019 08:40:47 -0700 (PDT) Received: by mail-pg1-x52c.google.com with SMTP id p1so1784548pgi.4 for ; Fri, 25 Oct 2019 08:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3VI9YkRnVFpVgHJlXkt893Skt8FCEY85E54N/diCM0s=; b=VpmRRtHWVCcQChLbu2Z9QSak0ErMwYMFDzScYRqcI262xNZLiSmZ0E3uUwzIY8td1Y aDgA8tkzbqZRbb41UlaOBeWAUhiXdAb5Z3WrOwxBi8/7rgWiVljpuwsUvw/NS08jh45w j/F7f8TMpeIFBFvhjGx8oP6/rzZqjFnMhsXysaHHt1MLYjhMivc4EOrvKQVfqRAKIw8z ioCUvCWfEknlxwPVGDz7BSsvvdkB9X9vMLWGOaoqwLZ+1qPkEIm2Cj89QdTv08vO4XET Q+kLsK68wFBlJ7FPUPdolyTUxLSH3tkUgQul2CGe9+mhHstpZDPhBAmD1XnVcftfzz1u JHpw== 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=3VI9YkRnVFpVgHJlXkt893Skt8FCEY85E54N/diCM0s=; b=uLANMsdjaOIe7qtQwr6sKvHY6tVfoK/vWRs3HqTrE7pCNIiO2WLq5jPt4uq4JMqJZK uiJcD/XdqaHJ+E7eISv2Ez3OVp4G8ck+ih5xLQAy8OrMdUkhrZRLlJOtxdLlM5ti3rWj QyqA8Rs4jNZWtXSnyK02w3JcRunpfb7kCZnWdy0toHLr7/FevJ3O74BAwOPtVrQgyoq1 /5Bjy8uTt1qmuly30qzUEu7ekane3CaePBYfgu1fb0wa1wT3ybh2HyN5WNMOOVuotl84 7LSvZBuLfZnu+z3wJPj7XIMgaB2KmGpzDXh8g6fEl4pEiYG6KAjaqxI+8IQE07B3cozb 6JTw== X-Gm-Message-State: APjAAAXHg5wSEwAcRhaqM8ipMVqxyIN/hIBYzirV///bnOoZeCD0NpQu jSjfEjVEDoeaHzSF7s+CMiRQ/xmGgHqrgLEJNuAU0w== X-Google-Smtp-Source: APXvYqwLYj9JmKfhQ5c0f7YnHAhJS6ID5jx1WOifZdYSNBrSzD3gCwETx0oEGcuWmAhu9PaDgRclI41+gxeCrIjEmUk= X-Received: by 2002:a62:e90d:: with SMTP id j13mr5116172pfh.86.1572018047025; Fri, 25 Oct 2019 08:40:47 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Fri, 25 Oct 2019 16:40:36 +0100 Message-ID: To: Dmitry Stogov Cc: Nikita Popov , PHP internals Content-Type: text/plain; charset="UTF-8" X-Envelope-From: Subject: Re: [PHP-DEV] Re: [RFC] Union Types v2 From: Danack@basereality.com (Dan Ackroyd) On Fri, 25 Oct 2019 at 14:27, Dmitry Stogov wrote: > > // <= 100 type checks on a single assignment That code contains a reference that is re-used 100 times. I personally prefer not to use references at all, but if people do want to use them, we could put a note that references are bad for performance when used with types. People can then choose between: * using types, and not references for good performance. * using references, and not types for good performance. * using references and types, and getting slightly less good performance. > I don't like to complicate the language with features > that shouldn't be often used, Can we start the discussion about deprecating references in PHP 8 then? Very few people are writing code using them currently, and they seem to cause quite a lot of confusion, judging by the bug reports about them. If you're also saying that they are making it difficult to write performant PHP, that seems to be a good argument for looking at what would be needed to be done to remove them. cheers Dan Ack