Strictly speaking, B
is not an option to emulate optional parameters, because it is equivalent to "forget about using default parameters, always pass all the arguments". The A
option, on the other hand, lets you emulate optional parameters "on the cheap": by adding an overload that passes the optional parameter explicitly you get the functionality that you want.
The ugly part about option A
is that the number of required overloads is equal to the number of optional parameters, so if you have three or four optional parameters, you would need two or three overloads.
Of course another option that is not truly equivalent is using a function with variable number of parameters. The problem with that approach is that once the types of your optional parameters start to diverge, you need to drop the compile-time type safety, which is rather undesirable.