Re: Ruby's symbols

From: Date: Sat, 05 Jan 2013 23:44:44 +0000
Subject: Re: Ruby's symbols
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-64577@lists.php.net to get a copy of this message
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

« previous php.internals (#64577) next »