. . . except that doesn't point out the object-orientedness of it. The
reason I brought up attaching something related to object oriented
programming to the word "symbol" was as a means of contrasting with an
older and, in many cases, better-known use of "symbols" in programming
(a use that is, in fact, almost identical except for that pesky OO-ness
of Ruby).
···
On Sat, Jul 29, 2006 at 05:11:35AM +0900, ara.t.howard@noaa.gov wrote:
On Sat, 29 Jul 2006 dblack@wobblini.net wrote:
>I'd just call them symbols, or Symbol objects (just as with strings,
>arrays,
>etc.).
i like 'symbol literal' as in
array literal => [42]
hash literal => {42=>42}
symbol literal => :foo
--
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"A script is what you give the actors. A program
is what you give the audience." - Larry Wall
In my example, using a symbol would be the same as creating a symbol
object (whose initialize() method was overwritten to pull a
Unique-Singleton deal):
{ :foo => "bar" }
is the same as
{ Symbol.new('foo') => "bar" }
(That is, if Symbol had #new defined).
It's like saying...
"Hello"
does the same thing as
String.new('hello')
except that it doesn't create a new object for duplicate values, it
simply returns the reference to the previous Symbol object created.
M.T.
Really as an example of its objectness. It's a way to look at the
literal (:symbol_name) as the same as an instanciation, but with
conditions (of uniqueness).
I'm just sharing how I look at it.
M.T.
Indeed. I understand that, just trying to illustrate it to those
familiar with objects moreso than symbols, atoms, or whatever they are
called. 
@Keith: thanks for that bit on Prolog.
So far, I think we've gotten a pretty good understanding of symbols,
regardless of how we choose to represent it in our mind.

M.T.
dblack@wobblini.net wrote:
Hi --
Really as an example of its objectness. It's a way to look at the
literal (:symbol_name) as the same as an instanciation, but with
conditions (of uniqueness).
You might as well save the round trip, though
It's in the same
category as integers: unique and immediate, as well as immutable.
David
The most salient symbol example for me has always been:
> irb --simple-prompt
>> "foo".object_id
=> 23208408
>> "foo".object_id
=> 23205828
>> :foo.object_id
=> 5896462
>> :foo.object_id
=> 5896462
Tom
···
On Sat, 29 Jul 2006, Matt Todd wrote:
--
Tom Werner
Helmets to Hardhats
Software Developer
tom@helmetstohardhats.org
www.helmetstohardhats.org