Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64573 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28956 invoked from network); 5 Jan 2013 23:39:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:39:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.220.173 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:63452] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 12/8C-62408-0A9B8E05 for ; Sat, 05 Jan 2013 18:39:13 -0500 Received: by mail-vc0-f173.google.com with SMTP id f13so17807690vcb.4 for ; Sat, 05 Jan 2013 15:39:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding:x-gm-message-state; bh=Ay9UwBq/xw5veGVGmhY9YufGn7lMlGjgSfh/FJBC2gU=; b=d3IoWaMrdCAuaIUudCz5zyhK7ZX93Om7so/bXxT9aG6UE6b2sMr9IEnCCDHo17O6wQ sSXWqfxLfRjUkWJ7X97fs74dx6U7RC4fDiDNuSgmWZHyAk2l8m+RiN8AzZQpi5RBxuAU Iq6+gU2ACpz45LImwlUJ7D3zSxYAEAfSwapQz5byoWND5WtbDrBBVq4tU2gqUzfVxPy0 ROcuWX5wl/cbfB+NxclwAqS2kGmMLFoCjsxrxpy5jwMMeo4KOYQz5d80cYe7+mTGDnM0 Bf7jG/4KRVTvtLRmq/RleWeZK0RJSJXuvQPeAGY1XWfQq2fW5uvRVzF96xZgjwfzp5uc r1ug== X-Received: by 10.52.180.200 with SMTP id dq8mr69151264vdc.71.1357429149575; Sat, 05 Jan 2013 15:39:09 -0800 (PST) Received: from [192.168.200.148] (c-50-131-44-225.hsd1.ca.comcast.net. [50.131.44.225]) by mx.google.com with ESMTPS id dx4sm49274198vdb.16.2013.01.05.15.39.08 (version=SSLv3 cipher=OTHER); Sat, 05 Jan 2013 15:39:09 -0800 (PST) Message-ID: <50E8B99B.1060703@lerdorf.com> Date: Sat, 05 Jan 2013 15:39:07 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Kris Craig CC: Stas Malyshev , Nikita Nefedov , "internals@lists.php.net" References: <50E8ADF5.6070504@sugarcrm.com> <50E8B7FB.6050506@lerdorf.com> In-Reply-To: X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQksDqcYwyzEBqO5Aobhuq/U5LaZXYwxt8wd3KgJiug8c15u5+wfoAeyhVsaU/b/7es/wa8w Subject: Re: [PHP-DEV] Ruby's symbols From: rasmus@lerdorf.com (Rasmus Lerdorf) On 01/05/2013 03:36 PM, Kris Craig wrote: > > > On Sat, Jan 5, 2013 at 3:32 PM, Rasmus Lerdorf > wrote: > > On 01/05/2013 03:29 PM, Kris Craig wrote: > > > In both cases, we really don't care what the actual values of > brown, black, > > and purple are. We just want it to be unique so we can reference > each of > > them in a visually friendly way with minimal performance impact. > That's > > where I could see a valid use-case for Ruby-like symbols in PHP. > > What you are describing is just an enum. That's not really what Ruby > symbols are about. > > -Rasmus > > > Ruby doesn't have native enums. Symbols are often used in Ruby code to > obtain the same functionality, though. Right, but if that is the only use you can come up with for them in PHP, then there are way simpler ways to do it. We already have an enum RFC. https://wiki.php.net/rfc/enum -Rasmus