8000 Replace “interface reuse” with “polymorphism” · smashcoding/swift-style-guide@28e5482 · GitHub
[go: up one dir, main page]

Skip to content

Commit 28e5482

Browse files
committed
Replace “interface reuse” with “polymorphism”
1 parent faae2d0 commit 28e5482

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ _Rationale:_ This makes the capturing semantics of `self` stand out more in clos
129129

130130
Unless you require functionality that can only be provided by a class (like identity or deinitializers), implement a struct instead.
131131

132-
Note that inheritance is (by itself) usually _not_ a good reason to use classes, because interface reuse can be provided by protocols, and implementation reuse can be provided through composition.
132+
Note that inheritance is (by itself) usually _not_ a good reason to use classes, because polymorphism can be provided by protocols, and implementation reuse can be provided through composition.
133133

134134
For example, this class hierarchy:
135135

0 commit comments

Comments
 (0)
0