WEBVTT

1
00:00:01.695 --> 00:00:02.985
<00:00:01.695>Good <00:00:02.275>morning <00:00:02.856>everyone.

2
00:00:04.115 --> 00:00:07.865
<00:00:04.115>Hello <00:00:04.255>and <00:00:04.395>welcome <00:00:04.535>to <00:00:04.675>We <00:00:04.815>Are <00:00:04.955>Developers <00:00:05.095>20, <00:00:05.235>23, <00:00:05.375>day <00:00:05.515>Two.

3
00:00:09.145 --> 00:00:11.545
<00:00:09.145>Everyone <00:00:09.320>got <00:00:09.495>in <00:00:09.670>there? <00:00:09.844>Caffeine, <00:00:10.020>fixed <00:00:10.195>early <00:00:10.370>this <00:00:10.545>morning.

4
00:00:12.685 --> 00:00:17.225
<00:00:12.685>Coffee. <00:00:13.385>Okay, <00:00:14.085>gotcha.

5
00:00:17.535 --> 00:00:21.305
<00:00:17.535>Okay, <00:00:17.675>so <00:00:17.815>hi, <00:00:17.955>my <00:00:18.095>name <00:00:18.235>is <00:00:18.375>Lisa. <00:00:18.515>Welcome <00:00:18.655>to <00:00:18.795>stage <00:00:18.935>three.

6
00:00:22.025 --> 00:00:25.025
<00:00:22.025>I <00:00:22.180>am <00:00:22.336>super <00:00:22.491>happy <00:00:22.647>to <00:00:22.802>introduce <00:00:22.958>you <00:00:23.113>to <00:00:23.269>this <00:00:23.424>day.

7
00:00:25.605 --> 00:00:30.545
<00:00:25.605>So <00:00:25.805>of <00:00:26.005>course <00:00:26.205>welcome <00:00:26.405>everyone <00:00:26.605>then <00:00:26.805>obligatory <00:00:27.005>thank

8
00:00:30.645 --> 00:00:31.985
<00:00:30.645>you <00:00:31.047>for <00:00:31.448>being <00:00:31.851>here.

9
00:00:32.125 --> 00:00:35.025
<00:00:32.125>Thanks <00:00:32.325>to <00:00:32.525>our <00:00:32.725>sponsors, <00:00:32.925>media <00:00:33.125>partners, <00:00:33.325>business <00:00:33.525>partners,

10
00:00:35.025 --> 00:00:36.705
<00:00:35.025>community <00:00:35.491>partners, <00:00:35.958>literally <00:00:36.425>everyone.

11
00:00:37.455 --> 00:00:40.265
<00:00:37.455>Very <00:00:37.655>quick <00:00:37.855>code <00:00:38.055>of <00:00:38.254>conduct, <00:00:38.455>this <00:00:38.655>is <00:00:38.855>important.

12
00:00:40.265 --> 00:00:41.825
<00:00:40.265>Please <00:00:40.545>be <00:00:40.825>nice <00:00:41.105>to <00:00:41.385>each <00:00:41.665>other.

13
00:00:59.925 --> 00:01:04.145
<00:00:59.925>And <00:01:00.080>with <00:01:00.236>that <00:01:00.391>I <00:01:00.547>have <00:01:00.702>the <00:01:00.858>honor <00:01:01.013>to <00:01:01.169>introduce <00:01:01.324>you,

14
00:01:04.725 --> 00:01:08.865
<00:01:04.724>Yan <00:01:04.864>Mulah, <00:01:05.004>John <00:01:05.144>Yan <00:01:05.285>will <00:01:05.425>be <00:01:05.565>talking <00:01:05.705>about <00:01:05.845>c <00:01:05.985>plus <00:01:06.125>plus

15
00:01:09.225 --> 00:01:10.825
<00:01:09.225>features <00:01:09.574>you <00:01:09.925>might <00:01:10.274>not <00:01:10.625>know.

16
00:01:13.375 --> 00:01:16.185
<00:01:13.375>It's <00:01:13.575>super <00:01:13.775>important <00:01:13.975>to <00:01:14.175>mention <00:01:14.375>he's <00:01:14.575>a <00:01:14.775>member

17
00:01:16.185 --> 00:01:18.865
<00:01:16.185>of <00:01:16.418>the <00:01:16.651>c <00:01:16.885>plus <00:01:17.118>plus <00:01:17.351>standardization <00:01:17.585>committee.

18
00:01:19.125 --> 00:01:22.265
<00:01:19.125>So <00:01:19.265>we <00:01:19.405>really <00:01:19.545>have <00:01:19.685>plus <00:01:19.825>like <00:01:19.965>the <00:01:20.105>gems <00:01:20.245>here <00:01:20.385>on <00:01:20.525>stage.

19
00:01:22.325 --> 00:01:24.545
<00:01:22.325>So <00:01:22.500>please <00:01:22.675>welcome <00:01:22.850>him, <00:01:23.025>give <00:01:23.200>him <00:01:23.375>a <00:01:23.550>warm <00:01:23.725>applause.

20
00:01:25.165 --> 00:01:28.345
<00:01:25.164>It <00:01:25.304>is <00:01:25.445>free <00:01:25.585>coffee, <00:01:25.725>post <00:01:25.865>coffee <00:01:26.005>for <00:01:26.145>you <00:01:26.285>as <00:01:26.425>well. <00:01:26.565>Welcome.

21
00:01:34.375 --> 00:01:34.665
Okay,

22
00:01:46.575 --> 00:01:47.665
<00:01:46.575>Yeah, <00:01:47.065>so <00:01:47.556>welcome.

23
00:01:48.445 --> 00:01:51.065
<00:01:48.445>Um, <00:01:48.619>I'm <00:01:48.794>gonna <00:01:48.970>talk <00:01:49.145>about <00:01:49.320>c <00:01:49.494>plus <00:01:49.669>plus <00:01:49.845>features.

24
00:01:51.065 --> 00:01:53.185
<00:01:51.065>You <00:01:51.220>might <00:01:51.376>not <00:01:51.531>know <00:01:51.687>I <00:01:51.842>was <00:01:51.998>promised <00:01:52.153>half <00:01:52.309>an <00:01:52.465>hour,

25
00:01:53.325 --> 00:01:55.305
<00:01:53.325>but <00:01:53.465>the <00:01:53.605>introduction <00:01:53.745>and <00:01:53.885>the <00:01:54.025>video <00:01:54.165>takes <00:01:54.305>a <00:01:54.445>bit <00:01:54.585>of <00:01:54.725>time.

26
00:01:55.485 --> 00:01:56.825
<00:01:55.485>So <00:01:55.726>let's <00:01:55.967>see <00:01:56.208>how <00:01:56.449>it <00:01:56.691>goes.

27
00:01:57.775 --> 00:01:59.825
<00:01:57.775>I've <00:01:57.975>given <00:01:58.175>this <00:01:58.375>talk <00:01:58.575>already, <00:01:58.775>so, <00:01:58.975>uh, <00:01:59.175>just

28
00:01:59.825 --> 00:02:02.065
<00:01:59.825>to <00:02:00.000>share <00:02:00.175>your <00:02:00.350>expectations, <00:02:00.525>I <00:02:00.700>wanna <00:02:00.875>share <00:02:01.050>some <00:02:01.225>feedback.

29
00:02:02.325 --> 00:02:04.585
<00:02:02.325>So <00:02:02.480>people <00:02:02.636>said <00:02:02.791>it's <00:02:02.947>a <00:02:03.102>wonderful <00:02:03.258>talk, <00:02:03.413>discovered <00:02:03.569>a <00:02:03.725>lot

30
00:02:04.585 --> 00:02:06.865
<00:02:04.585>of <00:02:04.785>new <00:02:04.985>features, <00:02:05.184>somebody <00:02:05.384>else <00:02:05.585>had <00:02:05.785>a <00:02:05.985>slightly

31
00:02:06.865 --> 00:02:08.265
<00:02:06.865>different <00:02:07.179>view <00:02:07.494>of <00:02:07.809>the <00:02:08.125>talk.

32
00:02:08.535 --> 00:02:10.785
<00:02:08.535>Most <00:02:08.768>of <00:02:09.001>the <00:02:09.234>features <00:02:09.468>are <00:02:09.701>bad <00:02:09.935>practices

33
00:02:11.205 --> 00:02:12.825
<00:02:11.205>or <00:02:11.438>someone <00:02:11.671>put <00:02:11.905>it <00:02:12.138>even <00:02:12.371>more <00:02:12.605>drastically.

34
00:02:13.085 --> 00:02:14.945
<00:02:13.085>Uh, <00:02:13.365>must <00:02:13.645>things <00:02:13.925>were <00:02:14.205>intentionally <00:02:14.485>horrifying.

35
00:02:15.485 --> 00:02:17.025
<00:02:15.485>So <00:02:15.716>yeah, <00:02:15.947>there, <00:02:16.178>there <00:02:16.409>is <00:02:16.640>a <00:02:16.871>reason

36
00:02:17.045 --> 00:02:18.185
<00:02:17.045>you <00:02:17.250>might <00:02:17.455>not <00:02:17.660>know <00:02:17.865>these <00:02:18.071>features.

37
00:02:18.605 --> 00:02:21.025
<00:02:18.605>Um, <00:02:18.744>some <00:02:18.885>of <00:02:19.024>them <00:02:19.165>are <00:02:19.304>practical, <00:02:19.445>some <00:02:19.584>of <00:02:19.725>them <00:02:19.864>really <00:02:20.005>aren't.

38
00:02:21.205 --> 00:02:23.905
<00:02:21.204>So <00:02:21.380>let's <00:02:21.554>just <00:02:21.730>get <00:02:21.904>started. <00:02:22.079>This <00:02:22.255>is <00:02:22.429>a <00:02:22.605>classic.

39
00:02:24.085 --> 00:02:25.785
<00:02:24.085>Um, <00:02:24.240>we've <00:02:24.396>got <00:02:24.551>an <00:02:24.707>array. <00:02:24.862>We <00:02:25.018>want <00:02:25.173>to <00:02:25.329>index <00:02:25.485>into

40
00:02:25.785 --> 00:02:28.545
<00:02:25.785>that <00:02:25.960>array <00:02:26.135>using <00:02:26.310>the <00:02:26.484>air <00:02:26.660>a <00:02:26.835>index <00:02:27.010>operator <00:02:27.185>according

41
00:02:28.545 --> 00:02:30.905
<00:02:28.545>to <00:02:28.720>the <00:02:28.895>standard, <00:02:29.070>this <00:02:29.245>is <00:02:29.420>defined <00:02:29.595>to <00:02:29.770>be <00:02:29.945>equivalent

42
00:02:30.905 --> 00:02:31.985
<00:02:30.905>to <00:02:31.391>pointer <00:02:31.877>automatic.

43
00:02:32.205 --> 00:02:35.065
<00:02:32.204>So <00:02:32.332>we <00:02:32.459>do <00:02:32.586>an <00:02:32.714>in <00:02:32.841>uh, <00:02:32.968>addition <00:02:33.095>and <00:02:33.223>then <00:02:33.350>we <00:02:33.477>de <00:02:33.605>reference,

44
00:02:35.365 --> 00:02:36.625
<00:02:35.365>but <00:02:35.743>addition <00:02:36.121>is <00:02:36.499>commutative.

45
00:02:37.125 --> 00:02:39.145
<00:02:37.125>So <00:02:37.280>you <00:02:37.436>can <00:02:37.591>also <00:02:37.747>write <00:02:37.902>that <00:02:38.058>and <00:02:38.213>if <00:02:38.369>you <00:02:38.525>follow,

46
00:02:39.155 --> 00:02:40.385
<00:02:39.155>apply <00:02:39.524>the <00:02:39.893>definition <00:02:40.262>backwards.

47
00:02:40.735 --> 00:02:41.905
<00:02:40.735>This <00:02:40.998>is <00:02:41.261>equivalent <00:02:41.524>for <00:02:41.788>that

48
00:02:42.135 --> 00:02:44.305
<00:02:42.135>because <00:02:42.368>the <00:02:42.601>airway <00:02:42.834>index <00:02:43.068>operator <00:02:43.301>is <00:02:43.535>commutative.

49
00:02:46.085 --> 00:02:48.025
<00:02:46.085>If <00:02:46.318>you <00:02:46.551>have <00:02:46.785>a <00:02:47.018>stood <00:02:47.251>away, <00:02:47.485>unfortunately

50
00:02:48.095 --> 00:02:49.105
<00:02:48.095>that <00:02:48.398>one <00:02:48.701>doesn't <00:02:49.004>work

51
00:02:49.105 --> 00:02:51.385
<00:02:49.105>because <00:02:49.338>every <00:02:49.571>the <00:02:49.804>index <00:02:50.038>there <00:02:50.271>is <00:02:50.505>defined

52
00:02:51.385 --> 00:02:54.865
<00:02:51.385>to <00:02:51.512>be <00:02:51.639>a <00:02:51.766>member <00:02:51.894>function <00:02:52.021>call <00:02:52.148>and <00:02:52.275>that <00:02:52.403>is <00:02:52.530>a <00:02:52.657>compiler <00:02:52.785>error

53
00:02:54.865 --> 00:02:56.545
<00:02:54.865>because <00:02:55.098>it <00:02:55.331>doesn't <00:02:55.565>have <00:02:55.798>a <00:02:56.031>member <00:02:56.265>function,

54
00:02:56.635 --> 00:02:57.785
<00:02:56.635>which <00:02:56.893>is <00:02:57.152>a <00:02:57.411>really <00:02:57.670>shame

55
00:02:57.925 --> 00:03:00.005
<00:02:57.925>and <00:02:58.158>one <00:02:58.391>downside <00:02:58.625>of <00:02:58.858>using <00:02:59.091>stood <00:02:59.325>away

56
00:03:00.005 --> 00:03:01.045
<00:03:00.005>as <00:03:00.239>opposed <00:03:00.472>to <00:03:00.707>builtin <00:03:00.940>ones.

57
00:03:03.475 --> 00:03:05.165
<00:03:03.475>When <00:03:03.674>we <00:03:03.875>have, <00:03:04.075>i, <00:03:04.275>I <00:03:04.475>never <00:03:04.674>like <00:03:04.875>that.

58
00:03:05.265 --> 00:03:07.485
<00:03:05.265>So <00:03:05.464>we've <00:03:05.665>got <00:03:05.864>two <00:03:06.065>du, <00:03:06.265>we <00:03:06.464>declare <00:03:06.665>them

59
00:03:07.505 --> 00:03:09.125
<00:03:07.505>but <00:03:07.785>this <00:03:08.065>is <00:03:08.345>a <00:03:08.625>bit <00:03:08.905>misaligned.

60
00:03:09.225 --> 00:03:11.605
<00:03:09.225>Um, <00:03:09.458>luckily <00:03:09.691>you <00:03:09.924>can <00:03:10.158>use <00:03:10.391>plus <00:03:10.625>instead.

61
00:03:11.665 --> 00:03:13.365
<00:03:11.665>So <00:03:11.864>um, <00:03:12.065>this <00:03:12.265>is <00:03:12.465>now <00:03:12.665>a <00:03:12.864>nicely <00:03:13.065>aligned

62
00:03:13.465 --> 00:03:16.725
<00:03:13.465>but <00:03:13.620>plus <00:03:13.776>actually <00:03:13.931>isn't <00:03:14.087>part <00:03:14.242>of <00:03:14.398>the <00:03:14.553>inte <00:03:14.709>literal <00:03:14.865>syntax.

63
00:03:16.725 --> 00:03:17.965
<00:03:16.725>This <00:03:17.004>is <00:03:17.283>a <00:03:17.562>regular <00:03:17.841>expression

64
00:03:18.585 --> 00:03:21.125
<00:03:18.585>and <00:03:18.740>it <00:03:18.896>is <00:03:19.051>defined <00:03:19.207>to <00:03:19.362>be <00:03:19.518>equivalent <00:03:19.673>to <00:03:19.829>do <00:03:19.985>nothing.

65
00:03:21.265 --> 00:03:22.885
<00:03:21.265>It <00:03:21.614>returns <00:03:21.964>the <00:03:22.315>argument <00:03:22.665>unchanged

66
00:03:23.305 --> 00:03:25.765
<00:03:23.305>but <00:03:23.460>it <00:03:23.616>does <00:03:23.771>integral <00:03:23.927>promotion <00:03:24.082>so <00:03:24.238>it <00:03:24.393>changes <00:03:24.549>the <00:03:24.705>type.

67
00:03:26.635 --> 00:03:28.885
<00:03:26.635>This <00:03:26.790>means <00:03:26.946>that <00:03:27.101>when <00:03:27.257>you <00:03:27.412>have <00:03:27.568>an <00:03:27.723>unsigned <00:03:27.879>short <00:03:28.035>antibody

68
00:03:28.885 --> 00:03:31.405
<00:03:28.885>plus <00:03:29.060>S, <00:03:29.234>the <00:03:29.410>result <00:03:29.584>is <00:03:29.760>actually <00:03:29.935>an <00:03:30.109>int <00:03:30.285>because

69
00:03:31.645 --> 00:03:32.645
<00:03:31.645>whenever <00:03:31.773>C <00:03:31.902>plus <00:03:32.030>does <00:03:32.159>you <00:03:32.287>have <00:03:32.416>a <00:03:32.545>type

70
00:03:32.645 --> 00:03:34.925
<00:03:32.645>that's <00:03:32.820>smaller <00:03:32.995>than <00:03:33.170>int <00:03:33.345>it'll <00:03:33.520>be <00:03:33.695>promoted <00:03:33.870>to <00:03:34.045>in

71
00:03:35.205 --> 00:03:37.565
<00:03:35.204>whenever <00:03:35.484>you <00:03:35.765>do <00:03:36.045>any <00:03:36.325>arithmetic <00:03:36.605>pivot.

72
00:03:38.145 --> 00:03:39.165
<00:03:38.145>So <00:03:38.604>that's <00:03:39.063>nice.

73
00:03:39.945 --> 00:03:42.605
<00:03:39.945>Um, <00:03:40.072>when <00:03:40.199>you <00:03:40.326>have <00:03:40.454>an <00:03:40.581>enum, <00:03:40.708>likewise <00:03:40.835>if <00:03:40.963>you <00:03:41.090>will <00:03:41.217>get <00:03:41.345>the

74
00:03:42.605 --> 00:03:44.925
<00:03:42.605>underlying <00:03:42.838>type <00:03:43.071>out <00:03:43.304>of <00:03:43.538>the <00:03:43.771>enum, <00:03:44.005>um,

75
00:03:44.985 --> 00:03:48.245
<00:03:44.985>if <00:03:45.101>you <00:03:45.218>have <00:03:45.335>an <00:03:45.451>array <00:03:45.568>you <00:03:45.685>will <00:03:45.801>do <00:03:45.918>a <00:03:46.035>trigger <00:03:46.151>conversion <00:03:46.268>into <00:03:46.385>a

76
00:03:48.245 --> 00:03:49.765
<00:03:48.245>pointer <00:03:48.518>to <00:03:48.792>get <00:03:49.065>the <00:03:49.339>result <00:03:49.613>out.

77
00:03:50.185 --> 00:03:54.325
<00:03:50.185>And <00:03:50.292>if <00:03:50.400>you <00:03:50.508>have <00:03:50.615>a <00:03:50.723>lambda, <00:03:50.831>so <00:03:50.938>this <00:03:51.046>is <00:03:51.154>uh, <00:03:51.261>this <00:03:51.369>is <00:03:51.477>a <00:03:51.585>lambda,

