Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64570 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24941 invoked from network); 5 Jan 2013 23:36:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:36:23 -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.178 as permitted sender) X-PHP-List-Original-Sender: kris.craig@gmail.com X-Host-Fingerprint: 209.85.216.178 mail-qc0-f178.google.com Received: from [209.85.216.178] ([209.85.216.178:33363] helo=mail-qc0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/9B-62408-6F8B8E05 for ; Sat, 05 Jan 2013 18:36:23 -0500 Received: by mail-qc0-f178.google.com with SMTP id j34so10371613qco.9 for ; Sat, 05 Jan 2013 15:36:19 -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=rLIlifc5/kXjU9ZXuZ8vf6dEg9aovXmnOfh5AgI9W6I=; b=ME08P/qszfEy38s8kg8mdROkBzIFu9085eFt0JEc1jXfx9RydiBA5Wz4v/DKReb/ss N1rNnViWveaMaj1VxrQybGALphUHANNTHT2DehOXLUyIZwVWiVjKI05cVUM1tZVIVxO1 zu7n9MaPM9Awmo3UvYzkdKyf4maDhp1hqtaWaJ/uytogRQN8hjMC5Y9BqtneQOT4TI4l 0VL2qeIASJC82Kqb/xx12Q1Ufjb9BFm9JfsexvrVPlXdlAKTmc1PKhf5+/xt40eDFlxR a2Tn5U/7ZxcVKDIRqnoa+8I/VAKaQXWEOAST0TyMYJd0huy3+yCNj8z0+HLGdlmU4B0c 1TSw== MIME-Version: 1.0 Received: by 10.224.193.130 with SMTP id du2mr35113467qab.95.1357428979833; Sat, 05 Jan 2013 15:36:19 -0800 (PST) Received: by 10.49.64.199 with HTTP; Sat, 5 Jan 2013 15:36:19 -0800 (PST) In-Reply-To: <50E8B7FB.6050506@lerdorf.com> References: <50E8ADF5.6070504@sugarcrm.com> <50E8B7FB.6050506@lerdorf.com> Date: Sat, 5 Jan 2013 15:36:19 -0800 Message-ID: To: Rasmus Lerdorf Cc: Stas Malyshev , Nikita Nefedov , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=20cf3005dec2269ad104d29310da Subject: Re: [PHP-DEV] Ruby's symbols From: kris.craig@gmail.com (Kris Craig) --20cf3005dec2269ad104d29310da Content-Type: text/plain; charset=ISO-8859-1 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. --Kris --20cf3005dec2269ad104d29310da--