jargon

Design patterns·Making things

there are six constructors, each calling the next with one more default, and you count commas to find your argument.

Telescoping constructor

Also calledconstructor telescoping, overloaded constructor chain

The pattern of overloading a constructor repeatedly to fake optional parameters, each version delegating to a longer one. It scales badly the moment two optional parameters have the same type, because the call site becomes positional guesswork and the compiler cannot help. It is the specific problem the builder pattern was popularised to fix, and in languages with named or default arguments it simply does not arise.

Commonly confused with