Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109814 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31502 invoked from network); 23 Apr 2020 15:47:49 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 23 Apr 2020 15:47:49 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 502F61804CE for ; Thu, 23 Apr 2020 07:19:45 -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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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-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 ; Thu, 23 Apr 2020 07:19:44 -0700 (PDT) Received: by mail-il1-f176.google.com with SMTP id t12so5656421ile.9 for ; Thu, 23 Apr 2020 07:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datadoghq.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=E/2hRUZHZvQM40InYoXukh+T+khZwCw9ut4ImPX1J1A=; b=BypFRSFKnuN9Wp1VGJiy6K6QWm0DT/Tc4jX1dX+p1/aQtcxp5Nl3ebp4cbx2jg4ktp ShM+L/m/amEGORFVb1n0BL1Q5V+tfMJZRyx3yCWjBH/x9y3HMLYz1kplGmMrMgoQmBMC wA8EvJ+4TubJpoQoRT+E7g3mimGqt9014GRf0= 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:content-transfer-encoding; bh=E/2hRUZHZvQM40InYoXukh+T+khZwCw9ut4ImPX1J1A=; b=J8IqvGVBYK0wfm05eaEEEGTFf2IlShhrGSQ/mXXREMxG3PwkLNKgPiJC1xtTUtPBbG WioyKjt8HBKVsApPf5/kM1NMtWqyT3nqbzfX2CF8I5z8wYtlWS2rI7SyhjorwxlckZSF okFErd3alveAusHoabUT+OhBZbJw0kCYE426A05tezGBFGiRqYmU0EiV45TmZhPcGmB/ q5z4UEkwD6j2T90jj3xEj9Womu9p7ynOq6ifgjJiPjvGA1bBcxkDU0O3r/79FkiE+Cb2 IGl5AtuAIZmQamSCeIrYnjVbsdeuHse8Lic8PUPNt7ncOC9SJ/NHogV8V2oCjjkACN8B 3LtQ== X-Gm-Message-State: AGi0PuaWrFoTwfDV5BxrIcyRTQ8wKI6vGLbe3nzdpg484lwU73fhloJk HI0/igJSnOTVsOVZMXlrlE/Dc4bT3KVzP+yf6Z9a9g== X-Google-Smtp-Source: APiQypLFnsk0sKx2K+c2t5/U7q+QieInPmd0kzvAQ7fjtlD2U7sa9bSSr0ISzuj+Kf8fgENEfOdCbTf4AOcCBLAYdDM= X-Received: by 2002:a92:5dc4:: with SMTP id e65mr3623711ilg.161.1587651583684; Thu, 23 Apr 2020 07:19:43 -0700 (PDT) MIME-Version: 1.0 References: <4c1cd016-1e41-4ebc-afc4-d8d3cd1c319b@www.fastmail.com> <31441489-11c6-4d99-9c53-6ac0e877f268@www.fastmail.com> <73b33704-ded2-4cbc-93bd-17e8874177f2@www.fastmail.com> In-Reply-To: Reply-To: Levi Morrison Date: Thu, 23 Apr 2020 08:19:32 -0600 Message-ID: To: Matthew Brown Cc: Larry Garfield , php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Any interest in a list type? From: internals@lists.php.net ("Levi Morrison via internals") On Thu, Apr 23, 2020 at 8:16 AM Matthew Brown wr= ote: >> >> IIRC, they switched from object semantics to value semantics (like PHP >> arrays). Can someone more knowledgeable confirm? > > > Yes, sorry =E2=80=93 Hack introduced the vec type (with value semantics) = in 2016 after they'd experimented first with Vector (object semantics). Use= of Vector is now discouraged. > > Details here: https://github.com/facebook/hhvm/issues/6451 > > FB/Hack appears to be in the multi-year process of moving all PHP arrays = to one of [vec/dict/keyset]. That's likely not an option for PHP itself, bu= t having the _option_ of a vec equivalent (in this proposal "list") would m= ake sense, I think. Yeah, I already figured that value semantics would be preferred for this. From the engine perspective, we probably wouldn't want to special case these 3 types and would probably want to figure out some way for at least internal classes to have value semantics. Any contrarian opinions there, especially from main php-src contributors like Nikita and Dmitry?