Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110948 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 62588 invoked from network); 11 Jul 2020 17:19:14 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Jul 2020 17:19:14 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 30E4C180544 for ; Sat, 11 Jul 2020 09:10:57 -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,HTML_MESSAGE, 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-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) (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, 11 Jul 2020 09:10:56 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id t27so7645336ill.9 for ; Sat, 11 Jul 2020 09:10:56 -0700 (PDT) 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=7/SbJTdTl/aepEotOiqA2AVkJG26yqi9sobCgqkLKzU=; b=bt7p6Cl8oAda5GJ6EZmiRSIjFewjm/T4gDWpDNHIkY5v1HIBofkD/yMyDNDNe0T4i6 dfiPN4TSo94zkQyOFGFaPUSlu7LpAORTLPsDbBCRVJIIuK8zyCadW627YbTqgZXob8SR 1aQvG5wNKenZXf0GAy4aJFiFzcVHPh1A3Kj2CO2TG2N/1yFfbkezduJ1EGGCae8ecbYX Tdj/nfXv22x+SuOTGgnnW6plzLANefEkkth/mYTcNsqRqq4lLtLpP9DipkY2o78abQnG aKdZtj1O+5tgp6r95fyQQ7jVDMAunK7wqo4aQ1nxupUnnth8+fXJcjrg52OOa003eWZ+ W+aw== 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=7/SbJTdTl/aepEotOiqA2AVkJG26yqi9sobCgqkLKzU=; b=eqL0hmq1srTXVlvZU6Dh4j12ccTMTuPIAb0Y9xl2ZwojLqQo6b/SnrT8D+kHJcF4lV a2QXhx5haMbpLK9fmktqo8zmSy/RuowhCtFdhBbjcZjhpQQJB88QP7PuL4ROG0w5kJvt 5MOmmrFchlULiGJ7/p/uxC0Ma2z57ZDQSZ8I7bWhSf4bICg9EDqQ/9/f2dAGpwU7xe0u vW8P6edHOuan47PgKakng3jngLjcJrszGlEumR/QXoWNcX+9Gr9U8f1Ih1vXTs7StpAb +G5Nay8b6fhuJfUr74yHsxPhBdIpwMriysOdtTKWOLFwRLXWio57Sc/XlIKpe6exlSaY 1VPA== X-Gm-Message-State: AOAM532HTedB61qYjC8I2JIXHTIwx5byDkBhCmPOkETxMjJfi8IYfNok SbCpDMIArM9m4MoLMU3LeeREQwD+0KhxPIP/6OY= X-Google-Smtp-Source: ABdhPJwFtOjOUrdX10cUv9zgyoxwv0wP++RmDam4G4CrRs+V0W8bkd7bRo4eMvub764yalOEdUcADDHJFvPtC0O8mIY= X-Received: by 2002:a92:25c9:: with SMTP id l192mr56008776ill.135.1594483852173; Sat, 11 Jul 2020 09:10:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 11 Jul 2020 19:10:41 +0300 Message-ID: To: tyson andre Cc: Chuck Adams , =?UTF-8?Q?Olle_H=C3=A4rstedt?= , PHP internals Content-Type: multipart/alternative; boundary="0000000000009be8f205aa2cb319" Subject: Re: [PHP-DEV] Possible RFC: UniqueInterface that throws exception at refcount > 1 From: maxsem.wiki@gmail.com (Max Semenik) --0000000000009be8f205aa2cb319 Content-Type: text/plain; charset="UTF-8" On Sat, Jul 11, 2020 at 5:32 PM tyson andre wrote: > This is something that makes more sense in compiled languages like rust > that can enforce uniqueness at compile time, > and the dynamic nature of php makes that less practical. > Also, crucially, Rust has language features that require a programmer to specify whether each variable is mutable or not. Without it, Rust's borrow checker wouldn't be possible. PHP has nothing like it, and introducing it at this stage would be prohibitively hard. -- Best regards, Max Semenik --0000000000009be8f205aa2cb319--