Right, let's have a dictionary.
Is equal to now, you don't actually have to write the word dictionary every time you create a dictionary,
but it does help to specify in your code what kind of thing you're accessing.
Right.
So in this obvious in this case, it's obvious that I know this is a dictionary of ages, but I might
go one step further.
Age, name, dictionary.
Right now, I know exactly what it is and so does the poor guy who has to work on my code text.
To be fair, that could be me or my code next.
And I've forgotten what I did six months ago.
So good naming, good practice.
We don't have to explicitly call it like we did up here with character and string, we could just give
it straight and we can say all the 12 year olds have a list of strings.
One is called Grant.
One is called Mike.
And then all of the 14 year olds.
Oops, I made a mistake already, I should have put my colon in there so all the 12 year olds are granted
like all the 14 year olds are.
Joe and.
Simon.
And that, again, is an array of strings.
So what I've done here is I've used implicit Taiping.
There's nothing in here that tells Swift this is a dictionary, but when it looks at this structure,
it says this must be a dictionary because it's the only thing it could be and nothing else.
If this is an integer, but that's what it does anyway, because it says 12 is probably an integer Sabitha
14 say with these strings and same with the array that surrounds them.
OK, so as you get better and better at coding, you are going to come up against a choice, a choice
between really being really explicit up here and a choice between or a choice to allow the system to
implicitly type all of your variables.
I'm a fan of implicit typing because I come from the C sharp dot net world where the type, the implicit
typing was excellent.
So there were really no issues around that.
Since then, I've used languages where, well, for example, JavaScript.
There is no time, there's just one type, I think it's just strings, whatever it is, and you have
to get everything out of that, which is why TypeScript was invented, because JavaScript sucked for
that.
And TypeScript was a much better experience both for the developer and the end user.
Anyway, where was I going with this?
Yeah, what's become more advanced, you get used to writing things like this and you understand that
the system knows what you want.
All right.
Enough of that onto the next one.