Primary constructors are a feature you’ll find in a few programming languages, including F#, Scala, and Kotlin. A primary constructor allows the coder to define a constructor for a type and capture the constructor parameters to use in initialization expressions throughout the rest of the type definition.
Primary constructors are a feature you’ll find in a few programming languages, including F#, Scala, and Kotlin. A primary constructor allows the coder to define a constructor for a type and capture the constructor parameters to use in initialization expressions throughout the rest of the type definition.
(http://odetocode.com/blogs/scott/archive/2014/08/14/c-6-0-features-part-ii-primary-constructors.aspx)