Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119384 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24749 invoked from network); 20 Jan 2023 19:03:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 20 Jan 2023 19:03:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id ECD0A1804F7 for ; Fri, 20 Jan 2023 11:03:50 -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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS20857 136.144.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from outbound8.mail.transip.nl (outbound8.mail.transip.nl [136.144.136.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 20 Jan 2023 11:03:50 -0800 (PST) Received: from submission0.mail.transip.nl (unknown [10.100.4.69]) by outbound8.mail.transip.nl (Postfix) with ESMTP id 4Nz86X5y7RzY78T2 for ; Fri, 20 Jan 2023 20:03:48 +0100 (CET) Received: from [IPV6:2a02:a450:3eae:1:94b8:1d71:9606:6737] (2a02-a450-3eae-1-94b8-1d71-9606-6737.fixed6.kpn.net [IPv6:2a02:a450:3eae:1:94b8:1d71:9606:6737]) by submission0.mail.transip.nl (Postfix) with ESMTPA id 4Nz86S4TNZz3qcdD for ; Fri, 20 Jan 2023 20:03:44 +0100 (CET) Message-ID: <511bd95b-5160-0d3a-735a-2d69a82efac3@demon-angel.eu> Date: Fri, 20 Jan 2023 20:03:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Content-Language: nl To: internals@lists.php.net References: <5FC8DBAF-8D78-4E94-A3B0-3BDED3A3E53C@craigfrancis.co.uk> <789af205-4582-66a9-694a-10e18b8b9f56@demon-angel.eu> <9d225219-4e31-b362-52a9-9a298a0a55ef@telia.com> <768de46c-9ff2-eee2-24ab-e78e27ad167c@demon-angel.eu> <828f1ec6-e8ff-01b2-dc0e-a6cf1dd16eb2@demon-angel.eu> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: ClueGetter at submission0.mail.transip.nl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=transip-a; d=demon-angel.eu; t=1674241424; h=from:subject:to: references:in-reply-to:date:mime-version:content-type; bh=LLGJZOCzQFjxv+HJDYJ9p61yF/qCbNyMQr3EcBN1je4=; b=MHdwUQcjjXqjjI5lk4e/Uxz8w7g5qVxes6b02cdGyIe35IPm7klreAUIWUBcBHCGeY/4h3 8Y/UZzXQ7mbY3DCvfEBZ2If5G/6m9B80aqdAPZRerjj2IVJg5JsHNB8U43ha+2zotaS2YK uyOGxdmNkls8Sxy2b2+hyHXgk+i8625uGuzrl+7kyLuBtXYm3URxFVoSA4KyJbFIGHmVoJ oQvRIF/CqsIcUE+nYLdsECKa7t2FLsd377AaLz2mcCE0XLVe+V8eT2Vn+qzASfqEpgjmI1 Mj5aINTE5E30Fi4OMwDQsSAdxJDty5TQcmB+UbUTYZI+7b6OYEFmCBAtYdxj0w== X-Report-Abuse-To: abuse@transip.nl Subject: Re: [PHP-DEV] [RFC] Path to Saner Increment/Decrement operators From: mark@demon-angel.eu (Mark Baker) On 20/01/2023 19:48, Kamil Tekiela wrote: > I don't think it's such a huge issue as you make it to be. The > documentation states this only as an alternative: > https://phpspreadsheet.readthedocs.io/en/latest/topics/accessing-cells/#looping-through-cells-using-indexes > > It also mentions the pitfalls. I doubt many users would prefer that > "alternative" given that the recommended way is simpler and does the same > thing. > I also don't think that performance would come into play here. Any > difference would be insignificant. > I believe that the benefits of the deprecation outweigh any potential extra > work the developers may have. I beg to differ. Having done a lot of work last year recommending the deprecation of using of column indexes (1,2,3,etc) in favour of addresses ('A', 'B', 'C', etc) to more closely match with Excel's layout; and knowing how much the codebase uses alpha column incrementing internally, I'm aware of how much an issue it is. I'd prefer if developers using PhpSpreadsheet used the built-in iterators, and Im in the middle of writing a post on the benefits of doing just that; but "under the hood" alpha column names are used, not numeric indexes'; so a lot of the "under the hood" code uses ++ and -- with row numbers and column addresses. And replacing any PHP operator with a function call is always going to be less performant. The benefits of this deprecation seem to be making ++ and -- consistent by making them little more than a syntactic sugar for numeric values only; I'm afraid I don't see that as a benefit; but as a retrograde step, and not the same as making ++ and -- consistent. -- Mark Baker