78
00:03:54.425 --> 00:03:56.405
<00:03:54.425>it <00:03:54.625>doesn't <00:03:54.825>capture <00:03:55.025>anything <00:03:55.225>and <00:03:55.425>it <00:03:55.625>does <00:03:55.825>nothing

79
00:03:56.425 --> 00:03:58.565
<00:03:56.425>but <00:03:56.600>it <00:03:56.775>is <00:03:56.950>implicitly <00:03:57.125>convertible <00:03:57.300>to <00:03:57.475>a <00:03:57.650>function <00:03:57.825>pointer

80
00:03:58.565 --> 00:04:00.645
<00:03:58.565>and <00:03:58.740>you <00:03:58.915>can <00:03:59.090>trigger <00:03:59.265>that <00:03:59.440>conversion <00:03:59.615>by <00:03:59.790>prefixing <00:03:59.965>it

81
00:04:00.645 --> 00:04:03.085
<00:04:00.645>with <00:04:00.845>plus <00:04:01.045>the <00:04:01.245>last <00:04:01.445>one <00:04:01.645>is <00:04:01.845>actually <00:04:02.045>useful.

82
00:04:03.905 --> 00:04:08.715
<00:04:03.905>So <00:04:04.185>oh <00:04:04.465>my, <00:04:04.745>okay, <00:04:05.025>so <00:04:05.305>uh,

83
00:04:08.715 --> 00:04:11.155
<00:04:08.715>in <00:04:08.831>c <00:04:08.948>plus <00:04:09.065>plus <00:04:09.181>11 <00:04:09.298>you <00:04:09.415>only <00:04:09.531>want <00:04:09.648>to <00:04:09.765>have <00:04:09.881>a <00:04:09.998>function <00:04:10.115>pointer

84
00:04:11.155 --> 00:04:12.275
<00:04:11.155>as <00:04:11.407>a <00:04:11.659>non-type <00:04:11.911>template <00:04:12.163>parameter.

85
00:04:12.275 --> 00:04:13.355
<00:04:12.275>You <00:04:12.469>cannot <00:04:12.663>give <00:04:12.858>it <00:04:13.052>a <00:04:13.247>lambda.

86
00:04:13.355 --> 00:04:15.475
<00:04:13.355>You <00:04:13.554>have <00:04:13.755>to <00:04:13.954>use <00:04:14.155>plus <00:04:14.355>to <00:04:14.554>trigger <00:04:14.755>the

87
00:04:15.475 --> 00:04:16.675
<00:04:15.475>conversion <00:04:15.745>to <00:04:16.015>a <00:04:16.285>function <00:04:16.555>pointer.

88
00:04:17.375 --> 00:04:18.635
<00:04:17.375>But <00:04:17.601>since <00:04:17.828>c <00:04:18.055>plus <00:04:18.282>plus <00:04:18.509>20,

89
00:04:18.655 --> 00:04:20.075
<00:04:18.654>you <00:04:18.868>can <00:04:19.080>just <00:04:19.293>pass <00:04:19.507>the <00:04:19.719>lambda <00:04:19.933>directly

90
00:04:20.075 --> 00:04:21.475
<00:04:20.075>as <00:04:20.390>a <00:04:20.704>non-tech <00:04:21.020>template <00:04:21.335>parameter.

91
00:04:21.475 --> 00:04:22.915
<00:04:21.475>So <00:04:21.660>you <00:04:21.845>don't <00:04:22.030>no <00:04:22.215>longer <00:04:22.400>need <00:04:22.585>that <00:04:22.771>trick.

92
00:04:23.055 --> 00:04:25.075
<00:04:23.055>But <00:04:23.288>before <00:04:23.521>that <00:04:23.755>it's <00:04:23.988>was <00:04:24.221>pretty <00:04:24.455>useful.

93
00:04:27.235 --> 00:04:28.805
<00:04:27.235>Then <00:04:27.468>we <00:04:27.701>also <00:04:27.935>have <00:04:28.168>the <00:04:28.401>comm <00:04:28.635>operator.

94
00:04:28.985 --> 00:04:30.845
<00:04:28.985>So <00:04:29.140>this <00:04:29.296>is <00:04:29.451>like <00:04:29.607>why <00:04:29.762>the <00:04:29.918>comm <00:04:30.073>operator <00:04:30.229>was <00:04:30.385>invented.

95
00:04:30.875 --> 00:04:32.485
<00:04:30.875>It's <00:04:31.108>used <00:04:31.341>uh, <00:04:31.575>at <00:04:31.808>the <00:04:32.041>very <00:04:32.275>end

96
00:04:32.485 --> 00:04:35.045
<00:04:32.485>of <00:04:32.640>the <00:04:32.796>follow <00:04:32.951>plus <00:04:33.107>plus <00:04:33.262>left <00:04:33.418>comma <00:04:33.573>minus <00:04:33.729>minus, <00:04:33.885>right?

97
00:04:35.275 --> 00:04:36.765
<00:04:35.275>This <00:04:35.466>is <00:04:35.658>the <00:04:35.849>use <00:04:36.041>of <00:04:36.232>the <00:04:36.424>comma <00:04:36.616>operator.

98
00:04:37.305 --> 00:04:38.885
<00:04:37.305>And <00:04:37.538>what <00:04:37.771>does <00:04:38.005>the <00:04:38.238>comma <00:04:38.471>operator <00:04:38.705>do?

99
00:04:39.395 --> 00:04:41.725
<00:04:39.395>Well <00:04:39.570>you <00:04:39.745>have <00:04:39.919>a <00:04:40.094>pair <00:04:40.270>of <00:04:40.445>expression, <00:04:40.620>it's <00:04:40.794>separated

100
00:04:41.725 --> 00:04:43.885
<00:04:41.725>by <00:04:41.925>a <00:04:42.125>comma, <00:04:42.325>it's <00:04:42.525>evaluated <00:04:42.725>left <00:04:42.925>to <00:04:43.125>right.

101
00:04:43.945 --> 00:04:46.445
<00:04:43.945>So <00:04:44.100>you <00:04:44.256>evaluate <00:04:44.411>the <00:04:44.567>left <00:04:44.722>expression <00:04:44.878>and <00:04:45.033>discard <00:04:45.189>its <00:04:45.344>value

102
00:04:46.705 --> 00:04:48.765
<00:04:46.705>and <00:04:46.860>then <00:04:47.016>you <00:04:47.171>evaluate <00:04:47.327>the <00:04:47.482>right <00:04:47.638>expression <00:04:47.793>and <00:04:47.949>return <00:04:48.104>that.

103
00:04:48.945 --> 00:04:51.005
<00:04:48.945>And <00:04:49.120>this <00:04:49.295>is <00:04:49.469>useful <00:04:49.645>whenever <00:04:49.820>you <00:04:49.995>have <00:04:50.170>multiple <00:04:50.344>expressions

104
00:04:51.005 --> 00:04:52.325
<00:04:51.005>that <00:04:51.203>you <00:04:51.401>want <00:04:51.599>to <00:04:51.796>shove <00:04:51.995>into <00:04:52.193>place

105
00:04:52.325 --> 00:04:55.245
<00:04:52.325>where <00:04:52.452>one <00:04:52.579>expression <00:04:52.706>is <00:04:52.834>useful <00:04:52.961>like <00:04:53.088>in <00:04:53.215>the <00:04:53.343>range <00:04:53.470>in <00:04:53.597>in <00:04:53.724>the

106
00:04:55.245 --> 00:04:56.325
<00:04:55.245>follow <00:04:55.731>loop, <00:04:56.217>um,

107
00:04:56.385 --> 00:04:58.885
<00:04:56.385>but <00:04:56.585>actually <00:04:56.784>become <00:04:56.985>even <00:04:57.185>more <00:04:57.385>useful <00:04:57.585>since <00:04:57.784>we

108
00:04:58.885 --> 00:05:00.005
<00:04:58.885>introduced <00:04:59.389>fold <00:04:59.893>expressions.

109
00:05:00.505 --> 00:05:02.245
<00:05:00.505>So <00:05:00.680>when <00:05:00.855>we <00:05:01.030>have <00:05:01.205>a <00:05:01.380>parameter <00:05:01.555>pack, <00:05:01.730>we <00:05:01.905>want

110
00:05:02.245 --> 00:05:04.645
<00:05:02.245>to <00:05:02.385>call <00:05:02.525>the <00:05:02.665>function <00:05:02.805>on <00:05:02.945>every <00:05:03.085>element <00:05:03.225>of <00:05:03.365>the <00:05:03.505>parameter <00:05:03.645>pack.

111
00:05:04.785 --> 00:05:06.765
<00:05:04.785>You <00:05:04.940>can <00:05:05.096>do <00:05:05.251>a <00:05:05.407>fold <00:05:05.562>expression <00:05:05.718>over <00:05:05.873>the <00:05:06.029>comm <00:05:06.185>operator

112
00:05:06.985 --> 00:05:09.565
<00:05:06.985>and <00:05:07.125>this <00:05:07.265>will <00:05:07.405>in <00:05:07.545>effect <00:05:07.685>call <00:05:07.825>the <00:05:07.965>function <00:05:08.105>on <00:05:08.245>each <00:05:08.385>element

113
00:05:09.585 --> 00:05:12.605
<00:05:09.585>of <00:05:09.724>the <00:05:09.864>pack <00:05:10.005>in <00:05:10.145>order <00:05:10.284>due <00:05:10.424>to <00:05:10.565>the <00:05:10.705>SE <00:05:10.844>sequencing <00:05:10.984>requirements.

114
00:05:12.985 --> 00:05:15.605
<00:05:12.985>So, <00:05:13.140>uh, <00:05:13.296>common <00:05:13.451>operator <00:05:13.607>you <00:05:13.762>really <00:05:13.918>useful <00:05:14.073>when <00:05:14.229>you <00:05:14.385>want

115
00:05:15.605 --> 00:05:16.765
<00:05:15.605>to <00:05:15.953>manipulate <00:05:16.301>fault <00:05:16.649>expressions.

116
00:05:16.995 --> 00:05:18.765
<00:05:16.995>I've <00:05:17.195>written <00:05:17.395>a <00:05:17.595>blog <00:05:17.795>post <00:05:17.995>containing <00:05:18.195>a <00:05:18.395>couple

117
00:05:18.765 --> 00:05:19.845
<00:05:18.765>of <00:05:19.089>fault <00:05:19.413>expression <00:05:19.737>tricks.

118
00:05:19.945 --> 00:05:21.085
<00:05:19.945>Um, <00:05:20.116>you <00:05:20.287>will <00:05:20.457>find <00:05:20.628>the <00:05:20.799>link <00:05:20.971>there

119
00:05:21.085 --> 00:05:22.165
<00:05:21.085>and <00:05:21.246>also <00:05:21.409>all <00:05:21.571>links <00:05:21.733>at <00:05:21.895>the <00:05:22.057>end.

120
00:05:22.545 --> 00:05:25.165
<00:05:22.545>So <00:05:22.700>uh, <00:05:22.856>more <00:05:23.011>tricks <00:05:23.167>you <00:05:23.322>can <00:05:23.478>use <00:05:23.633>with <00:05:23.789>fault <00:05:23.945>expressions

121
00:05:25.185 --> 00:05:26.245
<00:05:25.185>to <00:05:25.662>manipulate <00:05:26.139>ps.

122
00:05:29.555 --> 00:05:31.735
<00:05:29.555>Now <00:05:29.730>SF <00:05:29.905>doesn't <00:05:30.080>actually <00:05:30.255>exist <00:05:30.430>in <00:05:30.605>c <00:05:30.780>plus <00:05:30.955>does

123
00:05:34.125 --> 00:05:36.495
<00:05:34.125>this <00:05:34.280>is <00:05:34.436>a <00:05:34.591>grammar <00:05:34.747>for <00:05:34.902>if <00:05:35.058>you've <00:05:35.213>got <00:05:35.369>regular <00:05:35.525>if

124
00:05:36.495 --> 00:05:38.415
<00:05:36.495>with <00:05:36.635>a <00:05:36.775>statement <00:05:36.915>and <00:05:37.055>you've <00:05:37.195>got <00:05:37.335>an <00:05:37.475>if <00:05:37.615>with <00:05:37.755>a <00:05:37.895>statement

125
00:05:38.415 --> 00:05:40.495
<00:05:38.415>and <00:05:38.570>then <00:05:38.726>EL <00:05:38.881>and <00:05:39.037>then <00:05:39.192>statement <00:05:39.348>there <00:05:39.503>is <00:05:39.659>no <00:05:39.815>lev,

126
00:05:40.645 --> 00:05:43.215
<00:05:40.645>this <00:05:40.772>isn't <00:05:40.899>a <00:05:41.026>thing <00:05:41.154>that <00:05:41.281>uh, <00:05:41.408>is <00:05:41.535>part <00:05:41.663>of <00:05:41.790>C <00:05:41.917>plus <00:05:42.044>does,

127
00:05:43.955 --> 00:05:46.055
<00:05:43.955>but <00:05:44.188>you <00:05:44.421>can <00:05:44.655>offer <00:05:44.888>this <00:05:45.121>write <00:05:45.354>lev.

128
00:05:46.675 --> 00:05:48.855
<00:05:46.675>So <00:05:46.908>what's <00:05:47.141>happening <00:05:47.375>here? <00:05:47.608>Well <00:05:47.841>the <00:05:48.075>ELs

129
00:05:49.155 --> 00:05:50.495
<00:05:49.155>and <00:05:49.356>the <00:05:49.556>if <00:05:49.758>are <00:05:49.959>two <00:05:50.159>separate <00:05:50.361>things.

130
00:05:50.755 --> 00:05:53.535
<00:05:50.755>You've <00:05:50.910>got <00:05:51.066>an <00:05:51.221>A <00:05:51.377>whose <00:05:51.532>statement <00:05:51.688>is <00:05:51.843>another <00:05:51.999>if <00:05:52.155>eight.

131
00:05:53.915 --> 00:05:56.175
<00:05:53.915>So <00:05:54.055>if <00:05:54.195>you <00:05:54.335>put <00:05:54.475>the <00:05:54.615>braces, <00:05:54.755>this <00:05:54.895>is <00:05:55.035>the <00:05:55.175>equivalent <00:05:55.315>code,

132
00:05:56.205 --> 00:05:58.725
<00:05:56.205>it's <00:05:56.344>not <00:05:56.484>a <00:05:56.625>separate <00:05:56.765>construction, <00:05:56.905>you <00:05:57.044>can <00:05:57.185>just <00:05:57.325>use <00:05:57.465>an <00:05:57.604>S

133
00:05:58.825 --> 00:06:00.485
<00:05:58.825>and <00:05:59.025>then <00:05:59.224>an <00:05:59.425>if <00:05:59.625>as <00:05:59.825>a <00:06:00.025>single <00:06:00.224>statement.

134
00:06:00.625 --> 00:06:02.205
<00:06:00.625>And <00:06:00.905>this <00:06:01.185>then <00:06:01.465>forms <00:06:01.745>your <00:06:02.025>sev.

135
00:06:02.865 --> 00:06:04.285
<00:06:02.865>So <00:06:03.078>when <00:06:03.291>you <00:06:03.504>have <00:06:03.717>a <00:06:03.930>company <00:06:04.143>guideline

136
00:06:04.285 --> 00:06:06.965
<00:06:04.285>that <00:06:04.485>says <00:06:04.685>like <00:06:04.885>always <00:06:05.085>use <00:06:05.285>phrases <00:06:05.485>around <00:06:05.685>statements,

137
00:06:06.985 --> 00:06:08.805
<00:06:06.985>you're <00:06:07.265>not <00:06:07.545>following <00:06:07.825>that <00:06:08.105>guideline <00:06:08.385>consistently,

138
00:06:08.805 --> 00:06:10.285
<00:06:08.805>you're <00:06:09.071>making <00:06:09.337>an <00:06:09.604>exception <00:06:09.870>for <00:06:10.137>sev.

139
00:06:10.745 --> 00:06:12.765
<00:06:10.745>But <00:06:10.900>the <00:06:11.056>question <00:06:11.211>is <00:06:11.367>why <00:06:11.522>do <00:06:11.678>we <00:06:11.833>stop <00:06:11.989>at <00:06:12.145>sev?

140
00:06:12.905 --> 00:06:14.645
<00:06:12.905>Why <00:06:13.184>don't <00:06:13.465>we <00:06:13.744>apply <00:06:14.025>that <00:06:14.304>exception

141
00:06:14.645 --> 00:06:15.965
<00:06:14.645>to <00:06:14.942>other <00:06:15.239>control <00:06:15.536>for <00:06:15.832>statements?

142
00:06:16.825 --> 00:06:19.645
<00:06:16.825>So <00:06:16.965>we've <00:06:17.104>got <00:06:17.245>the <00:06:17.385>eight <00:06:17.525>switch, <00:06:17.664>this <00:06:17.805>the <00:06:17.945>exact <00:06:18.085>same <00:06:18.224>logic,

143
00:06:19.645 --> 00:06:20.925
<00:06:19.645>we've <00:06:19.809>got <00:06:19.974>an <00:06:20.138>eight <00:06:20.303>and <00:06:20.467>then <00:06:20.632>the <00:06:20.797>single

144
00:06:20.925 --> 00:06:22.085
<00:06:20.925>statement <00:06:21.186>which <00:06:21.447>is <00:06:21.707>the <00:06:21.969>switch.

145
00:06:22.385 --> 00:06:24.885
<00:06:22.385>And <00:06:22.618>now <00:06:22.851>we <00:06:23.085>have <00:06:23.318>pattern <00:06:23.551>matching, <00:06:23.784>right?

146
00:06:24.885 --> 00:06:26.605
<00:06:24.885>Who <00:06:25.040>needs <00:06:25.196>pattern <00:06:25.351>matching <00:06:25.507>when <00:06:25.662>you <00:06:25.818>have <00:06:25.973>the <00:06:26.129>eight <00:06:26.284>switch,

147
00:06:28.145 --> 00:06:31.725
<00:06:28.145>We <00:06:28.272>all <00:06:28.399>do, <00:06:28.526>we <00:06:28.654>desperately <00:06:28.781>need <00:06:28.908>it <00:06:29.035>but <00:06:29.163>switch <00:06:29.290>on <00:06:29.417>its <00:06:29.544>own.

148
00:06:32.075 --> 00:06:35.645
<00:06:32.075>It's <00:06:32.250>also <00:06:32.425>pretty <00:06:32.599>fun. <00:06:32.775>So <00:06:32.950>this <00:06:33.125>is <00:06:33.300>a <00:06:33.474>switch.

149
00:06:36.225 --> 00:06:38.645
<00:06:36.225>Uh, <00:06:36.425>we've <00:06:36.625>got <00:06:36.825>fall <00:06:37.025>through <00:06:37.225>between <00:06:37.425>different <00:06:37.625>cases.

150
00:06:38.705 --> 00:06:40.485
<00:06:38.705>So <00:06:38.844>we <00:06:38.984>can <00:06:39.125>do <00:06:39.265>something <00:06:39.405>if <00:06:39.544>is <00:06:39.685>one, <00:06:39.825>two <00:06:39.965>or <00:06:40.104>three

151
00:06:40.505 --> 00:06:42.285
<00:06:40.505>and <00:06:40.660>then <00:06:40.816>we've <00:06:40.971>got <00:06:41.127>the <00:06:41.282>default <00:06:41.438>case <00:06:41.593>for <00:06:41.749>anything <00:06:41.905>else.

152
00:06:42.745 --> 00:06:44.525
<00:06:42.745>But <00:06:42.920>the <00:06:43.095>order <00:06:43.270>of <00:06:43.445>the <00:06:43.620>cases <00:06:43.795>actually <00:06:43.970>doesn't <00:06:44.145>matter.

