Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116090 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 3140 invoked from network); 18 Sep 2021 15:28:46 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 18 Sep 2021 15:28:46 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 05B511804B2 for ; Sat, 18 Sep 2021 09:09:01 -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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) (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, 18 Sep 2021 09:09:00 -0700 (PDT) Received: by mail-oi1-f175.google.com with SMTP id p2so18536387oif.1 for ; Sat, 18 Sep 2021 09:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o/S9NiH0G9GnrxHWIU076GL4DrJ9u4Z3VLAt2wScpkw=; b=JHYiO/esD+M0O5dl+tPZFJET18iHxtZjL0s9oj7nPuCvWml1ZlMqhTrq0qqJnfrVAP m3+yAF6CIkDovEWOBQsVEQAk3Fp4RYt3rRhEX3oUCsOHNadSQenbkHPnOcxW2bLmVFN7 IGcY2nfgtvceAiGUGABxjKJ2/z0mhCDmKKZiiqXmKaHBPCvvS86etbR6xaLG2KzNYK7E QKrhN0qfZVXCUIBd9xXJdtxzL9wHGIplRblQw0G5daOO5YTYEK1aECwDfhjd2NtJFIFf mHCSJTbfBOQwm5W86YW2Gkyj49ZshimrZfpnmnQ0k/Y4EFMFNTKaZ906LKtR3qNJrMT3 Lh4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o/S9NiH0G9GnrxHWIU076GL4DrJ9u4Z3VLAt2wScpkw=; b=IAPQK/i3q+L2gC0YLyRyNIWRjnjYZ5KRXA0G6uCuQHY7uv5Gsv/58nx9tQXGKcksXn h7FINEO3fH9KV/wbsDUv9YzeZIbYoe+0iufZ+ltNHE45EhnyfpvlwGICqAKUsmMUZSNS 2k064zE2Etg+x8pV5tkRdNiO4lSJ34SFwfDs/BZIh8Qg1qmUozUpzR+8E3rtpoYx84Pg CynUodfVurVnYSB9dO6I98blRWeEld8Yo/owJTP1EwPJ0qvKiH2p4bOxYujkeP4SrX/V h2WdEO6AWqR35uThmk2Kq4T0tJqEsEBfWtTiL0fwdtC5XHspsY5i1pifUOKhn2ks2Uf/ mmAQ== X-Gm-Message-State: AOAM531cV9LPO8xVkFnMBTN5AfsuS2AbNKrLKajYu00smR1j4rmbbv2h hp0r1MyHX8XA6m4lOinFeJrj7IAfZbpmyRoXeTg= X-Google-Smtp-Source: ABdhPJxNfTfZVCnXwRqYxP4NX0mzpQRn6sEUl+PLkNcsfXGfnzdZ6hvHYANnZ75jovnIYveidqZGM96AH9I49YjBzJg= X-Received: by 2002:a05:6808:3d9:: with SMTP id o25mr7778372oie.168.1631981339613; Sat, 18 Sep 2021 09:08:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Sat, 18 Sep 2021 23:08:46 +0700 Message-ID: To: tyson andre Cc: php internals Content-Type: multipart/alternative; boundary="000000000000071cae05cc4744b4" Subject: Re: [PHP-DEV] RFC: Add `final class Vector` to PHP From: pierre.php@gmail.com (Pierre Joye) --000000000000071cae05cc4744b4 Content-Type: text/plain; charset="UTF-8" Hi Tyson, On Sat, Sep 18, 2021, 10:46 PM tyson andre wrote: > Hi Peter Bowyer, > > > Many of php's names are based on the naming choices in libraries made in > C/C++. > So using https://cplusplus.com/reference/vector/vector/ for my RFC > https://wiki.php.net/rfc/vector > seems like the most natural naming choice, > and would make it easier for people with backgrounds in that family of > languages to find the functionality they're looking for. > I do and as mentioned before it makes it confusing and harder because of the use of zval and not specific type like in c++. A zval is not a php userland type. C++ initialized a vector using the type: vector myvalues; then all elements must be of type int. This proposal breaks this already. I expect having a second `Stack` would be confusing and make it hard to > remember which is the efficient one. > (Especially since stacks typically don't include specialized resizing > methods) > Yes, as it isn't a stack either ;) I have no idea how you could name, sorry, but definitely not a vector. > Also, your comment is ambiguous. Are you saying that you personally object > to the name, > or that you're fine with the name but think that the comments by > Larry/Chris/Pierre in this email thread are representative of voters. > Maybe representative of what vectors are and how they are used. Vectorization is a key to programming now like multi threading or parraelism a few years back. Vectorization is an old principles as processors gain in power in the last year, this the way raw performance scale even more with adding more cores. Now, having a fixed array named Vector in php would be a big mistake and actually very confusing. best, Pierre > --000000000000071cae05cc4744b4--