Swift TIL 2

Initially self-taught back in the early 1980s, I started programming on a ZX81 and I've been in love with software development ever since. My "primary" language has drifted over the years, but as it has I've made an effort to get to know and work with plenty of others.
These days I do a lot of Python/Django/JavaScript work, while having fun working with bioinformaticians and machine learning scientists.
Following on with writing little notes to myself so I remember some key things as I learn about Swift...
I sort of feel like this will make reading code a little harder, so it's one I want to keep in mind. When calling an instance method, if it's not ambiguous, you can omit self. from the call. For example:
class Foo {
private func inner() -> String { "Foo" }
func outer() -> String { inner() + self.inner() }
}
print( Foo().outer() )
This makes me feel a little uneasy, and I strongly suspect I'll always use self. when writing such code: I'm a big fan of the idea that we write code for people, not for compilers.




