variables with a name ending in question mark

Discussion in 'Ruby' started by Roger Pack, Oct 1, 2007.

  1. Roger Pack

    Roger Pack Guest

    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-forum.com/.
     
    Roger Pack, Oct 1, 2007
    #1
    1. Advertising

  2. Harold Hausman, Oct 1, 2007
    #2
    1. Advertising

  3. Roger Pack

    John Joyce Guest

    variables ending with ? are not valid in Ruby.
    They would not be useful.
    Methods ending in ? normally return true or false.
     
    John Joyce, Oct 1, 2007
    #3
  4. Roger Pack

    Roger Pack Guest

    Roger Pack, Oct 1, 2007
    #4
  5. On 10/1/07, Roger Pack <> wrote:
    > Harold Hausman wrote:
    > > On 10/1/07, Roger Pack <> 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/theseYelpsAndSquealsAreTotallyValid.htm=

    l


    >
    > Question: are these YelpsAndSqueals used much?



    As Jos=E9 Jim=E9nez
    http://en.wikipedia.org/wiki/José_Jiménez_(character) 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'


    --=20
    Rick DeNatale

    My blog on Ruby
    http://talklikeaduck.denhaven2.com/
     
    Rick DeNatale, Oct 2, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cirene
    Replies:
    5
    Views:
    584
    Cirene
    May 17, 2008
  2. drodrig
    Replies:
    3
    Views:
    1,284
    drodrig
    Aug 17, 2010
  3. Roger Pack

    array ending syntax question

    Roger Pack, Jul 15, 2008, in forum: Ruby
    Replies:
    3
    Views:
    109
    Frederick Cheung
    Jul 15, 2008
  4. Replies:
    3
    Views:
    88
  5. Jimolo
    Replies:
    2
    Views:
    214
    Gregor Kofler
    Jan 20, 2008
Loading...

Share This Page