153
00:06:44.905 --> 00:06:49.595
<00:06:44.905>You <00:06:45.032>can <00:06:45.159>put <00:06:45.286>the <00:06:45.414>default, <00:06:45.541>you <00:06:45.668>can <00:06:45.795>put <00:06:45.923>the <00:06:46.050>default <00:06:46.177>case <00:06:46.304>first.

154
00:06:49.975 --> 00:06:51.195
<00:06:49.975>So <00:06:50.158>now <00:06:50.341>the <00:06:50.524>default <00:06:50.707>is <00:06:50.890>in <00:06:51.073>front

155
00:06:51.535 --> 00:06:53.275
<00:06:51.534>and <00:06:51.768>this <00:06:52.001>still <00:06:52.234>does <00:06:52.468>the <00:06:52.701>same <00:06:52.934>thing.

156
00:06:53.275 --> 00:06:54.635
<00:06:53.275>It <00:06:53.580>just <00:06:53.887>looks <00:06:54.193>weird, <00:06:54.498>right?

157
00:06:54.635 --> 00:06:56.875
<00:06:54.635>Because <00:06:54.790>the <00:06:54.946>default <00:06:55.101>is <00:06:55.257>still <00:06:55.412>considered <00:06:55.568>when <00:06:55.723>now <00:06:55.879>on <00:06:56.034>other

158
00:06:56.875 --> 00:06:58.115
<00:06:56.875>label <00:06:57.433>uh, <00:06:57.991>matches.

159
00:06:58.375 --> 00:07:00.395
<00:06:58.375>So <00:06:58.530>it's <00:06:58.686>still <00:06:58.841>only <00:06:58.997>when <00:06:59.152>I <00:06:59.308>is <00:06:59.463>not <00:06:59.619>one, <00:06:59.775>two

160
00:07:00.395 --> 00:07:05.115
<00:07:00.395>or <00:07:00.570>three, <00:07:00.745>You <00:07:00.919>can <00:07:01.094>even <00:07:01.270>put <00:07:01.445>something <00:07:01.620>completely <00:07:01.794>in

161
00:07:05.115 --> 00:07:06.195
<00:07:05.115>front <00:07:05.439>before <00:07:05.763>any <00:07:06.087>labels.

162
00:07:06.215 --> 00:07:07.355
<00:07:06.215>So <00:07:06.385>now <00:07:06.557>we've <00:07:06.728>got <00:07:06.899>a <00:07:07.070>statement <00:07:07.241>there

163
00:07:07.355 --> 00:07:08.515
<00:07:07.355>and <00:07:07.563>that <00:07:07.772>statement <00:07:07.981>is <00:07:08.190>never <00:07:08.399>executed

164
00:07:08.515 --> 00:07:10.035
<00:07:08.515>because <00:07:08.710>there <00:07:08.905>is <00:07:09.101>no <00:07:09.296>label <00:07:09.492>that <00:07:09.687>proceeds <00:07:09.883>it.

165
00:07:10.215 --> 00:07:11.475
<00:07:10.215>So <00:07:10.376>we <00:07:10.539>can <00:07:10.701>just <00:07:10.863>put <00:07:11.025>it <00:07:11.187>in <00:07:11.349>there

166
00:07:11.495 --> 00:07:12.795
<00:07:11.495>and <00:07:11.729>they <00:07:11.963>have <00:07:12.197>the <00:07:12.431>compiler <00:07:12.665>deal

167
00:07:12.795 --> 00:07:13.995
<00:07:12.795>with <00:07:13.011>it <00:07:13.227>but <00:07:13.443>nothing <00:07:13.659>actually <00:07:13.875>happens.

168
00:07:14.855 --> 00:07:16.715
<00:07:14.855>And <00:07:15.135>surprisingly <00:07:15.415>this <00:07:15.695>is <00:07:15.975>also <00:07:16.255>useful.

169
00:07:17.855 --> 00:07:20.235
<00:07:17.855>So <00:07:17.995>this <00:07:18.135>is <00:07:18.275>a <00:07:18.415>function <00:07:18.555>that <00:07:18.695>converts <00:07:18.835>in <00:07:18.975>to <00:07:19.115>a <00:07:19.255>string.

170
00:07:20.295 --> 00:07:21.555
<00:07:20.295>You've <00:07:20.521>written <00:07:20.748>them <00:07:20.975>a <00:07:21.202>thousand <00:07:21.429>times.

171
00:07:21.865 --> 00:07:24.835
<00:07:21.865>It's <00:07:21.992>always <00:07:22.119>a <00:07:22.246>bit <00:07:22.374>annoying <00:07:22.501>that <00:07:22.628>you <00:07:22.755>have <00:07:22.883>to <00:07:23.010>prefix <00:07:23.137>the <00:07:23.265>name

172
00:07:24.835 --> 00:07:26.195
<00:07:24.835>of <00:07:25.009>the <00:07:25.184>en <00:07:25.359>if <00:07:25.534>it's <00:07:25.709>a <00:07:25.884>in <00:07:26.058>class.

173
00:07:27.095 --> 00:07:28.995
<00:07:27.095>But <00:07:27.561>with <00:07:28.028>the <00:07:28.495>um,

174
00:07:29.875 --> 00:07:32.995
<00:07:29.875>c <00:07:30.002>plus <00:07:30.129>plus <00:07:30.256>20 <00:07:30.384>feature <00:07:30.511>using <00:07:30.638>enum <00:07:30.765>you <00:07:30.893>can <00:07:31.020>actually <00:07:31.147>bring <00:07:31.275>the

175
00:07:32.995 --> 00:07:34.955
<00:07:32.995>names <00:07:33.135>into <00:07:33.275>scope <00:07:33.415>and <00:07:33.555>then <00:07:33.695>you <00:07:33.835>don't <00:07:33.975>need <00:07:34.115>to <00:07:34.255>perfect <00:07:34.395>them.

176
00:07:34.975 --> 00:07:36.275
<00:07:34.975>So <00:07:35.142>you <00:07:35.309>have <00:07:35.476>a <00:07:35.643>bit <00:07:35.810>of <00:07:35.977>time <00:07:36.145>typing,

177
00:07:37.215 --> 00:07:39.595
<00:07:37.215>but <00:07:37.355>putting <00:07:37.495>it <00:07:37.635>in <00:07:37.775>there <00:07:37.915>will <00:07:38.055>may <00:07:38.195>make <00:07:38.335>the <00:07:38.475>names <00:07:38.615>available

178
00:07:39.595 --> 00:07:40.715
<00:07:39.595>throughout <00:07:39.931>the <00:07:40.267>entire <00:07:40.603>function,

179
00:07:40.715 --> 00:07:41.915
<00:07:40.715>which <00:07:40.895>is <00:07:41.075>maybe <00:07:41.255>not <00:07:41.435>what <00:07:41.615>you <00:07:41.795>want.

180
00:07:42.095 --> 00:07:43.795
<00:07:42.095>So <00:07:42.270>luckily <00:07:42.445>you <00:07:42.620>can <00:07:42.795>put <00:07:42.970>them <00:07:43.145>inside <00:07:43.320>the <00:07:43.495>switch.

181
00:07:44.375 --> 00:07:46.595
<00:07:44.375>So <00:07:44.515>this <00:07:44.655>uses <00:07:44.795>the <00:07:44.935>fact <00:07:45.075>that <00:07:45.215>we <00:07:45.355>can <00:07:45.495>have <00:07:45.635>a <00:07:45.775>statement

182
00:07:46.595 --> 00:07:49.475
<00:07:46.595>before <00:07:46.795>any <00:07:46.995>label <00:07:47.195>and <00:07:47.395>this <00:07:47.595>is <00:07:47.795>never <00:07:47.995>executed

183
00:07:49.535 --> 00:07:52.155
<00:07:49.534>but <00:07:49.690>it <00:07:49.846>doesn't <00:07:50.001>do <00:07:50.157>anything <00:07:50.312>that <00:07:50.468>um, <00:07:50.623>so <00:07:50.779>it's <00:07:50.934>okay

184
00:07:52.335 --> 00:07:54.955
<00:07:52.335>and <00:07:52.462>it <00:07:52.589>still <00:07:52.716>gives <00:07:52.844>you <00:07:52.971>the <00:07:53.098>names <00:07:53.225>of <00:07:53.353>the <00:07:53.480>enums <00:07:53.607>very <00:07:53.734>nicely.

185
00:07:58.015 --> 00:08:00.355
<00:07:58.015>You <00:07:58.155>don't <00:07:58.294>need <00:07:58.435>braces <00:07:58.575>when <00:07:58.715>you <00:07:58.854>only <00:07:58.995>have <00:07:59.135>a <00:07:59.275>single <00:07:59.414>statement.

186
00:08:00.355 --> 00:08:02.515
<00:08:00.355>So <00:08:00.495>this <00:08:00.635>is <00:08:00.775>a <00:08:00.915>switch <00:08:01.055>statement <00:08:01.195>that <00:08:01.335>doesn't <00:08:01.475>use <00:08:01.615>any <00:08:01.755>braces

187
00:08:02.515 --> 00:08:03.875
<00:08:02.515>because <00:08:02.719>it <00:08:02.923>only <00:08:03.127>has <00:08:03.331>a <00:08:03.534>single <00:08:03.739>statement.

188
00:08:04.015 --> 00:08:05.395
<00:08:04.015>The <00:08:04.222>labels <00:08:04.429>don't <00:08:04.635>count <00:08:04.842>as <00:08:05.049>a <00:08:05.257>statement,

189
00:08:05.395 --> 00:08:07.075
<00:08:05.395>only <00:08:05.628>the <00:08:05.861>actual <00:08:06.094>part <00:08:06.328>after <00:08:06.561>the <00:08:06.794>labels.

190
00:08:07.295 --> 00:08:10.155
<00:08:07.295>And <00:08:07.411>so <00:08:07.528>the, <00:08:07.645>we <00:08:07.761>will <00:08:07.878>print <00:08:07.995>something <00:08:08.111>if <00:08:08.228>is <00:08:08.345>1, <00:08:08.461>2 <00:08:08.578>0 <00:08:08.695>3

191
00:08:10.175 --> 00:08:11.515
<00:08:10.175>and <00:08:10.416>then <00:08:10.657>the <00:08:10.898>second <00:08:11.139>statement <00:08:11.381>is

192
00:08:11.515 --> 00:08:15.125
<00:08:11.515>after <00:08:11.748>the <00:08:11.981>switch <00:08:12.215>it <00:08:12.448>gets <00:08:12.681>even <00:08:12.914>real

193
00:08:15.125 --> 00:08:16.725
<00:08:15.125>because <00:08:15.325>you <00:08:15.525>can <00:08:15.725>sort <00:08:15.925>of <00:08:16.125>merge <00:08:16.325>the <00:08:16.525>switch

194
00:08:16.725 --> 00:08:17.925
<00:08:16.725>with <00:08:16.995>other <00:08:17.265>control <00:08:17.535>for <00:08:17.805>statements.

195
00:08:18.265 --> 00:08:20.165
<00:08:18.265>So <00:08:18.440>this <00:08:18.615>is <00:08:18.789>an <00:08:18.965>if <00:08:19.140>else <00:08:19.315>and <00:08:19.490>a <00:08:19.664>switch

196
00:08:20.465 --> 00:08:21.565
<00:08:20.465>and <00:08:20.662>the <00:08:20.861>if <00:08:21.058>part <00:08:21.257>does <00:08:21.455>nothing

197
00:08:21.565 --> 00:08:23.605
<00:08:21.565>because <00:08:21.740>if <00:08:21.915>ISU <00:08:22.090>be <00:08:22.265>jumped <00:08:22.440>directly <00:08:22.615>to <00:08:22.790>the <00:08:22.965>label,

198
00:08:23.635 --> 00:08:25.805
<00:08:23.635>execute <00:08:23.835>the <00:08:24.034>case <00:08:24.235>zero <00:08:24.435>and <00:08:24.635>print <00:08:24.835>IS <00:08:25.034>zero.

199
00:08:28.025 --> 00:08:30.845
<00:08:28.025>So <00:08:28.152>this <00:08:28.279>is <00:08:28.406>a <00:08:28.534>nice <00:08:28.661>quirk <00:08:28.788>I'd <00:08:28.915>say <00:08:29.043>of <00:08:29.170>the <00:08:29.297>switch <00:08:29.424>statements,

200
00:08:30.905 --> 00:08:33.605
<00:08:30.905>um, <00:08:31.044>which <00:08:31.184>can <00:08:31.325>be <00:08:31.465>used <00:08:31.604>to <00:08:31.744>create <00:08:31.885>a <00:08:32.025>vital <00:08:32.164>classic <00:08:32.304>uh,

201
00:08:33.705 --> 00:08:34.965
<00:08:33.705>DAF <00:08:34.272>device, <00:08:34.839>right?

202
00:08:34.985 --> 00:08:38.365
<00:08:34.985>So <00:08:35.125>this <00:08:35.265>is <00:08:35.405>a <00:08:35.544>function <00:08:35.685>that <00:08:35.825>copies <00:08:35.965>data <00:08:36.105>from <00:08:36.245>one <00:08:36.385>pointer

203
00:08:38.365 --> 00:08:40.365
<00:08:38.365>to <00:08:38.505>another <00:08:38.645>and <00:08:38.784>it <00:08:38.924>wants <00:08:39.065>to <00:08:39.205>copy <00:08:39.345>eight <00:08:39.485>at <00:08:39.625>the <00:08:39.765>time.

204
00:08:40.705 --> 00:08:42.845
<00:08:40.705>But <00:08:40.880>what <00:08:41.055>if <00:08:41.230>the <00:08:41.405>count <00:08:41.580>isn't <00:08:41.755>divisible <00:08:41.930>by <00:08:42.105>eight?

205
00:08:42.845 --> 00:08:44.525
<00:08:42.845>Well <00:08:43.020>then <00:08:43.195>you <00:08:43.370>need <00:08:43.545>to <00:08:43.720>handle <00:08:43.895>the <00:08:44.070>edge <00:08:44.245>cases

206
00:08:44.785 --> 00:08:45.925
<00:08:44.785>and <00:08:44.956>you <00:08:45.127>can <00:08:45.298>do <00:08:45.468>that <00:08:45.640>by <00:08:45.810>sort

207
00:08:45.925 --> 00:08:47.365
<00:08:45.925>of <00:08:46.141>merging <00:08:46.357>a <00:08:46.573>switch <00:08:46.789>into <00:08:47.005>wire <00:08:47.221>loop.

208
00:08:47.785 --> 00:08:49.965
<00:08:47.785>So <00:08:47.985>let's <00:08:48.185>say <00:08:48.385>um, <00:08:48.584>the <00:08:48.785>remainder <00:08:48.985>of <00:08:49.185>division

209
00:08:49.985 --> 00:08:52.885
<00:08:49.985>by <00:08:50.125>eight <00:08:50.265>is <00:08:50.405>three, <00:08:50.545>then <00:08:50.685>we <00:08:50.825>will <00:08:50.965>jump <00:08:51.105>directly <00:08:51.245>to <00:08:51.385>three,

210
00:08:53.395 --> 00:08:55.405
<00:08:53.395>execute <00:08:53.745>three <00:08:54.095>uh, <00:08:54.444>single <00:08:54.795>copies

211
00:08:55.665 --> 00:08:57.925
<00:08:55.665>and <00:08:55.820>at <00:08:55.976>this <00:08:56.131>point <00:08:56.287>the <00:08:56.442>remainder <00:08:56.598>is <00:08:56.753>divisible <00:08:56.909>by <00:08:57.064>eight.

212
00:08:57.945 --> 00:09:00.525
<00:08:57.945>So <00:08:58.085>we <00:08:58.225>can <00:08:58.365>just <00:08:58.505>loop <00:08:58.645>over <00:08:58.785>execute <00:08:58.925>eight <00:08:59.065>at <00:08:59.205>a <00:08:59.345>time

213
00:09:00.525 --> 00:09:01.805
<00:09:00.525>and <00:09:00.755>ignore <00:09:00.985>all <00:09:01.216>the <00:09:01.446>case <00:09:01.676>labels.

214
00:09:02.425 --> 00:09:04.845
<00:09:02.425>So <00:09:02.541>this <00:09:02.658>is <00:09:02.775>sort <00:09:02.891>of <00:09:03.008>like <00:09:03.125>used <00:09:03.241>to <00:09:03.358>be <00:09:03.474>a <00:09:03.591>pattern <00:09:03.708>in <00:09:03.824>C

215
00:09:04.845 --> 00:09:06.725
<00:09:04.845>where <00:09:05.020>you <00:09:05.195>can <00:09:05.370>write <00:09:05.545>mam <00:09:05.720>copy <00:09:05.895>in <00:09:06.070>that <00:09:06.245>way.

216
00:09:09.555 --> 00:09:11.215
<00:09:09.555>At <00:09:09.755>my <00:09:09.954>company <00:09:10.155>I <00:09:10.354>think <00:09:10.555>I <00:09:10.755>work, <00:09:10.954>um,

217
00:09:11.515 --> 00:09:13.615
<00:09:11.515>we <00:09:11.670>have <00:09:11.826>written <00:09:11.981>a <00:09:12.137>macro <00:09:12.292>that <00:09:12.448>uses <00:09:12.603>that <00:09:12.759>as <00:09:12.915>well.

218
00:09:13.815 --> 00:09:16.015
<00:09:13.815>So <00:09:13.955>switch <00:09:14.095>no <00:09:14.235>default. <00:09:14.375>Um, <00:09:14.515>the <00:09:14.655>idea <00:09:14.795>is <00:09:14.935>that <00:09:15.075>we <00:09:15.215>want

219
00:09:16.015 --> 00:09:17.735
<00:09:16.015>to <00:09:16.295>automatically <00:09:16.574>an <00:09:16.855>assertion <00:09:17.135>if <00:09:17.415>the

220
00:09:17.735 --> 00:09:18.935
<00:09:17.735>default <00:09:17.915>case <00:09:18.095>of <00:09:18.275>a <00:09:18.454>switch <00:09:18.635>is <00:09:18.814>reached.

221
00:09:19.795 --> 00:09:22.055
<00:09:19.795>We <00:09:19.935>can <00:09:20.074>use <00:09:20.214>that <00:09:20.354>by <00:09:20.495>having <00:09:20.635>a <00:09:20.775>switch <00:09:20.915>without <00:09:21.055>any <00:09:21.194>braces

222
00:09:22.055 --> 00:09:23.215
<00:09:22.055>that <00:09:22.263>start <00:09:22.472>with <00:09:22.681>a <00:09:22.890>default <00:09:23.099>case.

223
00:09:23.795 --> 00:09:25.615
<00:09:23.795>If <00:09:23.950>we <00:09:24.106>reach <00:09:24.261>the <00:09:24.417>default, <00:09:24.572>we've <00:09:24.728>got <00:09:24.883>an <00:09:25.039>IF <00:09:25.194>two

224
00:09:25.685 --> 00:09:28.095
<00:09:25.685>that <00:09:25.840>triggers <00:09:25.996>an <00:09:26.151>assertion <00:09:26.307>and <00:09:26.462>otherwise <00:09:26.618>we've <00:09:26.773>got <00:09:26.929>an <00:09:27.084>S

225
00:09:28.355 --> 00:09:31.175
<00:09:28.355>and <00:09:28.495>inside <00:09:28.635>the <00:09:28.775>braces <00:09:28.915>are <00:09:29.055>actually <00:09:29.195>the <00:09:29.335>body <00:09:29.475>of <00:09:29.615>the <00:09:29.755>elts.

