From 2532d0b1fccb4a61c6b39a0ede85ac9d7a5b5a20 Mon Sep 17 00:00:00 2001 From: Saul Fuhrmann Date: Thu, 17 Oct 2019 15:53:40 -0700 Subject: [PATCH] Remove Readme small mistake (?) Computer -> Robot --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index d592ea7..dc0ddc3 100644 --- a/Readme.md +++ b/Readme.md @@ -37,7 +37,7 @@ struct Robot { } ``` -The swift compiler draws a sharp distinction between a `foo: Person` variable and a `bar: Computer` variable; a quick *option-click* type-reveal immediaely informs us of the kind of data carried by the variable, and there is no danger of accidentally passing a `Computer` to a function that expects a `Person`. +The swift compiler draws a sharp distinction between a `foo: Person` variable and a `bar: Robot` variable; a quick *option-click* type-reveal immediaely informs us of the kind of data carried by the variable, and there is no danger of accidentally passing a `Robot` to a function that expects a `Person`. However the same is *not* true when we look at `Person`'s `age: Int` field and at `Robot`'s `id: Int` and `batteryPercentage: Int` fields. Though the fields capture entirely different kinds of data, the compiler can help us with neither clarity nor precision, since in each case all the compiler sees is an `Int`.