Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 34625 invoked from network); 5 Jan 2013 23:44:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:44:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 67.192.241.147 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 67.192.241.147 smtp147.dfw.emailsrvr.com Linux 2.6 Received: from [67.192.241.147] ([67.192.241.147:59113] helo=smtp147.dfw.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/CD-62408-3FAB8E05 for ; Sat, 05 Jan 2013 18:44:57 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp31.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 247B450373; Sat, 5 Jan 2013 18:44:45 -0500 (EST) X-Virus-Scanned: OK Received: by smtp31.relay.dfw1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 95CBF5036F; Sat, 5 Jan 2013 18:44:44 -0500 (EST) Message-ID: <50E8BAEC.7090400@sugarcrm.com> Date: Sat, 05 Jan 2013 15:44:44 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Kris Craig CC: Nikita Nefedov , "internals@lists.php.net" References: <50E8ADF5.6070504@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Ruby's symbols From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > I'm still a total newb when it comes to Ruby, but as I understand it, a > symbol can be particularly helpful by maximizing code readability > without sacrificing efficiency. As a PHP guy, I tend to think of a Ruby > symbol as a constant that doesn't need to be defined or set. Its value String is a constant that doesn't need to be defined of set. > 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 If you don't care what the values are, why have them at all? What's wrong with just using "brown", etc.? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227