226
00:09:31.275 --> 00:09:34.015
<00:09:31.275>So <00:09:31.430>if <00:09:31.586>we <00:09:31.741>have <00:09:31.897>a <00:09:32.052>switch, <00:09:32.208>um, <00:09:32.363>thing, <00:09:32.519>it'll <00:09:32.675>jump

227
00:09:34.035 --> 00:09:35.975
<00:09:34.035>to <00:09:34.314>the <00:09:34.594>appropriate <00:09:34.875>case, <00:09:35.155>execute <00:09:35.435>it,

228
00:09:36.075 --> 00:09:37.535
<00:09:36.075>but <00:09:36.239>if <00:09:36.403>you <00:09:36.567>don't <00:09:36.732>have <00:09:36.896>anything <00:09:37.060>we <00:09:37.224>will <00:09:37.389>jump

229
00:09:37.535 --> 00:09:39.055
<00:09:37.535>to <00:09:37.762>the <00:09:37.991>default <00:09:38.218>case, <00:09:38.447>execute <00:09:38.675>the <00:09:38.902>if

230
00:09:39.055 --> 00:09:40.215
<00:09:39.055>two <00:09:39.315>and <00:09:39.577>get <00:09:39.838>the <00:09:40.099>assertion.

231
00:09:40.395 --> 00:09:42.975
<00:09:40.395>And <00:09:40.535>so <00:09:40.675>by <00:09:40.814>just <00:09:40.954>changing <00:09:41.095>a <00:09:41.235>single <00:09:41.375>keyboard <00:09:41.515>for <00:09:41.655>to <00:09:41.795>macro,

232
00:09:43.235 --> 00:09:45.055
<00:09:43.235>we <00:09:43.390>can <00:09:43.546>have <00:09:43.701>a <00:09:43.857>switch <00:09:44.012>that <00:09:44.168>doesn't <00:09:44.323>have <00:09:44.479>a <00:09:44.635>default.

233
00:09:45.155 --> 00:09:46.455
<00:09:45.155>And <00:09:45.740>this <00:09:46.325>the,

234
00:09:46.515 --> 00:09:48.415
<00:09:46.515>the <00:09:46.655>coworker <00:09:46.795>was <00:09:46.935>really <00:09:47.074>proud <00:09:47.215>when <00:09:47.355>he <00:09:47.495>showed <00:09:47.635>me <00:09:47.775>the <00:09:47.915>check.

235
00:09:52.255 --> 00:09:54.395
<00:09:52.255>The <00:09:52.535>sea <00:09:52.814>standard <00:09:53.095>library <00:09:53.375>defines <00:09:53.655>something

236
00:09:54.395 --> 00:09:55.475
<00:09:54.395>called <00:09:54.719>floating <00:09:55.043>point <00:09:55.367>exceptions.

237
00:09:55.735 --> 00:09:57.595
<00:09:55.735>So <00:09:55.890>here <00:09:56.046>has <00:09:56.201>a <00:09:56.357>list <00:09:56.512>of <00:09:56.668>floating <00:09:56.823>point <00:09:56.979>exceptions <00:09:57.135>like

238
00:09:57.715 --> 00:09:59.835
<00:09:57.715>division <00:09:57.915>by <00:09:58.115>zero <00:09:58.315>or <00:09:58.515>overflow, <00:09:58.715>things <00:09:58.915>like <00:09:59.115>that.

239
00:10:01.335 --> 00:10:03.435
<00:10:01.335>You <00:10:01.568>can <00:10:01.801>also <00:10:02.035>manually <00:10:02.268>raise <00:10:02.501>the <00:10:02.735>exceptions

240
00:10:03.435 --> 00:10:04.875
<00:10:03.435>by <00:10:03.651>calling <00:10:03.867>a <00:10:04.083>few <00:10:04.299>race <00:10:04.515>excepts <00:10:04.731>but

241
00:10:04.875 --> 00:10:07.235
<00:10:04.875>before <00:10:05.155>you <00:10:05.435>think <00:10:05.715>well <00:10:05.995>exceptions, <00:10:06.275>um,

242
00:10:07.245 --> 00:10:08.635
<00:10:07.245>there <00:10:07.662>aren't <00:10:08.079>actually <00:10:08.496>exceptions.

243
00:10:08.735 --> 00:10:10.715
<00:10:08.735>Um, <00:10:08.968>it <00:10:09.201>essentially <00:10:09.435>sets <00:10:09.668>the <00:10:09.901>global <00:10:10.135>flag

244
00:10:10.895 --> 00:10:12.635
<00:10:10.895>and <00:10:11.069>then <00:10:11.245>you <00:10:11.420>can <00:10:11.595>call <00:10:11.770>if <00:10:11.944>you <00:10:12.120>test <00:10:12.295>accept

245
00:10:12.635 --> 00:10:14.355
<00:10:12.635>to <00:10:12.868>set <00:10:13.101>whether <00:10:13.335>an <00:10:13.568>exception <00:10:13.801>was <00:10:14.035>triggered.

246
00:10:14.615 --> 00:10:17.195
<00:10:14.615>So <00:10:14.770>this <00:10:14.926>then <00:10:15.081>returns <00:10:15.237>bull <00:10:15.392>if <00:10:15.548>a <00:10:15.703>previous <00:10:15.859>statement <00:10:16.015>triggered

247
00:10:17.195 --> 00:10:20.475
<00:10:17.195>an <00:10:17.322>exception, <00:10:17.449>it <00:10:17.576>just <00:10:17.704>if <00:10:17.831>you <00:10:17.958>basic <00:10:18.085>except <00:10:18.213>also <00:10:18.340>just <00:10:18.467>sets <00:10:18.595>the

248
00:10:20.475 --> 00:10:21.555
<00:10:20.475>flag <00:10:20.718>in <00:10:20.961>this <00:10:21.204>global <00:10:21.447>variable.

249
00:10:22.875 --> 00:10:25.895
<00:10:22.875>So <00:10:23.015>because <00:10:23.155>it's <00:10:23.295>a <00:10:23.435>global <00:10:23.575>variable, <00:10:23.715>we <00:10:23.855>need <00:10:23.995>to <00:10:24.135>clear <00:10:24.275>it

250
00:10:25.895 --> 00:10:27.375
<00:10:25.895>before <00:10:26.117>we <00:10:26.339>do <00:10:26.561>anything, <00:10:26.783>but <00:10:27.005>otherwise <00:10:27.227>there

251
00:10:27.375 --> 00:10:28.495
<00:10:27.375>might <00:10:27.627>be <00:10:27.879>whatever <00:10:28.131>in <00:10:28.383>there.

252
00:10:28.605 --> 00:10:30.295
<00:10:28.605>Then <00:10:28.780>we <00:10:28.955>can <00:10:29.130>do <00:10:29.305>a <00:10:29.480>floating <00:10:29.655>part <00:10:29.830>operation <00:10:30.005>and

253
00:10:30.295 --> 00:10:32.455
<00:10:30.295>otherwise <00:10:30.435>we <00:10:30.574>can <00:10:30.714>check <00:10:30.854>if <00:10:30.995>you <00:10:31.135>had <00:10:31.275>a <00:10:31.415>division <00:10:31.555>by <00:10:31.694>zero.

254
00:10:34.145 --> 00:10:38.765
<00:10:34.145>So <00:10:34.272>one <00:10:34.399>divided <00:10:34.526>by <00:10:34.654>zero, <00:10:34.781>if <00:10:34.908>X <00:10:35.035>is <00:10:35.163>zero, <00:10:35.290>this <00:10:35.417>is <00:10:35.545>infinity

255
00:10:38.765 --> 00:10:39.965
<00:10:38.765>and <00:10:38.944>then <00:10:39.125>we <00:10:39.305>print <00:10:39.485>division <00:10:39.665>by <00:10:39.845>zero.

256
00:10:41.795 --> 00:10:43.325
<00:10:41.795>What <00:10:41.991>happens <00:10:42.188>if <00:10:42.385>you <00:10:42.581>divide <00:10:42.778>zero <00:10:42.975>by <00:10:43.172>zero?

257
00:10:44.485 --> 00:10:46.215
<00:10:44.485>Well <00:10:44.718>the <00:10:44.951>answer <00:10:45.185>is <00:10:45.418>not <00:10:45.651>a <00:10:45.885>number,

258
00:10:46.275 --> 00:10:48.335
<00:10:46.275>but <00:10:46.449>it's <00:10:46.625>not <00:10:46.800>actually <00:10:46.975>not <00:10:47.150>a <00:10:47.324>number, <00:10:47.500>it's <00:10:47.675>negative,

259
00:10:48.355 --> 00:10:49.815
<00:10:48.355>not <00:10:48.683>a <00:10:49.012>number <00:10:49.340>because <00:10:49.669>obviously

260
00:10:50.195 --> 00:10:51.535
<00:10:50.195>and <00:10:50.396>then <00:10:50.597>we <00:10:50.798>get <00:10:50.999>division <00:10:51.200>by <00:10:51.401>zero.

261
00:10:52.075 --> 00:10:53.735
<00:10:52.075>So <00:10:52.308>why <00:10:52.541>is <00:10:52.775>negative <00:10:53.008>not <00:10:53.241>a <00:10:53.475>number?

262
00:10:53.925 --> 00:10:55.855
<00:10:53.925>Well <00:10:54.125>not <00:10:54.324>a <00:10:54.525>number <00:10:54.724>has <00:10:54.925>a <00:10:55.125>sign <00:10:55.324>bit.

263
00:10:55.855 --> 00:10:58.655
<00:10:55.855>So <00:10:55.982>we <00:10:56.109>have <00:10:56.236>positive <00:10:56.364>and <00:10:56.491>negative <00:10:56.618>not <00:10:56.745>a <00:10:56.873>number <00:10:57.000>and <00:10:57.127>on <00:10:57.255>insert

264
00:10:58.975 --> 00:11:00.055
<00:10:58.975>whenever <00:10:59.218>you <00:10:59.461>do <00:10:59.704>a <00:10:59.947>division

265
00:11:00.055 --> 00:11:01.975
<00:11:00.055>by <00:11:00.229>zero <00:11:00.405>the <00:11:00.579>sign <00:11:00.755>bit <00:11:00.930>ends <00:11:01.104>up <00:11:01.280>being <00:11:01.454>said.

266
00:11:01.975 --> 00:11:03.375
<00:11:01.975>So <00:11:02.155>we <00:11:02.335>will <00:11:02.515>have <00:11:02.695>negative, <00:11:02.875>not <00:11:03.055>a <00:11:03.235>number,

267
00:11:03.915 --> 00:11:05.535
<00:11:03.915>but <00:11:04.089>there <00:11:04.265>are <00:11:04.439>more <00:11:04.615>not <00:11:04.790>a <00:11:04.964>numbers <00:11:05.140>than <00:11:05.314>that.

268
00:11:06.435 --> 00:11:09.655
<00:11:06.435>So <00:11:06.542>this <00:11:06.650>is <00:11:06.758>the <00:11:06.865>pattern <00:11:06.973>for <00:11:07.081>not <00:11:07.188>a <00:11:07.296>number <00:11:07.404>on <00:11:07.511>a <00:11:07.619>32 <00:11:07.727>bit <00:11:07.834>float

269
00:11:09.875 --> 00:11:12.055
<00:11:09.875>and <00:11:10.050>all <00:11:10.225>the <00:11:10.400>Xs <00:11:10.575>can <00:11:10.750>be <00:11:10.925>whatever <00:11:11.100>you <00:11:11.275>want.

270
00:11:12.205 --> 00:11:13.495
<00:11:12.205>They're <00:11:12.437>all <00:11:12.669>still <00:11:12.901>not <00:11:13.133>a <00:11:13.366>number.

271
00:11:14.165 --> 00:11:15.895
<00:11:14.165>That <00:11:14.365>means <00:11:14.564>that <00:11:14.765>you <00:11:14.964>have <00:11:15.165>over <00:11:15.365>60 <00:11:15.564>million

272
00:11:15.895 --> 00:11:17.135
<00:11:15.895>different, <00:11:16.081>not <00:11:16.266>a <00:11:16.453>number <00:11:16.639>in <00:11:16.825>the <00:11:17.011>float.

273
00:11:18.395 --> 00:11:20.445
<00:11:18.395>Luckily <00:11:18.628>the <00:11:18.861>standard <00:11:19.095>library <00:11:19.328>provides <00:11:19.561>a <00:11:19.795>function

274
00:11:20.465 --> 00:11:23.205
<00:11:20.465>to <00:11:20.592>give <00:11:20.719>you <00:11:20.846>a <00:11:20.974>specific <00:11:21.101>not <00:11:21.228>a <00:11:21.355>number <00:11:21.483>with <00:11:21.610>a <00:11:21.737>specific <00:11:21.865>payload.

275
00:11:23.345 --> 00:11:25.605
<00:11:23.345>So <00:11:23.520>we <00:11:23.695>want <00:11:23.870>to, <00:11:24.045>especially <00:11:24.220>flavored, <00:11:24.395>not <00:11:24.570>a <00:11:24.745>number,

276
00:11:25.665 --> 00:11:27.645
<00:11:25.665>you <00:11:25.820>can <00:11:25.976>call <00:11:26.131>student <00:11:26.287>nan <00:11:26.442>and <00:11:26.598>give <00:11:26.753>it <00:11:26.909>some <00:11:27.064>payload

277
00:11:28.545 --> 00:11:30.045
<00:11:28.545>and <00:11:28.814>that <00:11:29.084>one <00:11:29.354>actually <00:11:29.625>is <00:11:29.895>useful

278
00:11:30.425 --> 00:11:32.205
<00:11:30.425>and <00:11:30.658>the <00:11:30.891>technique <00:11:31.125>known <00:11:31.358>as <00:11:31.591>nan <00:11:31.824>boxing.

279
00:11:32.345 --> 00:11:34.605
<00:11:32.345>So <00:11:32.578>for <00:11:32.811>example <00:11:33.045>a <00:11:33.278>JavaScript <00:11:33.511>interpreter <00:11:33.745>needs

280
00:11:34.605 --> 00:11:36.005
<00:11:34.605>to <00:11:34.815>know <00:11:35.025>the <00:11:35.235>store, <00:11:35.445>the <00:11:35.655>current <00:11:35.865>value.

281
00:11:36.115 --> 00:11:37.965
<00:11:36.115>This <00:11:36.315>is <00:11:36.515>either <00:11:36.715>a <00:11:36.915>number <00:11:37.115>or <00:11:37.315>a <00:11:37.515>pointer

282
00:11:37.965 --> 00:11:39.125
<00:11:37.965>to <00:11:38.173>a <00:11:38.382>more <00:11:38.591>complex <00:11:38.800>data <00:11:39.009>structure.

283
00:11:39.785 --> 00:11:41.565
<00:11:39.785>So <00:11:40.018>numbers <00:11:40.251>are <00:11:40.485>just <00:11:40.718>stored <00:11:40.951>as <00:11:41.185>numbers,

284
00:11:41.945 --> 00:11:43.485
<00:11:41.945>but <00:11:42.118>if <00:11:42.291>it's <00:11:42.464>a <00:11:42.638>pointer <00:11:42.811>we <00:11:42.984>can <00:11:43.157>store <00:11:43.331>that

285
00:11:43.705 --> 00:11:45.285
<00:11:43.705>as <00:11:43.905>the <00:11:44.105>name <00:11:44.305>bits <00:11:44.505>of <00:11:44.705>the <00:11:44.905>double <00:11:45.105>value.

286
00:11:45.585 --> 00:11:47.285
<00:11:45.585>So <00:11:45.818>just <00:11:46.051>a <00:11:46.285>single <00:11:46.518>floating <00:11:46.751>point <00:11:46.985>value.

287
00:11:47.345 --> 00:11:49.125
<00:11:47.345>We <00:11:47.625>can <00:11:47.905>store <00:11:48.185>all <00:11:48.465>JavaScript <00:11:48.745>objects.

288
00:11:52.345 --> 00:11:54.045
<00:11:52.345>The <00:11:52.578>c <00:11:52.811>plus <00:11:53.045>plus <00:11:53.278>community <00:11:53.511>is <00:11:53.745>split.

289
00:11:54.045 --> 00:11:55.205
<00:11:54.045>However, <00:11:54.305>where <00:11:54.567>to <00:11:54.828>put <00:11:55.089>cons,

290
00:11:55.305 --> 00:11:57.725
<00:11:55.305>so <00:11:55.432>we've <00:11:55.559>got <00:11:55.686>the <00:11:55.814>west <00:11:55.941>con <00:11:56.068>style <00:11:56.195>and <00:11:56.323>the <00:11:56.450>east <00:11:56.577>con <00:11:56.704>style.

291
00:11:58.625 --> 00:12:00.635
<00:11:58.625>Similarly, <00:11:58.825>we <00:11:59.025>can <00:11:59.225>also <00:11:59.425>write <00:11:59.625>cons <00:11:59.825>by <00:12:00.025>explicit

292
00:12:00.695 --> 00:12:04.595
<00:12:00.695>and <00:12:00.850>explicit <00:12:01.006>cons <00:12:01.161>per <00:12:01.317>or <00:12:01.472>unsigned <00:12:01.628>in <00:12:01.783>or <00:12:01.939>in <00:12:02.095>unsigned.

293
00:12:05.375 --> 00:12:07.195
<00:12:05.375>And <00:12:05.655>the <00:12:05.935>flexibility <00:12:06.215>goes <00:12:06.495>even <00:12:06.775>further

294
00:12:07.385 --> 00:12:10.795
<00:12:07.385>because <00:12:07.525>a <00:12:07.665>decal <00:12:07.805>specify <00:12:07.944>sequence, <00:12:08.085>it's <00:12:08.225>just <00:12:08.365>a <00:12:08.505>list <00:12:08.645>of <00:12:08.785>decal.

295
00:12:10.795 --> 00:12:12.915
<00:12:10.795>Specifier <00:12:11.028>like <00:12:11.261>in <00:12:11.495>or <00:12:11.728>unsigned <00:12:11.961>or <00:12:12.194>cons

296
00:12:14.055 --> 00:12:15.075
<00:12:14.055>and <00:12:14.238>there <00:12:14.422>can <00:12:14.605>be <00:12:14.789>any <00:12:14.973>order.

297
00:12:15.335 --> 00:12:16.675
<00:12:15.335>So <00:12:15.536>you <00:12:15.737>can <00:12:15.938>write <00:12:16.139>in <00:12:16.339>type <00:12:16.540>FA

298
00:12:16.815 --> 00:12:20.155
<00:12:16.815>and <00:12:16.942>A <00:12:17.069>is <00:12:17.196>the <00:12:17.324>type <00:12:17.451>the <00:12:17.578>phone <00:12:17.705>in <00:12:17.833>I <00:12:17.960>can <00:12:18.087>write <00:12:18.215>uh,

299
00:12:20.155 --> 00:12:22.235
<00:12:20.155>this <00:12:20.310>is <00:12:20.466>a <00:12:20.621>volatile <00:12:20.777>inline <00:12:20.932>flow <00:12:21.088>that <00:12:21.243>is <00:12:21.399>also <00:12:21.555>static.

300
00:12:24.335 --> 00:12:25.995
<00:12:24.335>We <00:12:24.510>can <00:12:24.685>have <00:12:24.860>a <00:12:25.035>conexpo <00:12:25.210>also <00:12:25.385>on <00:12:25.560>the <00:12:25.735>east.

301
00:12:26.015 --> 00:12:30.155
<00:12:26.015>So <00:12:26.131>this <00:12:26.248>is <00:12:26.365>incon <00:12:26.481>per <00:12:26.598>C <00:12:26.715>and <00:12:26.831>this <00:12:26.948>is <00:12:27.064>an <00:12:27.181>unsigned <00:12:27.298>long, <00:12:27.415>long

