--------------060708070505030300090705
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Paul Brannan wrote:

>On Thu, Oct 20, 2005 at 03:26:49AM +0900, stevetuckner wrote:
>  
>
>>I want to start a discussion about two things that Matz talked about at 
>>   def foo2(a, b).visibility(private).returns(Integer) { ... }
>>    
>>
>
>I think what most people have in mind is something like this:
>
>  private def foo(a, b, c)
>    # ...
>  end
>
>  private module_function def bar(a, b, c)
>    # ...
>  end
>  
>
What I don't like about that proposal is that these annotations only 
take one argument (the symbol) and aren't applied to a Method object 
(where the annotations rightly should reside).

>Chaining the annotations on multiple lines can be done using '\':
>
>  private \
>  module_function \
>  doc("This is a docstring") \
>  def baz(a, b, c)
>    # ...
>  end
>  
>
Aside from looking icky, how does doc() know what symbol to use to apply 
the annotation with?

>This also requires changine private() and module_function() to return a
>Symbol rather than a Module (i.e. to return their parameter rather than
>self).
>
>See RCR#277 for more information.
>
>Paul
>
>
>
>
>  
>


--------------060708070505030300090705--