You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/06_productivity_boosters/01_namedArguments.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Named Arguments
2
2
3
-
As most of programming languages (Java, C++, and other), Kotlin supports passing arguments to methods and constructors according to their order of definition.
4
-
Kotlin also supports [named arguments](https://kotlinlang.org/docs/reference/functions.html#named-arguments) to allow clearer invocations and avoid mistakes in arguments order. Such mistakes are hard to find because they are not detected by the compiler, for example, if two sequential arguments have the same type.
3
+
As with most other programming languages (Java, C++, etc.), Kotlin supports passing arguments to methods and constructors according to the order they are defined.
4
+
Kotlin also supports [named arguments](https://kotlinlang.org/docs/reference/functions.html#named-arguments) to allow clearer invocations and avoid mistakes with the order of arguments. Such mistakes are hard to find because they are not detected by the compiler, for example, when two sequential arguments have the same type.
Copy file name to clipboardExpand all lines: examples/06_productivity_boosters/03_Destructuring Declarations.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Destructuring Declarations
2
2
3
-
[Destructuring declaration](https://kotlinlang.org/docs/reference/multi-declarations.html#destructuring-declarations) syntax can be very handy when you need an instance only for accessing its members. It lets you define the instance without a specific name therefore saving a few lines of code.
3
+
[Destructuring declaration](https://kotlinlang.org/docs/reference/multi-declarations.html#destructuring-declarations) syntax can be very handy, especially when you need an instance only for accessing its members. It lets you define the instance without a specific name therefore saving a few lines of code.
Copy file name to clipboardExpand all lines: examples/06_productivity_boosters/04_Smart Casts.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ fun main() {
38
38
39
39
</div>
40
40
41
-
1.Declaring a nullable variable.
41
+
1.Declares a nullable variable.
42
42
2. Smart-cast to non-nullable (thus allowing direct access to `isLeapYear`).
43
43
3. Smart-cast inside a condition (this is possible because, like Java, Kotlin uses [short-circuiting](https://en.wikipedia.org/wiki/Short-circuit_evaluation)).
44
44
4. Smart-cast inside acondition (also enabled by short-circuiting).
0 commit comments