[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

variables with a name ending in question mark

Roger Pack

10/1/2007 4:50:00 PM

question?
is that a valid ruby variable name?
if not: would that be a useful feature for ruby to introduce?
if so: should I RCR it?

Thanks!
-Roger
--
Posted via http://www.ruby-....

4 Answers

Harold Hausman

10/1/2007 5:06:00 PM

0

On 10/1/07, Roger Pack <rogerpack2005@gmail.com> wrote:
> question?
> is that a valid ruby variable name?

nope.

> if not: would that be a useful feature for ruby to introduce?

perhaps, but I think it would be hard (impossible?) to do without
breaking this critical functionality:
http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotally...

o.0,
-Harold

John Joyce

10/1/2007 5:43:00 PM

0

variables ending with ? are not valid in Ruby.
They would not be useful.
Methods ending in ? normally return true or false.

Roger Pack

10/1/2007 5:56:00 PM

0

Harold Hausman wrote:
> On 10/1/07, Roger Pack <rogerpack2005@gmail.com> wrote:
>> question?
>> is that a valid ruby variable name?
>
> nope.
>
>> if not: would that be a useful feature for ruby to introduce?
>
> perhaps, but I think it would be hard (impossible?) to do without
> breaking this critical functionality:
> http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotally...
>
> o.0,
> -Harold

Question: are these YelpsAndSqueals used much?
--
Posted via http://www.ruby-....

Rick DeNatale

10/2/2007 6:46:00 PM

0

On 10/1/07, Roger Pack <rogerpack2005@gmail.com> wrote:
> Harold Hausman wrote:
> > On 10/1/07, Roger Pack <rogerpack2005@gmail.com> wrote:
> >> question?
> >> is that a valid ruby variable name?
> >
> > nope.
> >
> >> if not: would that be a useful feature for ruby to introduce?
> >
> > perhaps, but I think it would be hard (impossible?) to do without
> > breaking this critical functionality:
> > http://redhanded.hobix.com/bits/theseYelpsAndSquealsAreTotally...


>
> Question: are these YelpsAndSqueals used much?


As José Jiménez
http://en.wikipedia.org/wiki/Jos%C3%A9_Jim%C3%A9nez_%28ch... in
his "Reluctant Astronaut" role was wont to say in response to the
question, "What's that your'e holding? Is that your crash helmet?"

"Oooo, I hope not1'


--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denh...