From: "David A. Black" Date: 2005-10-20T09:40:21+09:00 Subject: Re: Method annotation and anonymous functions Hi -- On Thu, 20 Oct 2005, Jeff Wood wrote: > On 10/19/05, David A. Black wrote: >> Hi -- >> >> On Thu, 20 Oct 2005, Jeff Wood wrote: >> >>> Most languages define some token that specifically states method attribute... >>> Java uses @... since @ isn't a used char otherwise. >>> >>> for us ... it would need to be something else ... >>> >>> and it would simply bind to the function its declared in, just like >>> functions bind to the classes they are declared in. >>> >>> how 'bout >>> >>> def method1( a, b ) >>> ->visibility = true >>> ->returns = int >>> # actually do some work... >>> ... >>> end >>> >>> just thinking out loud... since it would have a new punctuation it >>> wouldn't introduce incompatibility. >> >> Worse: it would introduce new punctuation :-) >> > Yes it would, but I don't see another way to do attribution of methods > without causing compatibility issues .... do you? I think I'm coming from a different perspective. I haven't seen any examples of this that make me think it's worth either incompatibility or new punctuation. I strongly dislike the idea of having a specification of the class of the return value (object) of a method, since that militates against duck typing. But maybe that's just an example. David -- David A. Black dblack@wobblini.net