302
00:12:30.535 --> 00:12:31.635
<00:12:30.535>but <00:12:30.865>between <00:12:31.194>the <00:12:31.525>unsigned

303
00:12:31.635 --> 00:12:32.795
<00:12:31.635>and <00:12:31.809>the <00:12:31.983>long, <00:12:32.156>we <00:12:32.331>put <00:12:32.505>a <00:12:32.679>couple

304
00:12:32.795 --> 00:12:34.475
<00:12:32.795>of <00:12:33.074>other <00:12:33.354>declaration <00:12:33.635>specifiers <00:12:33.915>in <00:12:34.194>there.

305
00:12:34.945 --> 00:12:36.275
<00:12:34.945>This <00:12:35.144>is <00:12:35.344>all <00:12:35.543>valid <00:12:35.743>c <00:12:35.942>plus <00:12:36.141>plus.

306
00:12:37.055 --> 00:12:39.435
<00:12:37.055>So <00:12:37.229>maybe <00:12:37.405>we <00:12:37.579>should <00:12:37.755>just <00:12:37.930>sort <00:12:38.104>all <00:12:38.280>declaration <00:12:38.454>specifiers

307
00:12:39.595 --> 00:12:41.675
<00:12:39.595>alphabetically <00:12:39.750>go <00:12:39.906>to <00:12:40.061>it <00:12:40.217>of <00:12:40.372>all <00:12:40.528>the <00:12:40.683>naming <00:12:40.839>con <00:12:40.995>uh,

308
00:12:41.675 --> 00:12:43.235
<00:12:41.675>conventions, <00:12:42.025>just <00:12:42.375>sort <00:12:42.724>them <00:12:43.074>alphabetically.

309
00:12:43.235 --> 00:12:45.555
<00:12:43.235>It's <00:12:43.515>easy, <00:12:43.795>it's <00:12:44.075>automated. <00:12:44.355>Nice <00:12:44.635>guideline.

310
00:12:47.575 --> 00:12:49.475
<00:12:47.575>The <00:12:47.808>other <00:12:48.041>part <00:12:48.275>of <00:12:48.508>a <00:12:48.741>declaration, <00:12:48.975>uh,

311
00:12:49.475 --> 00:12:51.275
<00:12:49.475>so <00:12:49.708>we've <00:12:49.941>got <00:12:50.175>the <00:12:50.408>dec <00:12:50.641>specify <00:12:50.875>sequence

312
00:12:51.275 --> 00:12:52.435
<00:12:51.275>and <00:12:51.483>then <00:12:51.692>we've <00:12:51.901>got <00:12:52.110>the <00:12:52.319>declarative.

313
00:12:52.435 --> 00:12:54.195
<00:12:52.435>So <00:12:52.609>here <00:12:52.785>we've <00:12:52.959>got <00:12:53.135>two <00:12:53.310>declaratives <00:12:53.484>A <00:12:53.660>and <00:12:53.834>B,

314
00:12:54.255 --> 00:12:55.995
<00:12:54.255>and <00:12:54.395>now <00:12:54.535>we <00:12:54.675>enter <00:12:54.814>up <00:12:54.955>with <00:12:55.095>two <00:12:55.235>ins, <00:12:55.375>A <00:12:55.515>and <00:12:55.655>B.

315
00:12:56.975 --> 00:12:58.595
<00:12:56.975>Um, <00:12:57.175>we <00:12:57.375>can <00:12:57.575>also <00:12:57.775>have <00:12:57.975>a <00:12:58.175>pointer <00:12:58.375>declaratory.

316
00:12:58.595 --> 00:13:00.195
<00:12:58.595>Now <00:12:58.828>C <00:12:59.061>is <00:12:59.295>a <00:12:59.528>0.2 <00:12:59.761>in <00:12:59.995>and

317
00:13:00.195 --> 00:13:02.635
<00:13:00.195>because <00:13:00.322>the <00:13:00.449>star <00:13:00.576>is <00:13:00.704>part <00:13:00.831>of <00:13:00.958>the <00:13:01.085>declaratory, <00:13:01.213>not <00:13:01.340>of <00:13:01.467>the <00:13:01.595>type

318
00:13:02.635 --> 00:13:05.675
<00:13:02.635>or <00:13:02.775>whatever, <00:13:02.915>um, <00:13:03.055>this <00:13:03.194>is <00:13:03.335>a <00:13:03.475>sort <00:13:03.615>of <00:13:03.755>a <00:13:03.895>bad <00:13:04.035>idea

319
00:13:05.675 --> 00:13:07.675
<00:13:05.675>because <00:13:05.830>only <00:13:05.986>A <00:13:06.141>is <00:13:06.297>A <00:13:06.452>pointer <00:13:06.608>and <00:13:06.763>B <00:13:06.919>is <00:13:07.074>not

320
00:13:07.675 --> 00:13:10.035
<00:13:07.675>because <00:13:07.802>the <00:13:07.929>star <00:13:08.056>belongs <00:13:08.184>to <00:13:08.311>the <00:13:08.438>name <00:13:08.565>and <00:13:08.693>not <00:13:08.820>to <00:13:08.947>the <00:13:09.074>type.

321
00:13:12.255 --> 00:13:14.995
<00:13:12.255>We <00:13:12.410>can <00:13:12.566>also <00:13:12.721>initialize <00:13:12.877>variables. <00:13:13.032>So <00:13:13.188>now <00:13:13.343>D <00:13:13.499>is <00:13:13.655>42.

322
00:13:15.735 --> 00:13:17.635
<00:13:15.735>Um, <00:13:15.968>if <00:13:16.201>you <00:13:16.435>use <00:13:16.668>them, <00:13:16.901>initialize <00:13:17.135>them

323
00:13:17.635 --> 00:13:19.035
<00:13:17.635>by <00:13:17.949>calling <00:13:18.265>the <00:13:18.579>constructor, <00:13:18.895>that's

324
00:13:19.155 --> 00:13:20.235
<00:13:19.155>actually <00:13:19.349>what <00:13:19.543>are, <00:13:19.738>that's <00:13:19.932>a <00:13:20.127>function.

325
00:13:20.655 --> 00:13:23.075
<00:13:20.655>So <00:13:20.810>ease <00:13:20.966>of <00:13:21.121>functionality <00:13:21.277>returns <00:13:21.432>in <00:13:21.588>and <00:13:21.743>takes <00:13:21.899>no <00:13:22.055>arguments

326
00:13:23.585 --> 00:13:26.515
<00:13:23.585>because <00:13:23.785>you, <00:13:23.985>you <00:13:24.185>can <00:13:24.385>just <00:13:24.585>write <00:13:24.785>declare <00:13:24.985>functions.

327
00:13:26.855 --> 00:13:29.435
<00:13:26.855>So <00:13:26.971>now <00:13:27.088>F <00:13:27.205>is <00:13:27.321>a <00:13:27.438>function <00:13:27.555>that <00:13:27.671>takes <00:13:27.788>in <00:13:27.905>and <00:13:28.021>returns <00:13:28.138>an <00:13:28.255>in

328
00:13:29.535 --> 00:13:31.195
<00:13:29.535>and <00:13:29.709>we <00:13:29.885>just <00:13:30.060>declare <00:13:30.235>that <00:13:30.410>in <00:13:30.584>the <00:13:30.760>same <00:13:30.935>line

329
00:13:31.195 --> 00:13:32.395
<00:13:31.195>as <00:13:31.375>all <00:13:31.555>the <00:13:31.735>other <00:13:31.915>variables <00:13:32.095>in <00:13:32.275>there.

330
00:13:33.775 --> 00:13:35.475
<00:13:33.775>You <00:13:34.008>can <00:13:34.241>also <00:13:34.475>declare <00:13:34.708>functions <00:13:34.941>like <00:13:35.175>that.

331
00:13:35.655 --> 00:13:36.995
<00:13:35.655>So <00:13:35.856>I <00:13:36.057>believe <00:13:36.258>this <00:13:36.459>is <00:13:36.660>a <00:13:36.861>function

332
00:13:36.995 --> 00:13:39.315
<00:13:36.995>that <00:13:37.150>returns <00:13:37.306>a <00:13:37.461>function <00:13:37.617>pointer, <00:13:37.772>but <00:13:37.928>I'm <00:13:38.083>not <00:13:38.239>actually <00:13:38.395>sure

333
00:13:39.315 --> 00:13:41.035
<00:13:39.315>because <00:13:39.595>how <00:13:39.875>would <00:13:40.155>you <00:13:40.435>read <00:13:40.715>that

334
00:13:44.835 --> 00:13:46.485
<00:13:44.835>When <00:13:45.068>you <00:13:45.301>have <00:13:45.535>a <00:13:45.768>main <00:13:46.001>function, <00:13:46.235>um,

335
00:13:46.485 --> 00:13:47.725
<00:13:46.485>you <00:13:46.708>often <00:13:46.931>want <00:13:47.154>to <00:13:47.377>catch <00:13:47.601>exceptions.

336
00:13:47.725 --> 00:13:48.805
<00:13:47.725>So <00:13:47.919>you <00:13:48.113>have <00:13:48.308>your <00:13:48.502>actual <00:13:48.697>code

337
00:13:48.805 --> 00:13:50.205
<00:13:48.805>and <00:13:48.962>then <00:13:49.120>you <00:13:49.277>want <00:13:49.435>to <00:13:49.592>handle <00:13:49.750>all <00:13:49.907>the <00:13:50.065>exceptions

338
00:13:50.985 --> 00:13:53.165
<00:13:50.985>and <00:13:51.160>this <00:13:51.335>can <00:13:51.510>actually <00:13:51.685>be <00:13:51.860>a <00:13:52.035>bit <00:13:52.210>more <00:13:52.385>compactly

339
00:13:53.165 --> 00:13:54.205
<00:13:53.165>using <00:13:53.399>a <00:13:53.633>function <00:13:53.867>try <00:13:54.101>block.

340
00:13:54.205 --> 00:13:56.205
<00:13:54.205>So <00:13:54.360>we <00:13:54.516>can <00:13:54.671>essentially <00:13:54.827>get <00:13:54.982>rid <00:13:55.138>of <00:13:55.293>the <00:13:55.449>outer <00:13:55.605>braces

341
00:13:56.305 --> 00:13:57.565
<00:13:56.305>and <00:13:56.531>just <00:13:56.758>write <00:13:56.985>it <00:13:57.212>like <00:13:57.439>that.

342
00:13:57.825 --> 00:13:59.765
<00:13:57.825>So <00:13:57.952>now <00:13:58.079>we've <00:13:58.206>got <00:13:58.334>the <00:13:58.461>try <00:13:58.588>and <00:13:58.715>the <00:13:58.843>catches <00:13:58.970>sort <00:13:59.097>of <00:13:59.225>this

343
00:13:59.765 --> 00:14:02.805
<00:13:59.765>outside <00:13:59.920>the <00:14:00.076>function <00:14:00.231>and <00:14:00.387>this <00:14:00.542>one <00:14:00.698>doesn't <00:14:00.853>actually <00:14:01.009>save <00:14:01.165>you

344
00:14:02.805 --> 00:14:06.325
<00:14:02.805>a <00:14:02.921>bit <00:14:03.038>of <00:14:03.155>time <00:14:03.271>for <00:14:03.388>um, <00:14:03.505>bit <00:14:03.621>of <00:14:03.738>typing <00:14:03.854>for <00:14:03.971>the <00:14:04.088>main <00:14:04.204>function,

345
00:14:06.475 --> 00:14:07.885
<00:14:06.475>this <00:14:06.728>is <00:14:06.982>required <00:14:07.236>when <00:14:07.490>you <00:14:07.744>have

346
00:14:10.385 --> 00:14:11.545
<00:14:10.385>a <00:14:10.733>class <00:14:11.081>initializer <00:14:11.429>list.

347
00:14:11.685 --> 00:14:14.865
<00:14:11.685>So <00:14:11.840>here <00:14:11.996>we <00:14:12.151>want <00:14:12.307>to <00:14:12.462>initialize <00:14:12.618>member <00:14:12.773>this <00:14:12.929>can <00:14:13.084>throw.

348
00:14:14.885 --> 00:14:16.385
<00:14:14.885>So <00:14:15.077>we <00:14:15.270>want <00:14:15.463>to <00:14:15.656>catch <00:14:15.849>that <00:14:16.042>exception <00:14:16.235>somehow.

349
00:14:16.805 --> 00:14:18.465
<00:14:16.805>How <00:14:16.979>we <00:14:17.155>do, <00:14:17.329>how <00:14:17.505>we <00:14:17.680>do <00:14:17.854>that <00:14:18.030>we <00:14:18.204>have

350
00:14:18.465 --> 00:14:19.785
<00:14:18.465>to <00:14:18.663>use <00:14:18.861>a <00:14:19.059>function <00:14:19.257>five <00:14:19.454>block, <00:14:19.653>right?

351
00:14:20.085 --> 00:14:23.065
<00:14:20.085>So <00:14:20.225>we <00:14:20.365>can <00:14:20.505>put <00:14:20.645>the <00:14:20.785>try <00:14:20.925>outside <00:14:21.065>the <00:14:21.205>member <00:14:21.345>initializer <00:14:21.485>list

352
00:14:23.065 --> 00:14:25.665
<00:14:23.065>and <00:14:23.192>that <00:14:23.319>way <00:14:23.446>we <00:14:23.574>are <00:14:23.701>able <00:14:23.828>to <00:14:23.955>catch <00:14:24.083>exception <00:14:24.210>data <00:14:24.337>thrown <00:14:24.465>And

353
00:14:25.665 --> 00:14:26.345
<00:14:25.665>the <00:14:25.971>member <00:14:26.277>initializer,

354
00:14:31.195 --> 00:14:32.535
<00:14:31.195>The <00:14:31.436>standard <00:14:31.677>library <00:14:31.918>has <00:14:32.159>a <00:14:32.401>bunch

355
00:14:32.535 --> 00:14:34.535
<00:14:32.535>of <00:14:32.768>dynamic <00:14:33.001>size <00:14:33.235>sequence <00:14:33.468>containers <00:14:33.701>like <00:14:33.935>vector,

356
00:14:34.685 --> 00:14:38.265
<00:14:34.685>like <00:14:34.840>deck <00:14:34.996>like <00:14:35.151>list <00:14:35.307>like <00:14:35.462>forward, <00:14:35.618>that's <00:14:35.773>also <00:14:35.929>vector <00:14:36.084>bull.

357
00:14:38.325 --> 00:14:40.065
<00:14:38.325>It <00:14:38.605>behaves <00:14:38.885>differently <00:14:39.165>than <00:14:39.445>vector <00:14:39.725>T.

358
00:14:40.065 --> 00:14:41.625
<00:14:40.065>So <00:14:40.345>it's <00:14:40.625>technically <00:14:40.905>a <00:14:41.185>different <00:14:41.465>container,

359
00:14:41.625 --> 00:14:43.225
<00:14:41.625>just <00:14:41.825>shares <00:14:42.025>the <00:14:42.225>name <00:14:42.425>of <00:14:42.625>an <00:14:42.825>existing <00:14:43.025>one

360
00:14:43.965 --> 00:14:45.635
<00:14:43.965>and <00:14:44.165>then <00:14:44.365>there's <00:14:44.565>a <00:14:44.765>vale <00:14:44.965>array <00:14:45.165>of <00:14:45.365>T.

361
00:14:45.975 --> 00:14:47.675
<00:14:45.975>Now <00:14:46.175>vale <00:14:46.375>vela <00:14:46.575>ray <00:14:46.775>is <00:14:46.975>an <00:14:47.175>interesting <00:14:47.375>container

362
00:14:47.745 --> 00:14:51.325
<00:14:47.745>because <00:14:47.885>vela <00:14:48.025>ray <00:14:48.165>is <00:14:48.305>the <00:14:48.445>actual <00:14:48.585>vector <00:14:48.725>you <00:14:48.865>can <00:14:49.005>Dometic <00:14:49.145>with.

363
00:14:52.065 --> 00:14:54.045
<00:14:52.065>Um, <00:14:52.298>it <00:14:52.531>does <00:14:52.765>element <00:14:52.998>like <00:14:53.231>vector <00:14:53.465>arithmetic,

364
00:14:54.045 --> 00:14:55.045
<00:14:54.045>element <00:14:54.495>wise <00:14:54.944>operations.

365
00:14:55.585 --> 00:14:56.925
<00:14:55.585>You <00:14:55.757>can <00:14:55.929>also <00:14:56.101>treat <00:14:56.274>it <00:14:56.446>as <00:14:56.618>a <00:14:56.790>matrix

366
00:14:57.065 --> 00:14:58.645
<00:14:57.065>so <00:14:57.298>you <00:14:57.531>can <00:14:57.765>slice <00:14:57.998>over <00:14:58.231>the <00:14:58.465>diagonal

367
00:14:58.645 --> 00:15:00.165
<00:14:58.645>and <00:14:58.840>do <00:14:59.035>the <00:14:59.231>sum <00:14:59.426>to <00:14:59.622>compute <00:14:59.817>the <00:15:00.012>trace.

368
00:15:00.345 --> 00:15:02.005
<00:15:00.345>And <00:15:00.578>then <00:15:00.811>there's <00:15:01.045>another <00:15:01.278>bunch <00:15:01.511>of <00:15:01.745>um,

369
00:15:02.365 --> 00:15:03.605
<00:15:02.365>mathematical <00:15:03.481>operations.

370
00:15:04.145 --> 00:15:07.045
<00:15:04.145>So <00:15:04.345>science <00:15:04.545>is <00:15:04.745>overloaded, <00:15:04.944>cosign <00:15:05.145>is <00:15:05.345>overloaded, <00:15:05.545>whatever.

371
00:15:07.465 --> 00:15:09.045
<00:15:07.465>Um, <00:15:07.815>they <00:15:08.165>are <00:15:08.515>implicitly <00:15:08.865>respect.

372
00:15:09.105 --> 00:15:11.725
<00:15:09.105>So <00:15:09.305>if <00:15:09.505>you <00:15:09.705>have <00:15:09.905>two <00:15:10.105>arguments, <00:15:10.305>uh, <00:15:10.505>references,

373
00:15:11.785 --> 00:15:13.765
<00:15:11.785>the <00:15:11.959>compiler <00:15:12.135>can <00:15:12.310>assume <00:15:12.485>that <00:15:12.660>they <00:15:12.834>do <00:15:13.010>not <00:15:13.185>aliens

374
00:15:13.765 --> 00:15:14.925
<00:15:13.765>to <00:15:14.113>enable <00:15:14.461>better <00:15:14.809>optimization.

375
00:15:15.185 --> 00:15:17.165
<00:15:15.185>Um, <00:15:15.385>the <00:15:15.584>standard <00:15:15.785>library <00:15:15.984>can <00:15:16.185>use <00:15:16.385>expression <00:15:16.584>templates

376
00:15:17.165 --> 00:15:18.205
<00:15:17.165>for <00:15:17.477>even <00:15:17.789>more <00:15:18.101>optimizations.

377
00:15:18.505 --> 00:15:21.725
<00:15:18.505>So <00:15:18.660>it <00:15:18.816>seems <00:15:18.971>really <00:15:19.127>nice <00:15:19.282>yet <00:15:19.438>nobody <00:15:19.593>uses <00:15:19.749>that <00:15:19.905>type

378
00:15:23.255 --> 00:15:25.195
<00:15:23.255>and <00:15:23.395>that's <00:15:23.535>a <00:15:23.675>bit <00:15:23.814>of <00:15:23.955>a <00:15:24.095>shame <00:15:24.235>because <00:15:24.375>nobody <00:15:24.515>uses <00:15:24.655>it.

