|
Re: two things about defs: msg#00490lang.scala
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> |
|---|---|---|
| Previous by Date: | Re: WHEN and UNLESS, if you will (was: [ANN] Introducing Scala, step 1): 00490, Lex Spoon |
|---|---|
| Next by Date: | How do I use DTD's with Scala 2.3.0's XML object literals?: 00490, Raphael James Cohn |
| Previous by Thread: | Re: two things about defsi: 00490, Alexander Sergeev |
| Next by Thread: | Any way to cut down on memory footprint?: 00490, Warren Henning |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |