diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-03 02:02:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 02:02:49 -0700 |
commit | 616e40816dfdf90c2418477327729169db0274b3 (patch) | |
tree | 0b5ae76e529c34f6648442815f535626eaeebf69 /swift.html.markdown | |
parent | 3e22775a641831a82c59a3b6197240b2fcd9a76b (diff) | |
parent | 638494ae2a0c089717f2bfff965da52e3b15a4f9 (diff) |
Merge branch 'master' into elixir-casing
Diffstat (limited to 'swift.html.markdown')
-rw-r--r-- | swift.html.markdown | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swift.html.markdown b/swift.html.markdown index e46dcc75..36124e11 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -679,6 +679,9 @@ class Rect: Shape { // A simple class `Square` extends `Rect` class Square: Rect { + // Use a convenience initializer to make calling a designated initializer faster and more "convenient". + // Convenience initializers call other initializers in the same class and pass default values to one or more of their parameters. + // Convenience initializers can have parameters as well, which are useful to customize the called initializer parameters or choose a proper initializer based on the value passed. convenience init() { self.init(sideLength: 5) } |