have default arguments. However, the same behaviour can be simulated by using method overloading to create overloaded methods of the same name, which take different numbers of arguments; and the versions with fewer arguments simply call the versions with more arguments, with the default arguments as the missing arguments: int MyFunc(int a, int b) { return MyFunc(a, b, 12); } int MyFunc(int a, int b, int c) { /* main implementation here */ } However, in addition to several other disadvantages, since the default arguments are not modeled in the type system, the type of a callback (aka higher-order function) can't express that it accepts either of the overloads nor simulate the default arguments with overloaded functions. Whereas, in JavaScript the non-overloaded function definition can substitute the default when the input value is undefined (regardless if it was implicitly undefined via the argument's absence at the call site or an explicitly passed undefined value); which is modeled as an optional argument parameter type ?: in TypeScript. JavaScript's solution is not resolved statically (i.e. not at compile-time, which is why TypeScript models only the optionality and not the default values in the function's type signature) thus incurs additional runtime overhead, although it does provide more flexibility in that callbacks can independently control their defaults instead of centrally dictated by the (callback's type signature in the) type signature of the function which inputs the callback. The TypeScript solution can be simulated in Java with the Optional type except the analogous of an implicit undefined for each absent argument is an explicit Optional.<Integer>absent() at the call site. Evaluation For every function call default argument values must be passed to the called function. If a default argument value contains side-effects, it is significant when those side effects are evaluated – once for the entire program (at parse time, compile time, or load time), or once per function call, at call time. Python is a notable language that evaluates expressions in default arguments once, at the time the function declaration is evaluated. If evaluation per function call is desired, it can be replicated by having the default argument be a sentinel value, such as None, and then having the body of the function evaluate the default value's side effects only if the sentinel value was passed in. For example: import random def eager(a=random.random()): return a x = eager() y = eager() assert x == y