Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112476 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41948 invoked from network); 9 Dec 2020 19:37:06 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 9 Dec 2020 19:37:06 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C47811804E1 for ; Wed, 9 Dec 2020 11:06:35 -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.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-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.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 ; Wed, 9 Dec 2020 11:06:35 -0800 (PST) Received: by mail-wr1-f49.google.com with SMTP id m5so2931858wrx.9 for ; Wed, 09 Dec 2020 11:06:35 -0800 (PST) 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-transfer-encoding:content-language; bh=B+M4pfE8YUTsu8QoNUcxH4dz4Gl1laEFgN0KR4nvUqQ=; b=sCDOACWSfbNg84N6Y7pvTgoxeaIPbQyvCHimRSGorklJexdFPuqvdbs+1EKnkK9S2H YltV8d1VNRpO+YTrptz0o+Oe5hmRyhMM+ZLikNNbSb6t5nbnngCOMwMOhZyRV9aZtb2U oXkKh7V6Kv9ghYpvZ0gbSQvsDLjY46coRQ5I3iPmJx5C/6pKsCPTfuGIUpot93nj3mGx yZmOMMKIGmVR/OoQexDs3+ZPWErfUo+1c9Cw6ihpyY7FCJQQTz5PFT80Wd3UJNCDhf8B z/FXgkB96K9d9VOGVhgkGCiNxVpP47htpsnW1khvOQH3ScLBzaNWg1jknYFQ2Lce2RV6 MtUg== 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-transfer-encoding :content-language; bh=B+M4pfE8YUTsu8QoNUcxH4dz4Gl1laEFgN0KR4nvUqQ=; b=qumbqH6Bsj2uZa2ACXabeU9jfJXieaGSGdcAytUqh/ACE1o46E019Lqc0OcEBJZUUr chRBELk9uDWqm5J9nzmE+Km3Uqq3y7tuqucubZtncl1e75GDHgM/t+54EGdla7WrXXl8 vtzTkdnpnMtHegY5NQXGJya2+BryUZogi9F0ZAOxAAfh3vyz1SbBg3r15TAEd3JVCeS2 mKfWKmPafQgirLjLYO82cA4E8xgAF4spbv2/ILbci/w8HjSUniNYPSme6K91OUr/99DN qOZVxJUytHzxMKbXp3P+AzwNJzmqKVpXl2pLVeIBUql+6nP5OS+L3RbIeKWVQLSyvmnL pp1A== X-Gm-Message-State: AOAM533ieCkfHDFeaAlXYg1TG45lUWj5XZcouq7x900ErT1pN3bmPoN6 ktNl5EvpWK2Irpm0KJwHSNCZXpufjSc= X-Google-Smtp-Source: ABdhPJw7q60y0V5M2tu9bqX7NR/rfUl7PY5YV+tJu35WGClrFsJRkHpHVDyjJ8OczUblcg4exiOHOw== X-Received: by 2002:adf:9546:: with SMTP id 64mr4282499wrs.343.1607540791344; Wed, 09 Dec 2020 11:06:31 -0800 (PST) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id n3sm5282229wrw.61.2020.12.09.11.06.30 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Dec 2020 11:06:30 -0800 (PST) To: internals@lists.php.net References: Message-ID: <1150805a-44b0-af7e-d54b-6082fd23a63e@gmail.com> Date: Wed, 9 Dec 2020 19:06:29 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB Subject: Re: [PHP-DEV] [RFC] Enumerations From: rowan.collins@gmail.com (Rowan Tommins) On 09/12/2020 18:47, Mike Schinkel wrote: > 1. Will enum methods be idempotent? > > If not, shouldn't they be? Can you clarify what you mean here? The only meaningful question I can think of is "can they change the object's state?" That's mostly answered in the RFC, most notably by specifying that enums may not have instance properties, to avoid them having any state to change. Unless I'm missing something, trying to define "idempotence" or "pure functions" any more strictly than that would surely be a massive project in itself - for a start, you'd need a whitelist of all built-in operations which were side-effect free (i.e. no file writes, configuration changes, output, etc, etc). Regards, -- Rowan Tommins (né Collins) [IMSoP]