Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64576 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31941 invoked from network); 5 Jan 2013 23:43:11 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:43:11 -0000 Authentication-Results: pb1.pair.com header.from=kris.craig@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=kris.craig@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.181 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.216.181 mail-qc0-f181.google.com Received: from [209.85.216.181] ([209.85.216.181:44796] helo=mail-qc0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 2C/2D-62408-E8AB8E05 for ; Sat, 05 Jan 2013 18:43:10 -0500 Received: by mail-qc0-f181.google.com with SMTP id x40so10150054qcp.26 for ; Sat, 05 Jan 2013 15:43:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=DDMICsYSqI0BGUn3WBhqpI8zgtc503Wxd1y4qmSefS8=; b=NsYG8sajN8fuP++wePZg9gv0/HvWiKCzYKSJ1SuW3zu6z9p9AQGb8Y67gu1fyfVNSf ck+CkyGM8qDW2MEaV1GMnt/3tA7ONI5XEIgj1lLaTJfyYFI7SDt/exO3s938nWn4qsnP yHAVfcR4bvlwGwOzitmArl2Ed7MW45aSK9vvcI0HbLM5oZPi6jSp8vAVZRGLm5Ntt79h Z6htojGv8fKPU7m0OfIoQeQ5aHsjXofI6HFgbS7t4BleoTZC1GAwAT9qDJjwILbsWrzZ UiQ5pO/5+B8ZBc3ezSsz8WcggISbyQbF4PV8AM05YWtm47rv8IEVSQQ+e5A7YyaQ1tIt KZLA== MIME-Version: 1.0 Received: by 10.224.201.6 with SMTP id ey6mr3718079qab.40.1357429388399; Sat, 05 Jan 2013 15:43:08 -0800 (PST) Received: by 10.49.64.199 with HTTP; Sat, 5 Jan 2013 15:43:08 -0800 (PST) In-Reply-To: <50E8B99B.1060703@lerdorf.com> References: <50E8ADF5.6070504@sugarcrm.com> <50E8B7FB.6050506@lerdorf.com> <50E8B99B.1060703@lerdorf.com> Date: Sat, 5 Jan 2013 15:43:08 -0800 Message-ID: To: Rasmus Lerdorf Cc: Stas Malyshev , Nikita Nefedov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=20cf300fafdd80d43c04d293289c Subject: Re: [PHP-DEV] Ruby's symbols From: kris.craig@gmail.com (Kris Craig) --20cf300fafdd80d43c04d293289c Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 5, 2013 at 3:39 PM, Rasmus Lerdorf wrote: > 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 > > Granted, but other use-cases have already been presented as well. Obviously the one I suggested would no longer be useful if PHP adopts enums. --Kris --20cf300fafdd80d43c04d293289c--