Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88352 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4915 invoked from network); 18 Sep 2015 18:40:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Sep 2015 18:40:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=jgmdev@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jgmdev@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.177 as permitted sender) X-PHP-List-Original-Sender: jgmdev@gmail.com X-Host-Fingerprint: 209.85.160.177 mail-yk0-f177.google.com Received: from [209.85.160.177] ([209.85.160.177:36291] helo=mail-yk0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6E/C8-60254-39A5CF55 for ; Fri, 18 Sep 2015 14:40:20 -0400 Received: by ykdt18 with SMTP id t18so54606756ykd.3 for ; Fri, 18 Sep 2015 11:40:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=9beWcBY0RSInWmj62WOZHmai+9MyLCKtbC3VNE46NUg=; b=tN5gaDJ8JBuKAYIn5GHnx8//DNCdMtqFvH5LzFk2h8HqAupw/IKz7yrjPQ5WbJVQoD nwagFK+AH4N+zpu3XoLfBKOibgBD/fEVQQv8zzB5QYAUb0sE6XrE7bNHfYWnJc6Wm7jL Xt+aPqMOXAcGFLHm3k5UtGMDf8PX0D9GQbincdI4gnjzA2ZmoxaoUspXmlIFfA6F1pAz C5GdBWggzCZLR74ivLZ1y7s4qe/u3mQO+ryRfPtkDvoqqCatFq/cHyJYUS59BnwEzHV2 tTvSAv94fAo8x/ja4gmzI8q3SPQcaOfefZIn3DX+1CC9FnIG4XSTeBxQMv9/NENleu+K MWoA== X-Received: by 10.170.96.196 with SMTP id n187mr5977785yka.54.1442601617492; Fri, 18 Sep 2015 11:40:17 -0700 (PDT) Received: from [192.168.1.121] ([24.41.170.168]) by smtp.googlemail.com with ESMTPSA id o3sm6400306ywc.14.2015.09.18.11.40.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Sep 2015 11:40:16 -0700 (PDT) To: Rowan Collins , Levi Morrison References: <55FB4791.4040807@gmail.com> <55FC34E6.8020009@gmail.com> <55FC476B.6020201@gmail.com> <55FC570A.7010802@gmail.com> <55FC5826.2050306@gmail.com> Cc: internals Message-ID: <55FC5A8B.2090001@gmail.com> Date: Fri, 18 Sep 2015 14:40:11 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55FC5826.2050306@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Let's discuss enums! From: jgmdev@gmail.com (Jefferson Gonzalez) On 09/18/2015 02:29 PM, Rowan Collins wrote: > Jefferson Gonzalez wrote on 18/09/2015 19:25: >> I also believe the rfc should include type hinting of enums as has >> been mentioned on this discussion. That would make enumerations more >> useful and the rfc more complete. > > It already mentions that: > > > Enums are strongly typed and can be used as parameter or return types. > > As I understand it, this actually comes for free the way it's > implemented, because Enums are actually a type of object, and the enum > declaration is effectively a class. Whoops... just noticed after re-reading the rfc :) thanks! Then I guess the missing bits are an implementation (most important part) and a happy medium for those that believe that behind the scenes (serialization, storage, databases) enumerations should be represented numerically (for the various reasons discussed).