[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

Mark Somerville

12/30/2005 4:53:00 PM

On Friday 30 December 2005 13:39, Devin Mullins wrote:
> Hey, all you lurkers:

Hello.

>
> 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.

Yes, the thread has definitely helped my understanding (but I wouldn't like to
offer up my own explanation of how they work ;) ). It's hard to pinpoint any
one thing that made it click, but I think the host/port example on the second
half of this page seemed to make the most difference to me:

http://microjet.ath.cx/WebWiki/2005.12.27_UsingSymbolsForTheWrongR...

I found the examples of when to use symbols the most useful. In fact, I'd say
they're essential, at least for me.

Thanks everyone.

Mark

>
> 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).
>
> Devin


1 Answer

Dave Howell

1/4/2006 10:18:00 PM

0


On Dec 30, 2005, at 8:52, Mark Somerville wrote:

> I think the host/port example on the second
> half of this page seemed to make the most difference to me:
>
> http://microjet.ath.c...
> 2005.12.27_UsingSymbolsForTheWrongReason.html

Ack. I'm glad that helped somebody, but it was meaningless for me. It
still had nothing about what a symbol *is*. Until I find out what they
actually are, I can use them only by parrotting. "When I type
attr_reader, I have to do that colon-name thing, which then turns into
an @name thing later for no visibly logical reason. But that's what you
do, so I do it. La la la."

However, the link on that page seems to be much more useful to *me*.

http://onestepback.org/index.cgi/...
SymbolsAreNotImmutableStrings.red

[thinking]

Nope, still don't know what they are.

For pity's sake, though, do NOT respond to my message by trying to
explain them. I haven't finished reading all the messages yet, but
apparently there are a couple million, so no point in adding new ones
just yet!