From: Yukihiro Matsumoto Date: 2005-10-20T08:28:15+09:00 Subject: Re: Method annotation and anonymous functions Hi, In message "Re: Method annotation and anonymous functions" on Thu, 20 Oct 2005 03:26:49 +0900, stevetuckner writes: |Anonymous functions: | |x = def (a=1,b=2) { ... } |y = def(a,b=3) begin | ..... |end Probably I will not use "def" for anonymous function, because there are tow major differences in def statement and anonymous def above: * def statement defines new name for a method, anonymous def does not define any name. * besides that, def statement introduces a whole new scope, anonymous def should be a closure, that allows access to external local variables. |Annotated functions: | |class A | def foo(a, b) | .visibility :private # how can this be parsed? (the above |line has no trailing marker to signal it as one expression | .returns Integer | begin | .... | end This is a too big syntactic incompatibility. matz.