In article <41115242.1020602 / illuzionz.org>, Rando Christensen
<eyez / illuzionz.org> wrote:

> I don't think you're right on this point. In the case that was
> presented:
> 
>  >   0.75 case
>  >     normal_hit
>  >   end
> 
> Does this mean 0.75 and above, or 0.75 and below? You won't know
> this unless you look up the macro's definition. 

The macro is called percent-case for a reason. "0.75 case" means that
case will be taken 75% of the time. It should be possible to change the
macro so that it would support things like "75% case" which might be
better if you want a macro that may be used in apps where its usage
would be uncommon.

> The macro version has made the code much less clear in my mind, which is
> precisely the argument against macros in ruby.

I don't see that. In any non-trivial program there's plenty of code
that isn't perfectly intentional. I'm sure you don't consider method
calls a bad thing because it's often not clear exactly what they do.
Macros are no different: they can make code clearer than hand-coding
the solution, but if you're not familiar with the app you'll probably
have to familiarize yourself with the commonly used macros just as you
would do with the commonly used classes.

  -- Jesse