Dave Thomas <Dave / PragmaticProgrammer.com> writes:

> Say instead that 'def' returned the method object, and you could use
> a def as an rvalue (say as the parameter to a method). Then you could
> write
> 
>     class Rubble
>       synchronized def fred
>         #...
>       end
>     end

(Sorry to follow up my own post, but...)

You'd also be able to write:

    private def internal_method
      # ...
    end


Next will be a call to rename 'def' to that it's consistent:

   module  X   <<
   class   Y   << these two are declarative

   def m       << while this is imperative

   method  m   << this seems more consistent


Then you could write

   private method fred
     # ...
   end

Of course there's a name clash there (With Object#method), but it's
nice to dream :)


Dave