379
00:15:25.345 --> 00:15:26.995
<00:15:25.345>It's <00:15:25.520>not <00:15:25.695>as <00:15:25.870>optimized <00:15:26.045>as <00:15:26.220>it <00:15:26.395>could <00:15:26.570>have <00:15:26.745>been

380
00:15:26.995 --> 00:15:30.035
<00:15:26.995>because <00:15:27.150>just <00:15:27.306>we <00:15:27.461>decided <00:15:27.617>collectively <00:15:27.772>not <00:15:27.928>to <00:15:28.083>use <00:15:28.239>well <00:15:28.395>away

381
00:15:30.035 --> 00:15:31.195
<00:15:30.035>and <00:15:30.209>that's <00:15:30.383>instead <00:15:30.557>use <00:15:30.731>our <00:15:30.905>own <00:15:31.079>types.

382
00:15:31.855 --> 00:15:34.035
<00:15:31.855>But <00:15:32.055>if <00:15:32.255>you <00:15:32.455>have <00:15:32.655>a <00:15:32.855>dynamically <00:15:33.055>sized <00:15:33.255>vector,

383
00:15:34.185 --> 00:15:35.555
<00:15:34.185>this <00:15:34.361>might <00:15:34.537>be <00:15:34.713>a <00:15:34.889>good <00:15:35.065>type <00:15:35.241>to <00:15:35.417>use.

384
00:15:35.815 --> 00:15:40.745
<00:15:35.815>So <00:15:35.990>try <00:15:36.165>it <00:15:36.340>out. <00:15:36.515>When <00:15:36.690>you <00:15:36.865>have <00:15:37.040>a <00:15:37.215>class

385
00:15:40.745 --> 00:15:43.465
<00:15:40.745>hierarchy, <00:15:40.885>um, <00:15:41.025>you <00:15:41.165>want <00:15:41.305>to <00:15:41.445>do <00:15:41.585>sometimes <00:15:41.725>do <00:15:41.865>a <00:15:42.005>checkdown <00:15:42.145>cast.

386
00:15:43.485 --> 00:15:44.745
<00:15:43.485>So <00:15:43.674>here <00:15:43.863>we're <00:15:44.052>casting <00:15:44.241>a <00:15:44.430>base <00:15:44.619>pointer

387
00:15:44.745 --> 00:15:46.825
<00:15:44.745>to <00:15:44.900>a <00:15:45.056>derive <00:15:45.211>pointer <00:15:45.367>using <00:15:45.522>dynamic <00:15:45.678>cast <00:15:45.833>which <00:15:45.989>gives <00:15:46.145>you

388
00:15:47.105 --> 00:15:48.745
<00:15:47.105>feedback <00:15:47.455>whether <00:15:47.805>that <00:15:48.155>actually <00:15:48.505>worked.

389
00:15:50.225 --> 00:15:51.525
<00:15:50.225>You <00:15:50.420>can <00:15:50.615>also <00:15:50.810>use <00:15:51.005>a <00:15:51.200>side <00:15:51.395>cast.

390
00:15:51.945 --> 00:15:54.365
<00:15:51.945>So <00:15:52.085>here <00:15:52.225>we've <00:15:52.365>got <00:15:52.505>a <00:15:52.645>derived <00:15:52.785>class <00:15:52.925>that <00:15:53.065>has <00:15:53.205>two <00:15:53.345>bases

391
00:15:54.425 --> 00:15:55.685
<00:15:54.425>and <00:15:54.613>we've <00:15:54.803>got <00:15:54.992>a <00:15:55.180>pointer <00:15:55.369>to <00:15:55.559>one

392
00:15:55.685 --> 00:15:57.645
<00:15:55.685>and <00:15:55.801>we <00:15:55.918>want <00:15:56.035>to <00:15:56.151>convert <00:15:56.268>that <00:15:56.385>to <00:15:56.501>a <00:15:56.618>pointer <00:15:56.734>to <00:15:56.851>the <00:15:56.968>other <00:15:57.084>base.

393
00:15:57.745 --> 00:15:59.245
<00:15:57.745>And <00:15:57.970>this <00:15:58.195>essentially <00:15:58.420>goes <00:15:58.645>down <00:15:58.870>in <00:15:59.095>the

394
00:15:59.245 --> 00:16:00.325
<00:15:59.245>class <00:15:59.439>hierarchy <00:15:59.633>and <00:15:59.828>then <00:16:00.022>back <00:16:00.217>up.

395
00:16:00.425 --> 00:16:01.765
<00:16:00.425>And <00:16:00.666>this <00:16:00.907>is <00:16:01.148>a <00:16:01.389>checked <00:16:01.631>operation

396
00:16:01.825 --> 00:16:03.605
<00:16:01.825>so <00:16:01.965>you <00:16:02.105>will <00:16:02.245>get <00:16:02.385>no <00:16:02.525>pointer <00:16:02.665>if <00:16:02.805>that <00:16:02.945>one <00:16:03.085>doesn't <00:16:03.225>work.

397
00:16:04.905 --> 00:16:07.525
<00:16:04.905>But <00:16:05.045>you <00:16:05.185>can <00:16:05.324>also <00:16:05.464>use <00:16:05.605>a <00:16:05.745>dynamic <00:16:05.885>cluster <00:16:06.025>to <00:16:06.165>avoid <00:16:06.305>star

398
00:16:08.265 --> 00:16:10.245
<00:16:08.265>and <00:16:08.420>what <00:16:08.576>this <00:16:08.731>one <00:16:08.887>does, <00:16:09.042>it'll <00:16:09.198>gives <00:16:09.353>you <00:16:09.509>the <00:16:09.665>address

399
00:16:10.245 --> 00:16:11.445
<00:16:10.245>of <00:16:10.515>the <00:16:10.785>most <00:16:11.055>derived <00:16:11.325>object.

400
00:16:11.945 --> 00:16:13.405
<00:16:11.945>So <00:16:12.207>again, <00:16:12.470>derived <00:16:12.733>has <00:16:12.996>two <00:16:13.259>base

401
00:16:13.405 --> 00:16:14.685
<00:16:13.405>classes, <00:16:13.635>base <00:16:13.865>one <00:16:14.096>and <00:16:14.326>base <00:16:14.556>two.

402
00:16:14.785 --> 00:16:16.525
<00:16:14.785>And <00:16:14.940>this <00:16:15.096>time <00:16:15.251>we're <00:16:15.407>having <00:16:15.562>a <00:16:15.718>pointed <00:16:15.873>to <00:16:16.029>base <00:16:16.185>two

403
00:16:16.785 --> 00:16:18.885
<00:16:16.785>and <00:16:16.925>we <00:16:17.064>want <00:16:17.204>to <00:16:17.344>get <00:16:17.485>the <00:16:17.625>address <00:16:17.765>of <00:16:17.905>the <00:16:18.045>derived <00:16:18.185>object.

404
00:16:19.025 --> 00:16:20.725
<00:16:19.025>So <00:16:19.199>the <00:16:19.375>memory <00:16:19.550>layout <00:16:19.725>is <00:16:19.900>given <00:16:20.074>at <00:16:20.250>the <00:16:20.425>bottom.

405
00:16:20.905 --> 00:16:22.645
<00:16:20.905>So <00:16:21.045>we <00:16:21.185>have <00:16:21.324>got <00:16:21.464>a <00:16:21.605>pointed <00:16:21.745>to <00:16:21.885>the <00:16:22.025>beginning <00:16:22.165>of <00:16:22.305>base

406
00:16:22.905 --> 00:16:25.405
<00:16:22.905>and <00:16:23.045>the <00:16:23.185>dynamic <00:16:23.324>has <00:16:23.464>to <00:16:23.605>avoid <00:16:23.745>star <00:16:23.885>gives <00:16:24.025>you <00:16:24.165>the <00:16:24.305>actual

407
00:16:25.405 --> 00:16:27.645
<00:16:25.405>address <00:16:25.560>of <00:16:25.716>the <00:16:25.871>derived <00:16:26.027>object <00:16:26.182>that <00:16:26.338>is <00:16:26.493>stored <00:16:26.649>in <00:16:26.805>there.

408
00:16:28.675 --> 00:16:30.725
<00:16:28.675>It's <00:16:28.908>void <00:16:29.141>star <00:16:29.375>because <00:16:29.608>it <00:16:29.841>doesn't <00:16:30.074>know

409
00:16:30.725 --> 00:16:31.925
<00:16:30.725>statically <00:16:30.995>which <00:16:31.265>type <00:16:31.535>it <00:16:31.805>is.

410
00:16:31.925 --> 00:16:33.285
<00:16:31.925>So <00:16:32.099>it <00:16:32.274>only <00:16:32.449>can <00:16:32.624>give <00:16:32.799>you <00:16:32.974>the <00:16:33.149>address

411
00:16:33.285 --> 00:16:34.525
<00:16:33.285>and <00:16:33.508>not <00:16:33.731>the <00:16:33.954>actual <00:16:34.177>type <00:16:34.401>information.

412
00:16:34.945 --> 00:16:37.165
<00:16:34.945>But <00:16:35.120>that <00:16:35.295>is <00:16:35.470>useful. <00:16:35.645>For <00:16:35.820>example, <00:16:35.995>this <00:16:36.170>isn't <00:16:36.345>anywhere,

413
00:16:37.355 --> 00:16:38.885
<00:16:37.355>it's <00:16:37.551>just <00:16:37.748>a <00:16:37.945>pointer <00:16:38.141>and <00:16:38.338>a <00:16:38.535>type <00:16:38.732>info.

414
00:16:39.885 --> 00:16:40.985
<00:16:39.885>Um, <00:16:40.215>we <00:16:40.545>can <00:16:40.875>construct

415
00:16:40.985 --> 00:16:42.225
<00:16:40.985>it <00:16:41.171>normally <00:16:41.357>but <00:16:41.543>just <00:16:41.729>taking <00:16:41.915>the <00:16:42.101>address.

416
00:16:42.325 --> 00:16:44.465
<00:16:42.325>But <00:16:42.452>if <00:16:42.579>we <00:16:42.706>want <00:16:42.834>to <00:16:42.961>construct <00:16:43.088>it <00:16:43.215>from <00:16:43.343>a <00:16:43.470>base <00:16:43.597>class <00:16:43.725>object,

417
00:16:44.485 --> 00:16:46.425
<00:16:44.485>we <00:16:44.640>have <00:16:44.796>to <00:16:44.951>use <00:16:45.107>a <00:16:45.262>dynamic <00:16:45.418>cast <00:16:45.573>to <00:16:45.729>avoid <00:16:45.885>star

418
00:16:46.425 --> 00:16:48.305
<00:16:46.425>to <00:16:46.580>get <00:16:46.736>the <00:16:46.891>actual <00:16:47.047>address <00:16:47.202>that <00:16:47.358>we <00:16:47.513>need <00:16:47.669>to <00:16:47.824>store.

419
00:16:48.305 --> 00:16:51.745
<00:16:48.305>Otherwise <00:16:48.460>the <00:16:48.616>um, <00:16:48.771>downcast <00:16:48.927>later <00:16:49.082>on <00:16:49.238>will <00:16:49.393>not <00:16:49.549>work <00:16:49.704>correctly.

420
00:16:55.555 --> 00:16:58.415
<00:16:55.555>So <00:16:55.682>we <00:16:55.809>out <00:16:55.936>of <00:16:56.064>unions, <00:16:56.191>if <00:16:56.318>you <00:16:56.445>don't <00:16:56.573>want <00:16:56.700>to <00:16:56.827>use <00:16:56.954>any,

421
00:16:58.515 --> 00:17:01.095
<00:16:58.515>so <00:16:58.655>this <00:16:58.795>is <00:16:58.935>union <00:16:59.074>of <00:16:59.215>some <00:16:59.355>kind <00:16:59.495>of <00:16:59.635>uh, <00:16:59.775>UI <00:16:59.915>events.

422
00:17:01.395 --> 00:17:03.935
<00:17:01.395>So <00:17:01.502>we <00:17:01.610>have <00:17:01.718>a <00:17:01.825>tech, <00:17:01.933>an <00:17:02.041>IP <00:17:02.148>tech <00:17:02.256>and <00:17:02.364>then <00:17:02.471>a <00:17:02.579>much <00:17:02.687>of <00:17:02.795>payload.

423
00:17:04.075 --> 00:17:06.455
<00:17:04.075>And <00:17:04.215>if <00:17:04.355>you <00:17:04.495>compute <00:17:04.635>the <00:17:04.775>size, <00:17:04.915>this <00:17:05.055>will <00:17:05.194>be <00:17:05.335>the <00:17:05.475>size

424
00:17:06.455 --> 00:17:08.815
<00:17:06.454>of <00:17:06.629>three <00:17:06.804>U <00:17:06.980>30 <00:17:07.155>twos <00:17:07.329>and <00:17:07.504>it'll <00:17:07.679>be <00:17:07.855>three

425
00:17:08.815 --> 00:17:10.375
<00:17:08.815>because <00:17:09.048>of <00:17:09.281>the <00:17:09.515>padding <00:17:09.748>after <00:17:09.981>the <00:17:10.215>tech.

426
00:17:10.475 --> 00:17:11.655
<00:17:10.474>So <00:17:10.651>we've <00:17:10.829>got <00:17:11.005>an <00:17:11.183>eight <00:17:11.359>bit <00:17:11.537>tech

427
00:17:11.655 --> 00:17:13.015
<00:17:11.655>and <00:17:11.808>then <00:17:11.961>we've <00:17:12.114>got <00:17:12.267>a <00:17:12.420>bunch <00:17:12.573>of <00:17:12.726>padding <00:17:12.879>bytes

428
00:17:13.015 --> 00:17:15.215
<00:17:13.015>and <00:17:13.142>then <00:17:13.269>we've <00:17:13.396>got <00:17:13.524>the <00:17:13.651>payload <00:17:13.778>which <00:17:13.905>is <00:17:14.033>two <00:17:14.160>U <00:17:14.287>30 <00:17:14.415>each.

429
00:17:15.635 --> 00:17:17.215
<00:17:15.635>And <00:17:15.835>that's <00:17:16.035>a <00:17:16.234>bit <00:17:16.435>of <00:17:16.635>a <00:17:16.835>shame, <00:17:17.035>right,

430
00:17:17.215 --> 00:17:18.535
<00:17:17.214>because <00:17:17.452>we're <00:17:17.690>wasting <00:17:17.927>all <00:17:18.165>the <00:17:18.403>space

431
00:17:19.235 --> 00:17:20.455
<00:17:19.234>and <00:17:19.417>it's <00:17:19.600>even <00:17:19.783>more <00:17:19.966>of <00:17:20.149>a <00:17:20.332>shame

432
00:17:20.455 --> 00:17:22.135
<00:17:20.454>because <00:17:20.688>actually <00:17:20.921>there's <00:17:21.155>enough <00:17:21.388>padding <00:17:21.621>in <00:17:21.855>each

433
00:17:22.135 --> 00:17:23.735
<00:17:22.135>of <00:17:22.335>the <00:17:22.535>payload <00:17:22.734>to <00:17:22.935>also <00:17:23.135>store <00:17:23.335>the <00:17:23.535>tech.

434
00:17:23.995 --> 00:17:25.935
<00:17:23.994>But <00:17:24.169>we <00:17:24.344>cannot <00:17:24.520>store <00:17:24.694>the <00:17:24.869>tech <00:17:25.044>inside <00:17:25.219>the <00:17:25.395>payload

435
00:17:25.935 --> 00:17:27.295
<00:17:25.935>because <00:17:26.179>we <00:17:26.424>cannot <00:17:26.669>read <00:17:26.914>the <00:17:27.159>tech,

436
00:17:27.475 --> 00:17:29.935
<00:17:27.474>we <00:17:27.615>can <00:17:27.754>only <00:17:27.895>access <00:17:28.034>the <00:17:28.175>union <00:17:28.314>member <00:17:28.454>that <00:17:28.594>is <00:17:28.735>active, <00:17:28.875>right?

437
00:17:31.235 --> 00:17:34.415
<00:17:31.235>That's <00:17:31.375>actually <00:17:31.514>not <00:17:31.655>true. <00:17:31.794>So <00:17:31.935>we <00:17:32.074>can <00:17:32.215>read <00:17:32.354>a <00:17:32.495>union <00:17:32.635>member

438
00:17:34.415 --> 00:17:36.335
<00:17:34.415>that <00:17:34.615>isn't <00:17:34.815>active <00:17:35.014>as <00:17:35.215>long <00:17:35.415>as <00:17:35.615>is <00:17:35.815>part

439
00:17:36.335 --> 00:17:37.535
<00:17:36.335>of <00:17:36.605>the <00:17:36.875>common <00:17:37.145>initial <00:17:37.415>sequence.

440
00:17:38.525 --> 00:17:40.065
<00:17:38.525>So <00:17:38.987>it <00:17:39.449>just <00:17:39.911>straightforward.

441
00:17:40.065 --> 00:17:42.225
<00:17:40.065>If <00:17:40.240>you <00:17:40.415>have <00:17:40.590>two <00:17:40.765>types <00:17:40.940>and <00:17:41.115>they <00:17:41.290>all <00:17:41.465>start

442
00:17:42.225 --> 00:17:44.025
<00:17:42.225>with <00:17:42.458>the <00:17:42.691>same <00:17:42.925>types, <00:17:43.158>uh, <00:17:43.391>two <00:17:43.625>specs

443
00:17:44.025 --> 00:17:46.105
<00:17:44.025>and <00:17:44.165>they <00:17:44.305>all <00:17:44.445>start <00:17:44.585>with <00:17:44.725>the <00:17:44.865>same <00:17:45.005>types, <00:17:45.145>they <00:17:45.285>form <00:17:45.425>part

444
00:17:46.105 --> 00:17:47.265
<00:17:46.105>of <00:17:46.366>the <00:17:46.627>common <00:17:46.888>initial <00:17:47.149>sequence

445
00:17:47.365 --> 00:17:48.865
<00:17:47.365>and <00:17:47.590>you <00:17:47.815>can <00:17:48.040>reach <00:17:48.265>I <00:17:48.490>either <00:17:48.715>member

446
00:17:48.865 --> 00:17:50.085
<00:17:48.865>through <00:17:49.084>each <00:17:49.304>object <00:17:49.523>in <00:17:49.743>the <00:17:49.963>union.

447
00:17:51.075 --> 00:17:54.725
<00:17:51.075>What <00:17:51.191>this <00:17:51.308>means <00:17:51.425>is <00:17:51.541>that <00:17:51.658>we <00:17:51.775>can <00:17:51.891>get <00:17:52.008>rid <00:17:52.125>of <00:17:52.241>the <00:17:52.358>payload, <00:17:52.475>uh,

448
00:17:55.075 --> 00:17:57.285
<00:17:55.075>tech <00:17:55.250>payload, <00:17:55.425>we <00:17:55.600>can <00:17:55.775>just <00:17:55.950>store <00:17:56.125>the <00:17:56.300>tech <00:17:56.475>directly

449
00:17:57.285 --> 00:17:59.805
<00:17:57.285>inside <00:17:57.425>each <00:17:57.565>member <00:17:57.705>and <00:17:57.845>we <00:17:57.985>are <00:17:58.125>allowed <00:17:58.265>to <00:17:58.405>read <00:17:58.545>the <00:17:58.685>tech

450
00:18:00.485 --> 00:18:01.525
<00:18:00.485>regardless <00:18:00.719>which <00:18:00.953>member <00:18:01.187>is <00:18:01.421>active

