[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: On Symbols

Ryan Leavengood

12/30/2005 4:25:00 PM

I don't know, they have always made sense to me, which is why I didn't
post in that other thread. I think people are just overthinking
things.

Zen and the Art of Ruby Programming: Symbols just are.

Ryan

On 12/30/05, Devin Mullins <twifkak@comcast.net> wrote:
> Hey, all you lurkers:
>
> Have any of the explanations in the thread (What is the difference
> between :foo and "foo" ?) helped you understand symbols? A combination
> of them? Or a combination of a couple of explanations, and an irb
> session? Which ones? Why? If you don't want to get involved in (what
> seems to be turning into) a flamewar, email me personally (hint: don't
> click "Reply" :P), and I'll compile the results anonymously.
>
> I think we all agree that everybody learns differently, and so I think
> we're in dire need of feedback from somebody other than Chad (no offense)
12 Answers

J. Ryan Sobol

12/30/2005 4:36:00 PM

0

On Dec 30, 2005, at 11:25 AM, Ryan Leavengood wrote:

> Zen and the Art of Ruby Programming: Symbols just are.

/agreed

~ ryan ~


Christian Neukirchen

12/30/2005 5:49:00 PM

0

Ryan Leavengood <leavengood@gmail.com> writes:

> Zen and the Art of Ruby Programming: Symbols just are.

+1

> Ryan
--
Christian Neukirchen <chneukirchen@gmail.com> http://chneuk...


Gregory Brown

12/30/2005 6:13:00 PM

0

On 12/30/05, Christian Neukirchen <chneukirchen@gmail.com> wrote:
> Ryan Leavengood <leavengood@gmail.com> writes:
>
> > Zen and the Art of Ruby Programming: Symbols just are.
>
> +1

+1 more. People will understand them if they just use them.


Steve Litt

12/30/2005 6:24:00 PM

0

On Friday 30 December 2005 01:13 pm, Gregory Brown wrote:
> On 12/30/05, Christian Neukirchen <chneukirchen@gmail.com> wrote:
> > Ryan Leavengood <leavengood@gmail.com> writes:
> > > Zen and the Art of Ruby Programming: Symbols just are.
> >
> > +1
>
> +1 more. People will understand them if they just use them.

I disagree. I was using them quite often, but didn't understand them at all.

Now, thanks to this 99 post thread, I believe I understand them at an
intuitive level, and I understand them enough to correctly code with them
every time.

As we speak, I'm writing symbol documentation for the Ruby Nuby who has no
concept (so far) of Ruby internals or Ruby customs.

And nobody even gave me two cents :-)

SteveT

Steve Litt
http://www.troublesh...
slitt@troubleshooters.com


Gregory Brown

12/30/2005 6:30:00 PM

0

On 12/30/05, Steve Litt <slitt@earthlink.net> wrote:

> As we speak, I'm writing symbol documentation for the Ruby Nuby who has no
> concept (so far) of Ruby internals or Ruby customs.
>
> And nobody even gave me two cents :-)

I think you'll get nickels, dimes, quarters, and other such change if
you can put an end to this seemingly bottomless topic.


esmeralda

12/30/2005 6:36:00 PM

0

Steve Litt wrote:

> And nobody even gave me two cents :-)

Ask for more, try three.

Funny new year !

Yohanes Santoso

12/30/2005 6:46:00 PM

0

Gregory Brown <gregory.t.brown@gmail.com> writes:

> On 12/30/05, Steve Litt <slitt@earthlink.net> wrote:
>
>> As we speak, I'm writing symbol documentation for the Ruby Nuby who has no
>> concept (so far) of Ruby internals or Ruby customs.
>>
>> And nobody even gave me two cents :-)
>
> I think you'll get nickels, dimes, quarters, and other such change if
> you can put an end to this seemingly bottomless topic.

I think this topic will be terminated by the coming year-end holiday
more so than any concensus or documentation.


YS.


Ron M

12/30/2005 10:20:00 PM

0

Ryan Leavengood wrote:
> I don't know, they have always made sense to me...

Ruby symbols surprised me a bit because unlike most
Lisps, Ruby's symbols aren't garbage collected.

I still don't understand if that is an implementation
detail or something fundamental about symbols in Ruby
that makes them uncollectable. The answer to that
question would say a lot about where it's a good
idea to use symbols.

> Zen and the Art of Ruby Programming: Symbols just are.

In all languages with symbols, symbols just are.
But in some languages they are, to varying degrees different.

> On 12/30/05, Devin Mullins <twifkak@comcast.net> wrote:
>>Have any of the explanations in the thread (What is the difference
>>between :foo and "foo" ?) helped you understand symbols?

The explanations that contrasted Ruby symbols with symbols
in other languages helped me.


Symbols mostly similar but a little different to Ruby's
are present in many languages (Lisp, Dylan).

Other languages have similar concepts with a different
name (Interned strings in Java).

Other languages use the same term to describe something
quite different (Lex/Yacc, APL's symbols, a linker's
symbol table in C) - but that's mostly a different
concept since the running program itself will rarely
care about the symbols.


Chad Perrin

12/30/2005 11:36:00 PM

0

On Sat, Dec 31, 2005 at 01:25:29AM +0900, Ryan Leavengood wrote:
> I don't know, they have always made sense to me, which is why I didn't
> post in that other thread. I think people are just overthinking
> things.
>
> Zen and the Art of Ruby Programming: Symbols just are.

+= 1

--
Chad Perrin [ CCD CopyWrite | http://ccd.ap... ]

This sig for rent: a Signify v1.14 production from http://www.d...


Austin Ziegler

12/31/2005 12:39:00 AM

0

On 30/12/05, Ron M <rm_rails@cheapcomplexdevices.com> wrote:
> Ruby symbols surprised me a bit because unlike most
> Lisps, Ruby's symbols aren't garbage collected.
>
> I still don't understand if that is an implementation
> detail or something fundamental about symbols in Ruby
> that makes them uncollectable. The answer to that
> question would say a lot about where it's a good
> idea to use symbols.

Probably an implementation detail. That doesn't mean you can't ignore
it, but it means that it's generally a good idea to use Symbols in a
lot of places. Just don't pretend that they're immutable Strings.
They're not. If you want that, freeze the String.

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca