[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6465] Re: Symbols.

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-11-20 15:33:46 UTC
List: ruby-talk #6465
On Mon, 20 Nov 2000, Dave Thomas wrote:

> Hugh Sasse Staff Elec Eng <hgs@dmu.ac.uk> writes:
> 
> > I'd like to know a bit more about Symbols.  I know that if a variable,
> > class, or method are given one name, then that name is associated with a
> > symbol, and only one symbol.   Presumably this doesn't make the Symbol
> > global, it is more like Fixnums having only one object, so that  1  refers
> > to the same object whereever it is used.  Is that about right?
> 
> A symbol is simply an internal representation of a name. You could
> think of Ruby having a big array internally where every name it comes
> across is stored. The symbol would be the index into that array.

Oh, I see.  So then there is no danger in creating them at will then.
(Except the usual things of running out of memory if you create billions
of them...)
> 
> >From yu command pattern's point of view, symbols will be fast because
> they're integers, and also (depending on you implementation) because

Yes, that would help

> they can be used to denote method names in many of Ruby's library
> calls.

Yes, that is a plus point -- I noticed that attr is followed by symbol
references...
> 
> 
> Dave
> 
> 
	Thank you,
	Hugh



In This Thread

Prev Next