Slide 19
Slide 19 text
Nested Functions
car(
color(Color.WHITE),
transmission(
type(Transmission.Type.CONTINOUSLY_VARIABLE),
),
engine(
type(Engine.Type.FUEL),
power(73),
cylinder(4)
),
engine(
type(Engine.Type.ELECTRIC),
power(60)
)
);
+ no need for context variables
̶ higher punctuation noise
+ hierarchic structure is echoed by function nesting
̶ inverted evaluation order
̶ arguments defined by position
rather than name
̶ rigid list of arguments or
need of methods overloading