I think the reasoning behind doing it this way was...
# getting-started
t
I think the reasoning behind doing it this way was to avoid boilerplate. Often in Java the only thing you do with constructor params is assign them to a class field so the Kotlin team wanted to avoid all that boilerplate and just gave you a way to declare a constructor param as a class property in the constructor itself. For small classes properties will still be located together since usually the first thing in your class body are the class properties and constants.
👍 1