Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:111805 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 43314 invoked from network); 3 Sep 2020 09:14:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Sep 2020 09:14:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 932F31804D9 for ; Thu, 3 Sep 2020 01:19:11 -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, 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-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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, 3 Sep 2020 01:19:11 -0700 (PDT) Received: by mail-ed1-f49.google.com with SMTP id b12so1725175edz.11 for ; Thu, 03 Sep 2020 01:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=WZH0LHuWx4x9SxL1bTZFTiZphtJTS1PtKPwzbGfnUCQ=; b=d58JdbvxlRqCjJrPykeYCfp8EImtA8tf+OnOMr2eEjNvuZ+zHkwu4sIUGAB9uoxe6m 5T5BWNyqTVCG4dsRH72mb8Y1VCe1KG70C5cudsSAh5GAnGXTL5adLxEwio4rERsJWUjn Q2DRkp7POE21cBb32AZqm/tH/AkQJ2kwqNdNAbD1FiiJGndC+URTxZCOP5tryiU9lDeD uRrDQiMNKfhAzVMAiXB/+nj/T63PPMwrUdCzy6cbPMfuo4DHf23tCbRPhyVG17bYvvde CAaxgPKoGz1GXZnehtT9W5/+7m6aPpCF9b/OL+FpkoXXqDrlSYWtn0Gq4eoWqmIpdfLE xgzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WZH0LHuWx4x9SxL1bTZFTiZphtJTS1PtKPwzbGfnUCQ=; b=PcqmdRCgWE52ppJCcic6OUmESr2sXlt63yqlap1efflZcWtKTSEi+Ig5B+4rclLUCL iozVvAOHGs/AAQPDR7jCxMMCVDl2vPIYeLQykRIYiBuV+qFroMfTf8+Fim37pN1mdVgr zvZIwzkzXZXqn58XUlBu3ZDAUpzdXpYCuYV7Kt8rXAx+k8xlYeYBr1Ep23r1XuotcnTy xomuku+5PVh7ACu/gO8ewVmHf/odQpBLdjdy9bLm5ubbjwpPgqZB6V1hjCrX6GPLBQmA t5mPvQyRmUTeuPetx8/HUgajLdZdILuTkP293xwkWsVjnTPql+lV0jcBSNnwc2s6Lsmv USaQ== X-Gm-Message-State: AOAM532oeBRdJxLQYOqABkobCVqAYv/BVYIY+mt9UdhXLwk0Y2BiA1bA 6MCYZZXgCHLkX1ho57pqxolUr/hobZHr9Q== X-Google-Smtp-Source: ABdhPJxJvCzhTUODiGJCgvEOnb9jpvxffnIGvq+XA7rg7aS2s1dxBEKPE7w6SgXhw+ueEGIeS8+PwQ== X-Received: by 2002:a05:6402:17b6:: with SMTP id j22mr1740542edy.377.1599121149427; Thu, 03 Sep 2020 01:19:09 -0700 (PDT) Received: from ?IPv6:2001:983:6fc5:1:49c7:735:8c90:b4f5? ([2001:983:6fc5:1:49c7:735:8c90:b4f5]) by smtp.gmail.com with ESMTPSA id h18sm2320495edw.56.2020.09.03.01.19.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Sep 2020 01:19:08 -0700 (PDT) To: Brent Roose , PHP internals References: <89FF9360-609A-439F-BDBE-B3B4C141E00F@newclarity.net> <95eddd89-9915-14fc-7649-9de0e8dd349d@gmail.com> <306f190e-efd8-0db8-a9c3-aff3c90aa1c6@gmail.com> <53FF7328-F05C-496E-8F57-5A81B899CED1@stitcher.io> Message-ID: Date: Thu, 3 Sep 2020 10:19:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <53FF7328-F05C-496E-8F57-5A81B899CED1@stitcher.io> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Draft RFC: foreach iteration of keys without values From: dik.takken@gmail.com (Dik Takken) On 03-09-2020 09:38, Brent Roose wrote: > Hi all > > I want to point out the use-case when you're using CS tools, static analysers and IDEs: they report unused variables as errors. There are ways around those errors, but it's more convenient if there's language support. I'd say that conceptually it's also more correct: if you're not using a variable, it shouldn't be there. Exactly this. The intent of a particular language construct does not only need to be clear to human readers but also to machines. More explicit intent leads to stronger static code analysis tools, which helps us catch more bugs earlier. Regards, Dik Takken