OK so I’ve finished half a dozen courses and followed the bouncing ball to create apps in CWC and others outside. The thing that strikes me, and annoys me to be honest, is that everyone to a man is coding away and then all of a sudden they put some keyword in and assume everyone just knows that it was obviously missing and that they know what it means and what it does.
Dear lecturers / teachers / experts etc etc… it is not so.
Let me start this topic with this gem:
“Obviously we’ll need to add @
Environment this or that and then a modifier here and there and then this bit here and that bit there. Yes that should do it.”
But what does any of out really mean?
I went looking for Swift @
Environment and was directed as normal to the Apple developers site. Now, to a Swift beginner, this is like reading a diatribe on enzymes and being expected to understand.
Here’s what it says:
“Environment
A property wrapper that reads a value from a view’s environment.”
Could someone take this apart for me, word by word?
For instance, what is “Environment”. We all know that in general it’s the stuff all around us. But what does it mean here, in relation to my app, my OS, my computer? Is it the same as “framework”? Is it sort of the same as “scope”.
Reading further down the Apple article, it appears to be a thing of many parts and variations, none of which mean anything to me, a seeker of knowledge, which I attribute to never having seen anything that describes the environment, for want of a better word, in which we are writing our code.
And then there is the “modifier” .extension, which seems to indicate that one can ‘extend’ this environment, Extend the environment? how is this different from ‘putting something into’ the environment.
I have my theories about what this ‘environment’ is, but id love to hear what others think it is and if possible, a link to a formal definition that is written for the masses, not the experience developers.