Top "Default-parameters" questions

A default parameter is a function or method parameter that has a default value provided to it.

Python, default keyword arguments after variable length positional arguments

I thought I could use named parameters after variable-length positional parameters in a function call in Python 2, but I get …

python variadic-functions python-2.x named-parameters default-parameters
Is there a way to use the default value on a non-optional parameter when null is passed?

For example, if I have the following data class: data class Data( val name: String = "", val number: Long = 0 ) And functions …

kotlin nullable default-parameters
JavaScript function with optional parameters

I'm new to JavaScript coming from Python background. In Python parameters can be passed as key and value as such: …

javascript named-parameters default-parameters
Why C++ CLI has no default argument on managed types?

The following line has the error Default argument is not allowed. public ref class SPlayerObj{ private: void k(int s = 0){ //…

visual-c++ c++-cli default-parameters
Default template parameter partial specialization

Please explain to me why the following piece of code complies and works perfectly. I am very confused. #include<…

c++ templates specialization default-parameters
Why can't I have template and default arguments?

I changed a paremeter in a function to accept any kind of object using a template but I can't use …

c++ templates default-parameters
Scala extra no-arg constructor plus default constructor parameters

I am using the Scala 2.8 default parameters on a constructor, and for Java compatibility reasons, I wanted a no-arg constructor …

scala constructor default-parameters scala-java-interop
Platform independent /dev/null in c++

Possible Duplicate: Implementing a no-op std::ostream Is there any stream equivalent of NULL in c++? I want to write …

c++ stream ostream default-parameters