On Sat, Jun 6, 2009 at 14:56, Stepan Koltsov
<stepancheg@...> wrote:
Hi, all.
I've just read latest version of named and default arguments specification
http://www.scala-lang.org/sid/1
In first version of specification, unset arguments were passed by
extra mask parameter.
In this verison, for each argument with default value extra method is created.
First version has an advantage of much simpler bytecode (only one
extra method in declaration, and no extra method calls at method call
site), so smaller class size, faster code loading, reduced memory
usage and so on.
What are advantages of current specification?
IIRC, the first version didn't work well for
- call site evaluation order
- subclassing (inheriting / adding / overridding defaults)
Lukas