logo       

Re: two things about defs: msg#00490

lang.scala

Subject: Re: two things about defs

Alexander Sergeev <as.beta@xxxxxxxxx> writes:
> A-ha.. I got it. So function is an instance of a method,
> lambda-abstractions (closures) produces functions and so on.
>
> However, wouldn't one concept be enough? Should the user know that the
> function is an instantiated method? In my case it conflicted with my
> common sense.

FWIW, the language specification makes the distinction. In the spec,
there are no method values. Instead, if you try to use a method
as a value, it gets turned into a closure.

I don't know why the spec distinguishes these things, but it does mean
the compiler and interpreter are at least loyal to the spec.


-Lex





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise