----- Original Message ----- 
From: "Eric Hodel" <drbrain / segment7.net>
To: "ruby-talk ML" <ruby-talk / ruby-lang.org>
Sent: Tuesday, April 01, 2003 3:15 PM
Subject: Re: April Fools.


I'll drag it back on-topic with some
suggestions for improving Ruby.

It's still April 1 where I am... ;)

The @ sign is pretty useful for indicating
instance (@) and class (@@) variables.

But I suggest in addition to @foo and @@foo,
we use @@@foo, @@@@foo, and @@@@@foo.
Semantics for these are forthcoming.

As an addition to the reflection API, we can
call nats() ("number of at signs") instead
of counting them:  :@@@@@foo.nats  # 5

We already have =, ==, and ===. I propose
we add ==== and =====. The two new operators
would have semantics of "these are are really,
really equal, no joke" and "these are so equal
they're pretty much the same damn thing"
respectively.

Ruby needs a goto. In the spirit of orthogonality,
let's also add a comefrom.

We need some new keywords to simplify our
control structures.

  if cond1 
    expr1
  else
    expr2
  unless cond2
  inwhichcase
    expr3
  butonlyif
    expr4
  andthenonlywhen
    cond3
  end

Finally, and most importantly:

We all know and love the "!" and "?"
suffixes on method names. But by using two 
suffixes, we can add even more features
to Ruby:

   !?  Modify the receiver, then tell me
       if you really did it
   ?!  A Heisenberg method. Tell me its
       current state, then change that
       state randomly. Sometimes.
   ??  Tell me if this is really the 
       Boolean value I want to check.
   !!  Modify the receiver, and this time
       I *mean* it!


Cheers,
Hal