GGaramuno,

>but I had to read the line 2 or 3 times before I realized where times()
even was and where its block begun,

2 or 3 times? And you're even a newbie!!! Amazing. Go look at some Perl code
and tell me if it takes you less then 2 or 3 times to translate to yourself
in your head.

Since you said you were a newbie to Ruby I'd like to state, "Don't go
ranting off how ruby is this and ruby is that." It just doesn't make sense
to make those judgements because you use Python. Use both, then make a
judgement call. I did. I picked Ruby at the end. ;) I dont' expect you to,
but I'd expect you to use the language before judging it.

Zach






-----Original Message-----
From: GGarramuno [mailto:GGarramuno / aol.com]
Sent: Thursday, January 22, 2004 3:55 PM
To: ruby-talk ML
Subject: Re: New to Python: my impression v. Perl/Ruby


"John W. Kennedy" <jwkenne / attglobal.net> wrote in message
news:<fpIPb.57035$OM2.16265939 / news4.srv.hcvlny.cv.net>...

> 	tprime = (1 << n) - 1
> 	test = 4
> 	(n - 2).times {test = (test * test - 2) % tprime}
> 	puts "(2**#{n})-1, #{tprime}, is prime" if test.zero?

Well, as a new user, that kind of constructs would scare me quite a
lot as an example of times() being used in real code.

Perhaps having been doing too much python has spoiled me, but I had to
read the line 2 or 3 times before I realized where times() even was
and where its block begun, unlike the previous clear examples using
do/end constructs.