[#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:6458] Symbols.

From: Hugh Sasse Staff Elec Eng <hgs@...>
Date: 2000-11-20 11:58:02 UTC
List: ruby-talk #6458
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?

I have been trying to use the Command Pattern and have been using strings
to hold the commands.  My tests seem to take about one fifth of the time
doing String#==.  This seems a lot, but I suppose String#== is epensive
because of comapring each character.  If I used Symbols to represent
commands presumably the == would be much faster.  When Programming Ruby
talks about Symbols being like atoms in other langauges, is it this sort
of use that is being considered?  (I remember there were atoms in Prolog,
but can't remember much about them.)  Or is the Symbol class only intended
for reflexive type programming, and to use it like this is an abuse of it?
 
I didn't really play with 1.5.x so I'm not up to speed on this feature.

	Hugh
	hgs@dmu.ac.uk


In This Thread

Prev Next