451
00:18:01.525 --> 00:18:02.965
<00:18:01.525>because <00:18:01.741>all <00:18:01.957>members <00:18:02.173>start <00:18:02.389>with <00:18:02.605>the <00:18:02.821>tech.

452
00:18:03.385 --> 00:18:05.525
<00:18:03.385>And <00:18:03.525>if <00:18:03.665>we <00:18:03.805>compute <00:18:03.945>the <00:18:04.085>size, <00:18:04.225>now <00:18:04.365>we <00:18:04.504>are <00:18:04.645>saving <00:18:04.785>space

453
00:18:05.525 --> 00:18:08.445
<00:18:05.525>because <00:18:05.665>we <00:18:05.805>are <00:18:05.945>able <00:18:06.085>to <00:18:06.225>use <00:18:06.365>the <00:18:06.505>padding <00:18:06.645>inside <00:18:06.785>the <00:18:06.925>payload

454
00:18:08.445 --> 00:18:10.685
<00:18:08.445>that <00:18:08.600>is <00:18:08.756>already <00:18:08.911>there <00:18:09.067>and <00:18:09.222>to <00:18:09.378>store <00:18:09.533>them <00:18:09.689>more <00:18:09.845>efficiently.

455
00:18:10.785 --> 00:18:13.005
<00:18:10.785>And <00:18:10.940>this <00:18:11.096>is <00:18:11.251>completely <00:18:11.407>fine, <00:18:11.562>we <00:18:11.718>can <00:18:11.873>just <00:18:12.029>write <00:18:12.185>union

456
00:18:13.515 --> 00:18:15.405
<00:18:13.515>kind <00:18:13.748>regardless <00:18:13.981>of <00:18:14.215>which <00:18:14.448>member <00:18:14.681>is <00:18:14.915>active

457
00:18:15.405 --> 00:18:18.125
<00:18:15.405>because <00:18:15.560>all <00:18:15.716>members <00:18:15.871>have <00:18:16.027>the <00:18:16.182>kind <00:18:16.338>in <00:18:16.493>the <00:18:16.649>initial <00:18:16.805>position.

458
00:18:20.775 --> 00:18:22.145
<00:18:20.775>This <00:18:21.021>can <00:18:21.268>be <00:18:21.514>abused <00:18:21.761>a <00:18:22.008>bit.

459
00:18:22.145 --> 00:18:23.425
<00:18:22.145>So <00:18:22.289>if <00:18:22.433>you <00:18:22.577>have <00:18:22.721>a <00:18:22.865>type <00:18:23.009>that <00:18:23.153>is <00:18:23.297>empty

460
00:18:23.425 --> 00:18:24.625
<00:18:23.425>and <00:18:23.641>doesn't <00:18:23.857>have <00:18:24.072>a <00:18:24.289>default <00:18:24.505>constructor,

461
00:18:25.245 --> 00:18:26.825
<00:18:25.245>you <00:18:25.711>can <00:18:26.178>legally <00:18:26.645>create

462
00:18:26.825 --> 00:18:28.065
<00:18:26.825>that <00:18:27.104>object <00:18:27.383>even <00:18:27.662>though <00:18:27.941>it

463
00:18:28.065 --> 00:18:29.105
<00:18:28.065>doesn't <00:18:28.299>have <00:18:28.533>a <00:18:28.767>default <00:18:29.001>constructor.

464
00:18:29.805 --> 00:18:32.665
<00:18:29.805>Um, <00:18:29.932>there's <00:18:30.059>a <00:18:30.186>lightning <00:18:30.314>talk <00:18:30.441>at <00:18:30.568>c <00:18:30.695>plus <00:18:30.823>plus <00:18:30.950>now <00:18:31.077>2018, <00:18:31.205>um,

465
00:18:32.665 --> 00:18:33.705
<00:18:32.665>that <00:18:32.899>goes <00:18:33.133>into <00:18:33.367>that <00:18:33.601>trick.

466
00:18:33.705 --> 00:18:35.985
<00:18:33.705>It <00:18:33.905>uses <00:18:34.105>this <00:18:34.304>common <00:18:34.504>initial <00:18:34.705>sequence <00:18:34.905>trick <00:18:35.105>together

467
00:18:35.985 --> 00:18:37.185
<00:18:35.985>with <00:18:36.254>some <00:18:36.524>other <00:18:36.794>reinterpret <00:18:37.065>cast

468
00:18:37.205 --> 00:18:39.185
<00:18:37.205>to <00:18:37.405>legally <00:18:37.605>create <00:18:37.804>an <00:18:38.004>object <00:18:38.205>even <00:18:38.405>though <00:18:38.605>you're

469
00:18:39.185 --> 00:18:40.425
<00:18:39.185>not <00:18:39.408>supposed <00:18:39.631>to <00:18:39.854>create <00:18:40.077>that <00:18:40.301>object.

470
00:18:40.845 --> 00:18:41.745
<00:18:40.845>So <00:18:41.115>that's <00:18:41.385>an <00:18:41.655>interesting

471
00:18:41.745 --> 00:18:42.945
<00:18:41.745>hole <00:18:41.899>on <00:18:42.053>the <00:18:42.207>c <00:18:42.362>plus <00:18:42.516>plus <00:18:42.670>text <00:18:42.824>system.

472
00:18:43.915 --> 00:18:45.545
<00:18:43.915>Again, <00:18:44.115>the <00:18:44.315>link <00:18:44.514>is <00:18:44.715>also <00:18:44.915>at <00:18:45.115>the <00:18:45.315>end

473
00:18:47.325 --> 00:18:49.695
<00:18:47.325>Also <00:18:47.605>unions <00:18:47.885>can <00:18:48.165>have <00:18:48.445>member <00:18:48.725>functions,

474
00:18:49.695 --> 00:18:51.175
<00:18:49.695>they <00:18:49.885>can <00:18:50.075>have <00:18:50.265>constructors, <00:18:50.456>they <00:18:50.646>can <00:18:50.836>have <00:18:51.027>these

475
00:18:51.335 --> 00:18:52.415
<00:18:51.335>tors, <00:18:51.529>they <00:18:51.723>can <00:18:51.918>have <00:18:52.112>private <00:18:52.307>members.

476
00:18:52.645 --> 00:18:54.335
<00:18:52.645>They're <00:18:52.878>just <00:18:53.111>like <00:18:53.345>classes <00:18:53.578>in <00:18:53.811>that <00:18:54.045>regard.

477
00:18:54.335 --> 00:18:55.855
<00:18:54.335>Just <00:18:54.608>the <00:18:54.882>data <00:18:55.155>layout <00:18:55.429>is <00:18:55.703>different.

478
00:18:56.315 --> 00:18:58.255
<00:18:56.315>So <00:18:56.548>that's <00:18:56.781>nice <00:18:57.015>to <00:18:57.248>know <00:18:57.481>I <00:18:57.715>guess.

479
00:19:01.275 --> 00:19:03.375
<00:19:01.275>Now <00:19:01.475>this <00:19:01.675>is <00:19:01.875>a <00:19:02.075>function <00:19:02.275>that <00:19:02.475>takes <00:19:02.675>in

480
00:19:03.945 --> 00:19:05.535
<00:19:03.945>twins <00:19:04.225>in <00:19:04.504>some <00:19:04.784>stem <00:19:05.064>is <00:19:05.345>the

481
00:19:05.535 --> 00:19:06.895
<00:19:05.535>undefined <00:19:05.841>behavior <00:19:06.147>in <00:19:06.453>this <00:19:06.759>function.

482
00:19:08.685 --> 00:19:11.415
<00:19:08.685>Well <00:19:08.885>yes <00:19:09.085>we've <00:19:09.284>got <00:19:09.485>inte <00:19:09.685>the <00:19:09.885>overflow, <00:19:10.085>right?

483
00:19:11.995 --> 00:19:13.695
<00:19:11.995>Um, <00:19:12.228>this <00:19:12.461>can <00:19:12.695>be <00:19:12.928>inte <00:19:13.161>the <00:19:13.395>overflow

484
00:19:13.695 --> 00:19:14.895
<00:19:13.695>and <00:19:13.911>then <00:19:14.127>we've <00:19:14.342>got <00:19:14.559>undefined <00:19:14.775>behavior.

485
00:19:15.645 --> 00:19:16.975
<00:19:15.645>Same <00:19:16.043>deal <00:19:16.443>with <00:19:16.841>multiplication.

486
00:19:17.005 --> 00:19:19.575
<00:19:17.005>They <00:19:17.180>can <00:19:17.355>also <00:19:17.530>overflow <00:19:17.705>signs <00:19:17.880>into <00:19:18.055>the <00:19:18.230>under <00:19:18.405>overflow.

487
00:19:19.805 --> 00:19:23.955
<00:19:19.805>It's <00:19:20.005>undefined <00:19:20.205>behavior <00:19:20.405>and <00:19:20.605>in <00:19:20.805>fact <00:19:21.005>most <00:19:21.205>combinations

488
00:19:23.955 --> 00:19:25.915
<00:19:23.955>of <00:19:24.235>ins <00:19:24.514>are <00:19:24.794>inter <00:19:25.074>such <00:19:25.355>overflow

489
00:19:25.915 --> 00:19:27.475
<00:19:25.915>because <00:19:26.195>there <00:19:26.475>aren't <00:19:26.754>that <00:19:27.034>many <00:19:27.315>ins

490
00:19:27.475 --> 00:19:28.955
<00:19:27.475>that <00:19:27.665>you <00:19:27.855>multiply <00:19:28.045>still <00:19:28.236>fit <00:19:28.426>in <00:19:28.616>the <00:19:28.807>in.

491
00:19:29.015 --> 00:19:30.555
<00:19:29.015>So <00:19:29.188>if <00:19:29.361>you <00:19:29.534>just <00:19:29.708>call <00:19:29.881>it <00:19:30.054>with <00:19:30.227>random <00:19:30.401>values,

492
00:19:30.695 --> 00:19:32.515
<00:19:30.695>you <00:19:30.895>will <00:19:31.095>have <00:19:31.294>undefined <00:19:31.495>behavior <00:19:31.695>on <00:19:31.895>this <00:19:32.095>function,

493
00:19:32.515 --> 00:19:35.095
<00:19:32.515>which <00:19:32.981>is <00:19:33.448>nice <00:19:33.915>division.

494
00:19:35.435 --> 00:19:36.655
<00:19:35.435>Is <00:19:35.801>there <00:19:36.167>undefined <00:19:36.533>behavior

495
00:19:36.655 --> 00:19:37.775
<00:19:36.655>and <00:19:36.856>a <00:19:37.058>function <00:19:37.259>that <00:19:37.461>does <00:19:37.663>division?

496
00:19:38.445 --> 00:19:40.695
<00:19:38.445>Well <00:19:38.725>there <00:19:39.004>is <00:19:39.284>division <00:19:39.564>by <00:19:39.845>zero.

497
00:19:41.115 --> 00:19:42.615
<00:19:41.115>So <00:19:41.340>let's <00:19:41.565>guard <00:19:41.790>against <00:19:42.015>division <00:19:42.240>by <00:19:42.465>zero.

498
00:19:42.835 --> 00:19:45.055
<00:19:42.835>Is <00:19:43.068>there <00:19:43.301>still <00:19:43.535>undefined <00:19:43.768>behavior <00:19:44.001>and <00:19:44.235>dysfunction?

499
00:19:46.405 --> 00:19:49.785
<00:19:46.405>And <00:19:46.580>the <00:19:46.754>answer <00:19:46.930>is <00:19:47.105>yes <00:19:47.280>Because <00:19:47.455>of <00:19:47.629>two <00:19:47.805>compliments.

500
00:19:50.365 --> 00:19:52.305
<00:19:50.365>So <00:19:50.565>the <00:19:50.765>positive <00:19:50.965>values <00:19:51.165>are <00:19:51.365>start <00:19:51.565>with <00:19:51.765>zero

501
00:19:52.305 --> 00:19:53.545
<00:19:52.305>and <00:19:52.444>then <00:19:52.584>we've <00:19:52.723>got <00:19:52.863>a <00:19:53.002>bunch <00:19:53.142>of <00:19:53.281>the <00:19:53.421>data

502
00:19:53.645 --> 00:19:55.345
<00:19:53.645>and <00:19:53.845>the <00:19:54.045>negative <00:19:54.245>values <00:19:54.445>start <00:19:54.645>with <00:19:54.845>a <00:19:55.045>one.

503
00:19:56.525 --> 00:19:59.135
<00:19:56.525>What <00:19:56.680>about <00:19:56.836>zero <00:19:56.991>itself <00:19:57.147>means <00:19:57.302>zero <00:19:57.458>is <00:19:57.613>just <00:19:57.769>all <00:19:57.925>zeros.

504
00:19:59.525 --> 00:20:03.295
<00:19:59.525>This <00:19:59.680>means <00:19:59.836>that <00:19:59.991>we've <00:20:00.147>got <00:20:00.302>more <00:20:00.458>negative <00:20:00.613>values <00:20:00.769>than <00:20:00.925>positive

505
00:20:03.295 --> 00:20:05.495
<00:20:03.295>values <00:20:03.450>because <00:20:03.606>euro <00:20:03.761>takes <00:20:03.917>the <00:20:04.072>place <00:20:04.228>of <00:20:04.383>a <00:20:04.539>positive <00:20:04.695>value.

506
00:20:06.235 --> 00:20:10.055
<00:20:06.235>So <00:20:06.342>it <00:20:06.450>goes <00:20:06.558>down <00:20:06.665>to <00:20:06.773>negative <00:20:06.881>21, <00:20:06.988>28, <00:20:07.096>but <00:20:07.204>only <00:20:07.311>up <00:20:07.419>to <00:20:07.527>1 <00:20:07.635>27.

507
00:20:10.805 --> 00:20:13.295
<00:20:10.805>This <00:20:10.960>means <00:20:11.116>that <00:20:11.271>if <00:20:11.427>you <00:20:11.582>divide <00:20:11.738>inin <00:20:11.893>by <00:20:12.049>negative <00:20:12.205>one,

508
00:20:13.355 --> 00:20:14.615
<00:20:13.355>you <00:20:13.581>will <00:20:13.808>have <00:20:14.035>into <00:20:14.262>the <00:20:14.489>overflow

509
00:20:14.615 --> 00:20:16.455
<00:20:14.615>because <00:20:14.848>the <00:20:15.081>result <00:20:15.315>is <00:20:15.548>intax <00:20:15.781>plus <00:20:16.015>one

510
00:20:16.875 --> 00:20:18.815
<00:20:16.875>and <00:20:17.075>it <00:20:17.275>just <00:20:17.475>doesn't <00:20:17.675>fit <00:20:17.875>into <00:20:18.075>the <00:20:18.275>type.

511
00:20:19.235 --> 00:20:20.935
<00:20:19.235>And <00:20:19.435>this <00:20:19.635>is <00:20:19.834>the <00:20:20.034>only <00:20:20.235>combination <00:20:20.435>of <00:20:20.635>division

512
00:20:20.935 --> 00:20:22.255
<00:20:20.935>that <00:20:21.232>triggers <00:20:21.529>inter <00:20:21.826>the <00:20:22.123>overflow.

513
00:20:23.775 --> 00:20:25.665
<00:20:23.775>Okay, <00:20:24.055>modular <00:20:24.335>we <00:20:24.615>guard <00:20:24.895>against <00:20:25.175>zero,

514
00:20:25.805 --> 00:20:27.345
<00:20:25.805>is <00:20:26.267>there <00:20:26.729>undefined <00:20:27.191>behavior?

515
00:20:28.085 --> 00:20:31.825
<00:20:28.085>And <00:20:28.201>the <00:20:28.318>answer <00:20:28.435>is <00:20:28.551>yes <00:20:28.668>for <00:20:28.785>the <00:20:28.901>same <00:20:29.018>input <00:20:29.135>even <00:20:29.251>though <00:20:29.368>in <00:20:29.485>min

516
00:20:31.825 --> 00:20:33.265
<00:20:31.825>modular <00:20:32.149>negative <00:20:32.473>one <00:20:32.797>is <00:20:33.121>zero

517
00:20:33.265 --> 00:20:35.785
<00:20:33.265>because <00:20:33.405>it's <00:20:33.545>divis <00:20:33.685>by <00:20:33.825>negative <00:20:33.965>one <00:20:34.105>you <00:20:34.245>still <00:20:34.385>have <00:20:34.525>inter <00:20:34.665>the

518
00:20:35.785 --> 00:20:39.775
<00:20:35.785>overflow <00:20:36.018>because <00:20:36.251>the <00:20:36.485>standard <00:20:36.718>saysso, <00:20:36.951>it <00:20:37.185>says

519
00:20:39.775 --> 00:20:41.935
<00:20:39.775>that <00:20:39.950>if <00:20:40.125>A <00:20:40.300>divided <00:20:40.475>by <00:20:40.650>B <00:20:40.825>is <00:20:41.000>undefined <00:20:41.175>behavior,

520
00:20:42.005 --> 00:20:44.055
<00:20:42.005>then <00:20:42.180>also <00:20:42.355>a <00:20:42.530>model <00:20:42.705>of <00:20:42.880>B <00:20:43.055>is <00:20:43.230>undefined <00:20:43.405>behavior.

521
00:20:44.795 --> 00:20:46.015
<00:20:44.795>And <00:20:45.014>this <00:20:45.234>is <00:20:45.453>a <00:20:45.673>good <00:20:45.893>reason.

522
00:20:47.255 --> 00:20:50.315
<00:20:47.255>For <00:20:47.410>example, <00:20:47.566>on <00:20:47.721>inter <00:20:47.877>you <00:20:48.032>have <00:20:48.188>the <00:20:48.343>idea <00:20:48.499>of <00:20:48.655>instruction

523
00:20:50.315 --> 00:20:52.595
<00:20:50.315>to <00:20:50.490>do <00:20:50.665>division <00:20:50.840>and <00:20:51.015>this <00:20:51.190>computes <00:20:51.365>both <00:20:51.540>the <00:20:51.715>quotient

524
00:20:52.595 --> 00:20:54.035
<00:20:52.595>and <00:20:52.854>the <00:20:53.113>remainder <00:20:53.372>and <00:20:53.631>then <00:20:53.891>you

525
00:20:54.035 --> 00:20:55.155
<00:20:54.035>just <00:20:54.371>return <00:20:54.707>different <00:20:55.043>results.

526
00:20:55.335 --> 00:20:57.395
<00:20:55.335>So <00:20:55.510>if <00:20:55.685>the <00:20:55.860>division <00:20:56.035>already <00:20:56.210>has <00:20:56.385>inter <00:20:56.560>the <00:20:56.735>overflow

527
00:20:57.395 --> 00:20:58.715
<00:20:57.395>because <00:20:57.692>it's <00:20:57.989>the <00:20:58.285>same <00:20:58.582>instruction,

528
00:20:58.735 --> 00:21:00.515
<00:20:58.735>the <00:20:58.968>remainder <00:20:59.201>also <00:20:59.435>has <00:20:59.668>inter <00:20:59.901>the <00:21:00.135>overflow

529
00:21:02.905 --> 00:21:04.205
<00:21:02.905>And <00:21:03.100>on <00:21:03.295>arm <00:21:03.490>it's <00:21:03.685>even <00:21:03.879>more <00:21:04.074>obvious

530
00:21:04.205 --> 00:21:05.965
<00:21:04.205>because <00:21:04.438>arm <00:21:04.671>doesn't <00:21:04.905>have <00:21:05.138>a <00:21:05.371>modular <00:21:05.605>instruction.

