1 00:00:00,870 --> 00:00:05,760 Right, let's have a dictionary. 2 00:00:06,660 --> 00:00:12,090 Is equal to now, you don't actually have to write the word dictionary every time you create a dictionary, 3 00:00:12,390 --> 00:00:18,060 but it does help to specify in your code what kind of thing you're accessing. 4 00:00:18,460 --> 00:00:18,660 Right. 5 00:00:18,720 --> 00:00:24,810 So in this obvious in this case, it's obvious that I know this is a dictionary of ages, but I might 6 00:00:24,810 --> 00:00:26,060 go one step further. 7 00:00:26,340 --> 00:00:27,950 Age, name, dictionary. 8 00:00:28,800 --> 00:00:34,890 Right now, I know exactly what it is and so does the poor guy who has to work on my code text. 9 00:00:35,910 --> 00:00:38,520 To be fair, that could be me or my code next. 10 00:00:38,520 --> 00:00:40,430 And I've forgotten what I did six months ago. 11 00:00:40,440 --> 00:00:42,570 So good naming, good practice. 12 00:00:44,440 --> 00:00:51,130 We don't have to explicitly call it like we did up here with character and string, we could just give 13 00:00:51,130 --> 00:00:55,830 it straight and we can say all the 12 year olds have a list of strings. 14 00:00:56,350 --> 00:00:57,510 One is called Grant. 15 00:00:57,520 --> 00:00:59,140 One is called Mike. 16 00:01:00,780 --> 00:01:02,850 And then all of the 14 year olds. 17 00:01:05,160 --> 00:01:10,920 Oops, I made a mistake already, I should have put my colon in there so all the 12 year olds are granted 18 00:01:10,920 --> 00:01:13,140 like all the 14 year olds are. 19 00:01:14,420 --> 00:01:15,800 Joe and. 20 00:01:19,970 --> 00:01:20,480 Simon. 21 00:01:21,900 --> 00:01:24,180 And that, again, is an array of strings. 22 00:01:24,510 --> 00:01:28,050 So what I've done here is I've used implicit Taiping. 23 00:01:29,630 --> 00:01:35,750 There's nothing in here that tells Swift this is a dictionary, but when it looks at this structure, 24 00:01:35,750 --> 00:01:40,050 it says this must be a dictionary because it's the only thing it could be and nothing else. 25 00:01:40,130 --> 00:01:45,650 If this is an integer, but that's what it does anyway, because it says 12 is probably an integer Sabitha 26 00:01:45,650 --> 00:01:51,050 14 say with these strings and same with the array that surrounds them. 27 00:01:52,070 --> 00:01:59,510 OK, so as you get better and better at coding, you are going to come up against a choice, a choice 28 00:01:59,510 --> 00:02:08,090 between really being really explicit up here and a choice between or a choice to allow the system to 29 00:02:08,120 --> 00:02:11,120 implicitly type all of your variables. 30 00:02:11,820 --> 00:02:17,930 I'm a fan of implicit typing because I come from the C sharp dot net world where the type, the implicit 31 00:02:17,930 --> 00:02:19,040 typing was excellent. 32 00:02:19,310 --> 00:02:21,740 So there were really no issues around that. 33 00:02:23,220 --> 00:02:26,960 Since then, I've used languages where, well, for example, JavaScript. 34 00:02:27,030 --> 00:02:31,980 There is no time, there's just one type, I think it's just strings, whatever it is, and you have 35 00:02:31,980 --> 00:02:38,040 to get everything out of that, which is why TypeScript was invented, because JavaScript sucked for 36 00:02:38,040 --> 00:02:38,280 that. 37 00:02:38,730 --> 00:02:43,890 And TypeScript was a much better experience both for the developer and the end user. 38 00:02:44,880 --> 00:02:46,440 Anyway, where was I going with this? 39 00:02:46,950 --> 00:02:51,780 Yeah, what's become more advanced, you get used to writing things like this and you understand that 40 00:02:51,780 --> 00:02:53,250 the system knows what you want. 41 00:02:53,700 --> 00:02:54,120 All right. 42 00:02:54,150 --> 00:02:56,540 Enough of that onto the next one.