Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88361 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25843 invoked from network); 18 Sep 2015 21:36:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2015 21:36:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.172 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:35886] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FC/03-09127-CE38CF55 for ; Fri, 18 Sep 2015 17:36:45 -0400 Received: by wicgb1 with SMTP id gb1so48255624wic.1 for ; Fri, 18 Sep 2015 14:36:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type:subject:from:date:to :message-id; bh=WZRaUc6WcrWRi1OVTrSCwCJmIbH2Hll3V08FgkU4MTg=; b=q5T/qbtbtFfG4ncjOGywHGZS8bRmHgZgONoT40u69bhd4L3f4klXnd9wxkNmdm5MJL Q5HjRgC9ILdEAKnHYZuHQaccMUZuvzxlTzKYMrOw+aZbT3KigLvQO0KYSlZhPxCdXWjZ juMZ9AymMDY7GYSl7lF+VLHUxd12Z5yKEVNztm2849Ka7aI7eFBg6nIL5LCNS47OOXma nJ5bVVpNcBzrx5csrsXMwoxkB7Fxfb+iWdcg0A88qrEznO+XFKjTwkfu7ELm1MtOhUHV N+2aLVYynko/bDZcBUkPCB/jeSvfxOtwWbmmrOjgCQk0JMx7L/3Jfp36sAIuFwtrNz7t SjBQ== X-Received: by 10.194.104.200 with SMTP id gg8mr10343059wjb.144.1442612202165; Fri, 18 Sep 2015 14:36:42 -0700 (PDT) Received: from [192.168.0.6] (cpc68956-brig15-2-0-cust215.3-3.cable.virginm.net. [82.6.24.216]) by smtp.gmail.com with ESMTPSA id p4sm98821wia.15.2015.09.18.14.36.41 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Sep 2015 14:36:41 -0700 (PDT) User-Agent: K-9 Mail for Android In-Reply-To: <55FC4A8B.9000500@lsces.co.uk> References: <55FB4791.4040807@gmail.com> <55FC4A8B.9000500@lsces.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Date: Fri, 18 Sep 2015 22:36:34 +0100 To: Lester Caine ,internals@lists.php.net Message-ID: <95DDF335-6852-4965-AEAF-EFE870A28E66@gmail.com> Subject: Re: [PHP-DEV] Let's discuss enums! From: rowan.collins@gmail.com (Rowan Collins) On 18 September 2015 18:31:55 BST, Lester Caine wrote: >On 18/09/15 00:06, Rowan Collins wrote: >> So, what are anyone's thoughts? Am I rambling on too much as usual? >;) > >What happens when you need to switch language? Yes, the names of enum members should be considered labels, not descriptions. They're strings only for the convenience of programmers working with them, just like variable names, which would more efficiently be written $1, $2, etc. Your enum value might be State::OFF_MAP_E, which would be looked up in a database or translation library to the appropriate translation of "You are off the East side of the map". Regards, -- Rowan Collins [IMSoP]