531
00:21:05.965 --> 00:21:07.325
<00:21:05.965>So <00:21:06.209>it <00:21:06.454>essentially <00:21:06.699>does <00:21:06.944>a <00:21:07.189>division

532
00:21:07.425 --> 00:21:09.165
<00:21:07.425>and <00:21:07.658>multiplies <00:21:07.891>back <00:21:08.125>and <00:21:08.358>takes <00:21:08.591>the <00:21:08.825>difference.

533
00:21:09.305 --> 00:21:11.525
<00:21:09.305>And <00:21:09.460>so <00:21:09.616>if <00:21:09.771>the <00:21:09.927>division <00:21:10.082>overflows <00:21:10.238>then <00:21:10.393>we <00:21:10.549>cannot <00:21:10.705>just

534
00:21:11.525 --> 00:21:12.565
<00:21:11.525>compute <00:21:11.759>the <00:21:11.993>value <00:21:12.227>at <00:21:12.461>all.

535
00:21:12.865 --> 00:21:15.605
<00:21:12.865>So <00:21:13.005>this <00:21:13.145>makes <00:21:13.285>sense, <00:21:13.425>it's <00:21:13.565>just <00:21:13.705>a <00:21:13.845>bit <00:21:13.985>confusing <00:21:14.125>when <00:21:14.265>you

536
00:21:15.605 --> 00:21:16.645
<00:21:15.605>look <00:21:15.839>at <00:21:16.073>an <00:21:16.307>in <00:21:16.541>debugger.

537
00:21:16.825 --> 00:21:18.485
<00:21:16.825>So <00:21:17.175>LDB <00:21:17.525>says <00:21:17.875>we <00:21:18.225>stopped

538
00:21:18.485 --> 00:21:20.765
<00:21:18.485>because <00:21:18.659>of <00:21:18.834>a <00:21:19.010>floating <00:21:19.185>point <00:21:19.360>exception <00:21:19.534>into <00:21:19.709>the <00:21:19.885>divide

539
00:21:20.765 --> 00:21:22.725
<00:21:20.765>by <00:21:20.940>zero, <00:21:21.115>but <00:21:21.290>that's <00:21:21.465>not <00:21:21.640>at <00:21:21.815>all <00:21:21.990>what <00:21:22.165>happens.

540
00:21:22.745 --> 00:21:24.925
<00:21:22.745>We <00:21:22.978>are <00:21:23.211>dividing <00:21:23.445>in <00:21:23.678>min <00:21:23.911>modular <00:21:24.145>one.

541
00:21:25.465 --> 00:21:27.565
<00:21:25.465>So <00:21:25.639>that's <00:21:25.814>a <00:21:25.990>bit <00:21:26.165>of <00:21:26.340>a <00:21:26.514>confusing <00:21:26.689>error <00:21:26.865>message.

542
00:21:30.385 --> 00:21:31.425
<00:21:30.385>I <00:21:30.541>want <00:21:30.697>to <00:21:30.853>close <00:21:31.009>this <00:21:31.165>talk <00:21:31.321>with

543
00:21:31.425 --> 00:21:32.625
<00:21:31.425>my <00:21:31.641>favorite <00:21:31.857>c <00:21:32.072>plus <00:21:32.289>plus <00:21:32.505>question.

544
00:21:32.925 --> 00:21:35.025
<00:21:32.925>So <00:21:33.065>this <00:21:33.205>is <00:21:33.345>a <00:21:33.485>piece <00:21:33.625>of <00:21:33.764>code, <00:21:33.905>what <00:21:34.044>does <00:21:34.185>it <00:21:34.325>print?

545
00:21:36.255 --> 00:21:38.595
<00:21:36.255>So <00:21:36.410>we've <00:21:36.566>got <00:21:36.721>size <00:21:36.877>of <00:21:37.032>plus <00:21:37.188>a <00:21:37.343>index <00:21:37.499>into <00:21:37.655>the

546
00:21:38.595 --> 00:21:39.835
<00:21:38.595>string, <00:21:38.818>2, <00:21:39.041>3, <00:21:39.264>4, <00:21:39.487>5, <00:21:39.711>6.

547
00:21:40.335 --> 00:21:41.235
<00:21:40.335>And <00:21:40.497>we've <00:21:40.658>looked <00:21:40.821>at <00:21:40.983>all <00:21:41.145>the

548
00:21:41.235 --> 00:21:42.395
<00:21:41.235>individual <00:21:41.495>parts <00:21:41.756>of <00:21:42.018>this <00:21:42.279>question.

549
00:21:43.855 --> 00:21:46.955
<00:21:43.855>So <00:21:44.010>we've <00:21:44.166>got <00:21:44.321>a <00:21:44.477>string <00:21:44.632>that <00:21:44.788>well, <00:21:44.943>which <00:21:45.099>is <00:21:45.255>now

550
00:21:48.655 --> 00:21:51.735
<00:21:48.655>a <00:21:48.830>is <00:21:49.004>short <00:21:49.180>ary <00:21:49.355>plus <00:21:49.530>does <00:21:49.705>inter <00:21:49.879>the <00:21:50.055>promotion.

551
00:21:51.735 --> 00:21:56.485
<00:21:51.735>So <00:21:51.935>we'll <00:21:52.135>enter <00:21:52.334>with <00:21:52.534>in <00:21:52.735>size <00:21:52.935>of <00:21:53.135>returns

552
00:21:56.485 --> 00:22:00.775
<00:21:56.485>as <00:21:56.659>stood <00:21:56.834>size <00:21:57.010>the <00:21:57.185>size <00:21:57.360>of <00:21:57.534>of <00:21:57.709>Charles <00:21:57.885>one.

553
00:22:00.775 --> 00:22:01.975
<00:22:00.775>Otherwise <00:22:01.135>it's <00:22:01.495>implementation <00:22:01.855>defined.

554
00:22:01.995 --> 00:22:04.815
<00:22:01.995>But <00:22:02.135>we <00:22:02.274>are <00:22:02.415>given <00:22:02.554>the <00:22:02.695>platform, <00:22:02.834>it's <00:22:02.975>LP <00:22:03.114>64, <00:22:03.254>that's <00:22:03.395>size

555
00:22:04.815 --> 00:22:08.895
<00:22:04.815>of <00:22:04.970>index <00:22:05.126>four <00:22:05.281>we <00:22:05.437>built <00:22:05.592>in <00:22:05.748>our <00:22:05.903>index <00:22:06.059>operators <00:22:06.215>commutative.

556
00:22:10.155 --> 00:22:12.615
<00:22:10.155>So <00:22:10.310>we've <00:22:10.466>got <00:22:10.621>four <00:22:10.777>index, <00:22:10.932>2, <00:22:11.088>3, <00:22:11.243>4, <00:22:11.399>5, <00:22:11.555>6.

557
00:22:12.645 --> 00:22:14.015
<00:22:12.645>It's <00:22:12.850>the <00:22:13.056>same <00:22:13.261>as <00:22:13.467>swapping <00:22:13.672>the <00:22:13.878>arguments.

558
00:22:14.035 --> 00:22:16.615
<00:22:14.035>So <00:22:14.175>we <00:22:14.315>get <00:22:14.455>the <00:22:14.595>character <00:22:14.735>six <00:22:14.875>because <00:22:15.015>that's <00:22:15.155>at <00:22:15.295>index <00:22:15.435>four.

559
00:22:18.345 --> 00:22:20.525
<00:22:18.345>So <00:22:18.520>back <00:22:18.695>when <00:22:18.870>then <00:22:19.045>Twitter <00:22:19.220>was <00:22:19.395>still <00:22:19.570>Twitter, <00:22:19.745>um,

560
00:22:20.525 --> 00:22:21.805
<00:22:20.525>that <00:22:20.717>was <00:22:20.909>the <00:22:21.101>result <00:22:21.293>of <00:22:21.485>the <00:22:21.677>poll.

561
00:22:21.805 --> 00:22:23.925
<00:22:21.805>So <00:22:22.038>it's <00:22:22.271>six, <00:22:22.505>right? <00:22:22.738>Twitter <00:22:22.971>was <00:22:23.205>right.

562
00:22:24.295 --> 00:22:25.925
<00:22:24.295>Let's <00:22:24.575>actually <00:22:24.855>compile <00:22:25.135>the <00:22:25.415>program <00:22:25.695>just

563
00:22:25.925 --> 00:22:27.765
<00:22:25.925>to <00:22:26.158>make <00:22:26.391>sure <00:22:26.625>and <00:22:26.858>it <00:22:27.091>print <00:22:27.325>one.

564
00:22:29.435 --> 00:22:31.575
<00:22:29.435>So <00:22:29.610>you <00:22:29.784>might <00:22:29.960>not <00:22:30.135>know <00:22:30.310>who <00:22:30.485>Richard <00:22:30.659>Smith <00:22:30.835>is.

565
00:22:31.635 --> 00:22:33.455
<00:22:31.635>Um, <00:22:31.835>at <00:22:32.035>the <00:22:32.235>time <00:22:32.435>Richard <00:22:32.635>Smith <00:22:32.835>was <00:22:33.035>the

566
00:22:33.455 --> 00:22:34.655
<00:22:33.455>editor <00:22:33.635>of <00:22:33.815>the <00:22:33.995>c <00:22:34.175>plus <00:22:34.355>plus <00:22:34.534>standard.

567
00:22:34.915 --> 00:22:37.015
<00:22:34.915>So <00:22:35.115>he <00:22:35.315>was <00:22:35.514>responsible <00:22:35.715>of <00:22:35.915>merging <00:22:36.115>all <00:22:36.315>changes

568
00:22:37.035 --> 00:22:38.175
<00:22:37.035>and <00:22:37.377>writing <00:22:37.719>the <00:22:38.061>specification

569
00:22:38.175 --> 00:22:39.655
<00:22:38.175>for <00:22:38.341>them <00:22:38.508>in <00:22:38.674>the <00:22:38.841>standard <00:22:39.007>in <00:22:39.174>a <00:22:39.340>Korean <00:22:39.507>way.

570
00:22:40.035 --> 00:22:41.215
<00:22:40.035>So <00:22:40.300>there <00:22:40.566>is <00:22:40.831>this <00:22:41.097>saying

571
00:22:41.215 --> 00:22:43.015
<00:22:41.215>that <00:22:41.448>nobody <00:22:41.681>really <00:22:41.915>knows <00:22:42.148>c <00:22:42.381>plus <00:22:42.615>plus.

572
00:22:43.125 --> 00:22:45.895
<00:22:43.125>Well <00:22:43.280>Richard <00:22:43.436>Smith <00:22:43.591>is <00:22:43.747>nobody. <00:22:43.902>He <00:22:44.058>knows <00:22:44.213>c <00:22:44.369>plus <00:22:44.525>plus.

573
00:22:45.915 --> 00:22:47.815
<00:22:45.915>And <00:22:46.090>when <00:22:46.264>he <00:22:46.440>asks <00:22:46.615>a <00:22:46.790>question <00:22:46.965>it <00:22:47.139>has <00:22:47.315>layers.

574
00:22:48.835 --> 00:22:50.935
<00:22:48.835>And <00:22:49.010>the <00:22:49.185>layer <00:22:49.360>here <00:22:49.535>is <00:22:49.710>the <00:22:49.885>fact <00:22:50.060>that <00:22:50.235>size

575
00:22:50.935 --> 00:22:52.335
<00:22:50.935>of <00:22:51.250>is <00:22:51.565>a <00:22:51.880>ary <00:22:52.195>operator

576
00:22:52.995 --> 00:22:54.215
<00:22:52.995>and <00:22:53.269>it's <00:22:53.543>a <00:22:53.818>ary <00:22:54.092>operator

577
00:22:54.245 --> 00:22:56.615
<00:22:54.245>that <00:22:54.445>has <00:22:54.645>a <00:22:54.844>lower <00:22:55.044>precedence <00:22:55.245>than <00:22:55.445>airway <00:22:55.645>index.

578
00:22:57.395 --> 00:23:00.495
<00:22:57.395>So <00:22:57.535>what <00:22:57.675>this <00:22:57.815>code <00:22:57.955>actually <00:22:58.095>does <00:22:58.235>is <00:22:58.375>more <00:22:58.514>obvious <00:22:58.655>when <00:22:58.795>he

579
00:23:00.495 --> 00:23:03.215
<00:23:00.495>inside <00:23:00.650>the <00:23:00.806>bit <00:23:00.961>of <00:23:01.117>white <00:23:01.272>space, <00:23:01.428>it's <00:23:01.583>a <00:23:01.739>urinary <00:23:01.895>operator

580
00:23:03.355 --> 00:23:04.495
<00:23:03.355>on <00:23:03.697>the <00:23:04.039>index <00:23:04.380>operation.

581
00:23:05.035 --> 00:23:07.495
<00:23:05.035>So <00:23:05.175>if <00:23:05.315>you <00:23:05.455>put <00:23:05.595>parents <00:23:05.735>around <00:23:05.875>it, <00:23:06.015>we <00:23:06.155>do <00:23:06.295>the <00:23:06.435>index

582
00:23:07.595 --> 00:23:08.695
<00:23:07.595>and <00:23:07.793>then <00:23:07.991>we <00:23:08.189>do <00:23:08.387>size <00:23:08.585>off

583
00:23:09.275 --> 00:23:11.295
<00:23:09.275>and <00:23:09.450>size <00:23:09.625>of <00:23:09.800>off <00:23:09.975>charge <00:23:10.150>defined <00:23:10.325>to <00:23:10.500>be <00:23:10.675>one.

584
00:23:11.675 --> 00:23:13.255
<00:23:11.675>The <00:23:12.024>program <00:23:12.375>is <00:23:12.725>completely <00:23:13.075>portable.

585
00:23:13.255 --> 00:23:15.655
<00:23:13.255>The <00:23:13.371>fact <00:23:13.488>that <00:23:13.605>he <00:23:13.721>told <00:23:13.838>us <00:23:13.955>the <00:23:14.071>platform <00:23:14.188>is <00:23:14.305>just <00:23:14.421>a <00:23:14.538>we <00:23:14.655>herring

586
00:23:16.115 --> 00:23:17.695
<00:23:16.115>to <00:23:16.315>make <00:23:16.515>you <00:23:16.715>not <00:23:16.915>aware <00:23:17.115>of <00:23:17.315>this <00:23:17.515>fact.

587
00:23:17.835 --> 00:23:19.575
<00:23:17.835>So <00:23:18.035>this <00:23:18.235>is <00:23:18.435>why <00:23:18.635>I <00:23:18.835>love <00:23:19.035>this <00:23:19.235>code.

588
00:23:21.455 --> 00:23:24.435
<00:23:21.455>So, <00:23:21.571>uh, <00:23:21.688>I <00:23:21.804>I <00:23:21.921>think <00:23:22.038>so <00:23:22.155>we <00:23:22.271>also <00:23:22.388>hiring, <00:23:22.504>we <00:23:22.621>have <00:23:22.738>a <00:23:22.855>booth.

589
00:23:24.575 --> 00:23:26.075
<00:23:24.575>So <00:23:24.743>if <00:23:24.912>you <00:23:25.081>promised <00:23:25.250>me <00:23:25.418>not <00:23:25.587>to <00:23:25.756>use <00:23:25.925>some

590
00:23:26.075 --> 00:23:27.475
<00:23:26.075>of <00:23:26.255>the <00:23:26.435>techniques <00:23:26.615>I've <00:23:26.795>just <00:23:26.975>shown <00:23:27.155>in <00:23:27.335>the

591
00:23:27.475 --> 00:23:28.835
<00:23:27.475>stock, <00:23:27.719>you <00:23:27.964>are <00:23:28.209>welcome <00:23:28.454>to <00:23:28.699>apply.

592
00:23:29.175 --> 00:23:30.955
<00:23:29.175>Um, <00:23:29.408>at <00:23:29.641>that <00:23:29.875>slide, <00:23:30.108>uh, <00:23:30.341>you <00:23:30.575>are,

593
00:23:31.055 --> 00:23:33.275
<00:23:31.055>you <00:23:31.230>will <00:23:31.405>find <00:23:31.580>all <00:23:31.755>the <00:23:31.930>links <00:23:32.105>related, <00:23:32.280>uh, <00:23:32.455>resources

594
00:23:33.275 --> 00:23:35.235
<00:23:33.275>and <00:23:33.415>also <00:23:33.555>the <00:23:33.695>slides <00:23:33.835>for <00:23:33.975>a <00:23:34.115>longer <00:23:34.255>version <00:23:34.395>of <00:23:34.535>the <00:23:34.675>stock

595
00:23:35.285 --> 00:23:37.395
<00:23:35.285>where <00:23:35.440>I <00:23:35.596>showed <00:23:35.751>even <00:23:35.907>more <00:23:36.062>horrible <00:23:36.218>c <00:23:36.373>plus <00:23:36.529>plus <00:23:36.685>features.

596
00:23:37.525 --> 00:23:39.195
<00:23:37.525>Thank <00:23:37.700>you <00:23:37.875>very <00:23:38.050>much <00:23:38.225>for <00:23:38.400>your <00:23:38.575>attention. <00:23:38.750>I <00:23:38.925>hope.

597
00:23:46.345 --> 00:23:50.285
<00:23:46.345>Wow, <00:23:46.625>we <00:23:46.905>have <00:23:47.185>a <00:23:47.465>question. <00:23:47.745>Mm-Hmm?

598
00:23:50.505 --> 00:23:53.685
<00:23:50.505>Is <00:23:50.680>floating <00:23:50.855>point <00:23:51.030>exception <00:23:51.205>flag <00:23:51.380>a <00:23:51.555>threat <00:23:51.730>local? <00:23:51.905>Yes,

599
00:23:54.205 --> 00:23:55.205
<00:23:54.205>I <00:23:54.655>hope <00:23:55.105>so.

600
00:23:57.185 --> 00:23:58.845
<00:23:57.185>So <00:23:57.465>I'm <00:23:57.745>I'm <00:23:58.024>not <00:23:58.304>actually <00:23:58.585>sure,

601
00:23:58.865 --> 00:24:01.165
<00:23:58.865>but <00:23:58.992>I'm <00:23:59.119>hope <00:23:59.246>so <00:23:59.374>that <00:23:59.501>they <00:23:59.628>made <00:23:59.755>it <00:23:59.883>that <00:24:00.010>local <00:24:00.137>at <00:24:00.265>least

602
00:24:01.165 --> 00:24:02.205
<00:24:01.165>after <00:24:01.399>c <00:24:01.633>plus <00:24:01.867>plus <00:24:02.101>11.

603
00:24:02.205 --> 00:24:04.605
<00:24:02.205>Otherwise <00:24:02.379>there's <00:24:02.554>no <00:24:02.730>way <00:24:02.905>to <00:24:03.080>use <00:24:03.254>the <00:24:03.429>feature <00:24:03.605>correctly.

604
00:24:05.695 --> 00:24:08.825
<00:24:05.695>Okay, <00:24:05.870>thank <00:24:06.044>you. <00:24:06.220>So <00:24:06.395>thank <00:24:06.570>you <00:24:06.745>for <00:24:06.919>being <00:24:07.095>here.

605
00:24:08.885 --> 00:24:10.905
<00:24:08.885>Thanks, <00:24:09.085>uh, <00:24:09.285>enjoy <00:24:09.485>the <00:24:09.685>rest <00:24:09.885>of <00:24:10.085>the <00:24:10.285>conference.

606
00:24:10.905 --> 00:24:13.145
<00:24:10.905>Have <00:24:11.060>a <00:24:11.216>good <00:24:11.371>day. <00:24:11.527>Thank <00:24:11.682>you. <00:24:11.838>Yeah, <00:24:11.993>you <00:24:12.149>too. <00:24:12.305>Okay.