WEBVTT

1
00:00:05.100 --> 00:00:11.800
<00:00:05.100>It <00:00:06.500>welcome

2
00:00:09.800 --> 00:00:12.600
<00:00:09.800>everyone <00:00:11.200>to

3
00:00:12.600 --> 00:00:15.600
<00:00:12.600>my <00:00:12.833>presentation <00:00:13.066>about <00:00:13.299>moving <00:00:13.533>from <00:00:13.766>java <00:00:14.000>to

4
00:00:15.600 --> 00:00:18.300
<00:00:15.600>kotlin. <00:00:15.775>My <00:00:15.950>name <00:00:16.125>is <00:00:16.300>orz <00:00:16.475>Peter. <00:00:16.650>I'm <00:00:16.825>from <00:00:17.000>Netherlands.

5
00:00:19.800 --> 00:00:22.500
<00:00:19.800>I <00:00:19.940>have <00:00:20.080>gray <00:00:20.220>hair. <00:00:20.360>So <00:00:20.500>I <00:00:20.640>dare <00:00:20.780>to <00:00:20.920>say <00:00:21.060>to <00:00:21.200>call

6
00:00:22.500 --> 00:00:25.900
<00:00:22.500>myself <00:00:22.655>a <00:00:22.811>senior <00:00:22.966>software <00:00:23.122>engineer <00:00:23.277>mainly <00:00:23.433>focusing <00:00:23.588>on <00:00:23.744>backend <00:00:23.900>development

7
00:00:25.900 --> 00:00:28.300
<00:00:25.900>with <00:00:26.180>these <00:00:26.459>languages <00:00:26.740>and <00:00:27.020>for <00:00:27.299>about

8
00:00:28.300 --> 00:00:31.900
<00:00:28.300>the <00:00:28.407>last <00:00:28.515>three <00:00:28.623>to <00:00:28.730>four <00:00:28.838>years. <00:00:28.946>I've <00:00:29.053>mostly <00:00:29.161>used <00:00:29.269>kotlin <00:00:29.376>for <00:00:29.484>that <00:00:29.592>besides <00:00:29.700>that

9
00:00:31.900 --> 00:00:34.600
<00:00:31.900>I'm <00:00:32.100>also <00:00:32.299>a <00:00:32.500>chat <00:00:32.699>print <00:00:32.900>certified <00:00:33.100>kotlin <00:00:33.300>trainer

10
00:00:34.600 --> 00:00:37.400
<00:00:34.600>very <00:00:34.833>help <00:00:35.066>developers <00:00:35.300>adopt <00:00:35.533>kotlin <00:00:35.766>in <00:00:36.000>all

11
00:00:37.400 --> 00:00:40.200
<00:00:37.400>stages <00:00:37.600>of <00:00:37.800>their <00:00:38.000>Journey <00:00:38.199>Begins <00:00:38.400>intermediate <00:00:38.600>and <00:00:38.800>advanced.

12
00:00:41.500 --> 00:00:44.300
<00:00:41.500>That's <00:00:41.675>about <00:00:41.850>me. <00:00:42.025>I <00:00:42.200>would <00:00:42.375>also <00:00:42.550>like <00:00:42.725>a <00:00:42.900>little

13
00:00:44.300 --> 00:00:47.400
<00:00:44.300>bit <00:00:44.474>more <00:00:44.650>about <00:00:44.824>you <00:00:45.000>who've <00:00:45.175>you <00:00:45.349>considers <00:00:45.525>himself <00:00:45.699>a

14
00:00:48.300 --> 00:00:50.500
<00:00:48.300>charity <00:00:48.474>developer <00:00:48.650>that <00:00:48.824>uses <00:00:49.000>Java <00:00:49.175>as <00:00:49.349>a <00:00:49.525>main <00:00:49.699>language

15
00:00:52.200 --> 00:00:55.200
<00:00:52.200>Okay, <00:00:52.480>interesting <00:00:52.760>who <00:00:53.040>of <00:00:53.320>you <00:00:53.600>has

16
00:00:55.200 --> 00:00:56.200
<00:00:55.200>used <00:00:56.100>kotlin?

17
00:00:57.800 --> 00:01:01.400
<00:00:57.800>About <00:00:58.033>almost <00:00:58.266>as <00:00:58.500>much. <00:00:58.733>Okay. <00:00:58.966>Excellent. <00:00:59.199>Thanks.

18
00:01:02.500 --> 00:01:05.900
<00:01:02.500>Well <00:01:02.627>for <00:01:02.754>the <00:01:02.881>ones <00:01:03.009>that <00:01:03.136>have <00:01:03.263>not <00:01:03.390>heard <00:01:03.518>about <00:01:03.645>kotlin <00:01:03.772>March, <00:01:03.900>let's

19
00:01:05.900 --> 00:01:08.500
<00:01:05.900>quickly <00:01:06.180>introduce <00:01:06.460>it <00:01:06.740>by <00:01:07.020>means <00:01:07.300>of

20
00:01:08.500 --> 00:01:09.100
<00:01:08.500>some <00:01:09.039>facts.

21
00:01:10.200 --> 00:01:13.300
<00:01:10.200>Kotlin <00:01:10.375>is <00:01:10.550>named <00:01:10.725>after <00:01:10.900>an <00:01:11.075>island <00:01:11.250>in <00:01:11.425>using <00:01:11.600>Petersburg.

22
00:01:14.200 --> 00:01:17.500
<00:01:14.200>by <00:01:14.375>now <00:01:14.550>11 <00:01:14.725>years <00:01:14.900>old <00:01:15.075>and <00:01:15.250>until <00:01:15.425>2017 <00:01:15.600>not

23
00:01:17.500 --> 00:01:18.900
<00:01:17.500>much <00:01:17.752>happened <00:01:18.004>with <00:01:18.256>kotlin <00:01:18.508>but <00:01:18.760>then

24
00:01:19.700 --> 00:01:22.700
<00:01:19.700>Google <00:01:19.840>Now <00:01:19.980>to <00:01:20.120>be <00:01:20.260>the <00:01:20.400>official <00:01:20.540>language <00:01:20.680>for <00:01:20.820>Android <00:01:20.960>and <00:01:21.100>also

25
00:01:22.700 --> 00:01:25.400
<00:01:22.700>the <00:01:22.980>spring <00:01:23.260>framework <00:01:23.540>announced <00:01:23.820>first <00:01:24.100>class

26
00:01:25.400 --> 00:01:28.200
<00:01:25.400>support <00:01:25.600>for <00:01:25.800>kotlin <00:01:26.000>and <00:01:26.200>since <00:01:26.400>then <00:01:26.600>kotlin <00:01:26.800>is

27
00:01:28.200 --> 00:01:29.700
<00:01:28.200>tremendously <00:01:28.650>on <00:01:29.100>the <00:01:29.550>rise.

28
00:01:31.700 --> 00:01:34.000
<00:01:31.700>Kotlin <00:01:31.900>as <00:01:32.100>has <00:01:32.300>actually <00:01:32.500>a <00:01:32.700>lot <00:01:32.900>to <00:01:33.100>do

29
00:01:34.200 --> 00:01:37.600
<00:01:34.200>with <00:01:34.340>child <00:01:34.480>because <00:01:34.620>it <00:01:34.760>was <00:01:34.900>designed <00:01:35.040>with <00:01:35.180>a <00:01:35.320>better <00:01:35.460>Java <00:01:35.600>in

30
00:01:37.600 --> 00:01:41.400
<00:01:37.600>mind. <00:01:37.833>So <00:01:38.066>all <00:01:38.300>the <00:01:38.533>shortcomings <00:01:38.766>Java <00:01:39.000>possesses

31
00:01:40.400 --> 00:01:43.400
<00:01:40.400>should <00:01:40.680>have <00:01:40.960>been <00:01:41.240>overcome <00:01:41.520>by <00:01:41.800>kotlin.

32
00:01:43.900 --> 00:01:46.200
<00:01:43.900>Yet <00:01:44.055>at <00:01:44.211>the <00:01:44.366>same <00:01:44.522>time <00:01:44.677>called <00:01:44.833>we <00:01:44.988>wanted <00:01:45.144>to <00:01:45.300>stay

33
00:01:46.200 --> 00:01:49.200
<00:01:46.200>fully <00:01:46.400>interoperable <00:01:46.600>with <00:01:46.800>Java <00:01:47.000>and <00:01:47.200>as <00:01:47.400>we'll <00:01:47.600>see

34
00:01:49.200 --> 00:01:52.600
<00:01:49.200>kotlin <00:01:49.340>goes <00:01:49.480>to <00:01:49.620>Great <00:01:49.760>length, <00:01:49.900>in <00:01:50.040>order <00:01:50.180>to <00:01:50.320>leverage <00:01:50.460>these <00:01:50.600>beautiful

35
00:01:52.600 --> 00:01:54.800
<00:01:52.600>ecosystem. <00:01:52.774>We <00:01:52.949>have <00:01:53.125>out <00:01:53.300>there <00:01:53.475>in <00:01:53.649>the <00:01:53.824>Java <00:01:54.000>world.

36
00:01:55.700 --> 00:01:58.200
<00:01:55.700>So <00:01:55.840>in <00:01:55.980>that <00:01:56.120>sense, <00:01:56.260>you <00:01:56.400>can <00:01:56.540>use <00:01:56.680>all <00:01:56.820>the <00:01:56.960>Java <00:01:57.100>tools

37
00:01:58.200 --> 00:02:01.500
<00:01:58.200>out <00:01:58.327>there <00:01:58.454>the <00:01:58.581>mavens <00:01:58.709>the <00:01:58.836>gradles <00:01:58.963>and <00:01:59.090>so <00:01:59.218>on <00:01:59.345>all <00:01:59.472>your <00:01:59.600>service

38
00:02:01.500 --> 00:02:04.500
<00:02:01.500>your <00:02:01.700>favorite <00:02:01.900>Frameworks, <00:02:02.100>you <00:02:02.300>can <00:02:02.500>use <00:02:02.700>Java <00:02:02.900>kotlin

39
00:02:04.500 --> 00:02:06.100
<00:02:04.500>sources <00:02:04.966>intermingly <00:02:05.433>one <00:02:05.900>project.

40
00:02:06.900 --> 00:02:09.700
<00:02:06.900>And <00:02:07.055>of <00:02:07.211>course <00:02:07.366>Carlton <00:02:07.522>also <00:02:07.677>adds <00:02:07.833>their <00:02:07.988>own <00:02:08.144>Frameworks, <00:02:08.300>the

41
00:02:09.700 --> 00:02:12.900
<00:02:09.699>more <00:02:09.899>native <00:02:10.100>Frameworks <00:02:10.299>for <00:02:10.500>kotlin <00:02:10.699>and <00:02:10.899>interesting <00:02:11.100>development

42
00:02:12.900 --> 00:02:15.400
<00:02:12.900>in <00:02:13.180>recent <00:02:13.460>years <00:02:13.740>is <00:02:14.020>kotlin <00:02:14.300>native,

43
00:02:15.400 --> 00:02:18.600
<00:02:15.400>which <00:02:15.575>allows <00:02:15.750>you <00:02:15.925>to <00:02:16.100>compile <00:02:16.275>to <00:02:16.450>Native <00:02:16.625>bindings <00:02:16.800>like

44
00:02:18.600 --> 00:02:19.600
<00:02:18.600>the <00:02:18.825>one <00:02:19.049>you <00:02:19.275>see <00:02:19.500>here.

45
00:02:21.300 --> 00:02:21.400
so

46
00:02:22.500 --> 00:02:25.600
<00:02:22.500>I've <00:02:22.640>seen <00:02:22.780>there <00:02:22.920>quite <00:02:23.060>a <00:02:23.200>few <00:02:23.340>few <00:02:23.480>are <00:02:23.620>child <00:02:23.760>developers <00:02:23.900>and

47
00:02:25.600 --> 00:02:28.400
<00:02:25.600>you <00:02:25.833>might <00:02:26.066>think <00:02:26.299>well <00:02:26.533>Java <00:02:26.766>is <00:02:27.000>my

48
00:02:28.400 --> 00:02:31.400
<00:02:28.400>tool <00:02:28.527>I <00:02:28.654>get <00:02:28.781>my <00:02:28.909>job <00:02:29.036>done. <00:02:29.163>So <00:02:29.290>why <00:02:29.418>should <00:02:29.545>I <00:02:29.672>consider <00:02:29.800>a

49
00:02:31.400 --> 00:02:34.700
<00:02:31.400>new <00:02:31.555>language <00:02:31.711>or <00:02:31.866>you're <00:02:32.022>like <00:02:32.177>this <00:02:32.333>guy <00:02:32.488>a <00:02:32.644>manager <00:02:32.800>who

50
00:02:34.700 --> 00:02:37.200
<00:02:34.700>sees <00:02:34.980>technology <00:02:35.260>changes <00:02:35.540>more <00:02:35.820>in <00:02:36.100>terms

51
00:02:37.200 --> 00:02:40.700
<00:02:37.200>of <00:02:37.316>Investments <00:02:37.433>and <00:02:37.549>risks, <00:02:37.666>which <00:02:37.783>of <00:02:37.899>course <00:02:38.016>has <00:02:38.133>to <00:02:38.250>be <00:02:38.366>lower <00:02:38.483>than <00:02:38.600>the

52
00:02:40.700 --> 00:02:40.800
gain.

53
00:02:41.400 --> 00:02:44.700
<00:02:41.400>And <00:02:41.507>in <00:02:41.615>the <00:02:41.723>restaurant <00:02:41.830>presentation, <00:02:41.938>I <00:02:42.046>tried <00:02:42.153>to <00:02:42.261>give <00:02:42.369>you <00:02:42.476>the <00:02:42.584>information <00:02:42.692>so <00:02:42.800>that

54
00:02:44.700 --> 00:02:46.000
<00:02:44.700>you <00:02:45.090>can <00:02:45.480>judge <00:02:45.870>yourself.

55
00:02:47.600 --> 00:02:50.300
<00:02:47.600>And <00:02:47.775>because <00:02:47.950>it's <00:02:48.125>we <00:02:48.299>are <00:02:48.475>deaf's <00:02:48.650>Conference. <00:02:48.825>Of <00:02:49.000>course,

56
00:02:50.300 --> 00:02:51.800
<00:02:50.300>we <00:02:50.570>start <00:02:50.840>out <00:02:51.110>with <00:02:51.380>the <00:02:51.650>Developers.

57
00:02:53.300 --> 00:02:57.200
<00:02:53.300>And <00:02:53.455>I <00:02:53.611>try <00:02:53.766>to <00:02:53.922>focus <00:02:54.077>on <00:02:54.233>these <00:02:54.388>key <00:02:54.544>on <00:02:54.700>these

58
00:02:56.200 --> 00:02:58.500
<00:02:56.200>six <00:02:56.549>key <00:02:56.899>areas <00:02:57.250>of <00:02:57.600>kotlin.

59
00:02:59.600 --> 00:03:02.400
<00:02:59.600>Because <00:02:59.755>only <00:02:59.911>a <00:03:00.066>30 <00:03:00.222>minutes <00:03:00.377>I <00:03:00.533>had <00:03:00.688>to <00:03:00.844>squeeze <00:03:01.000>it

60
00:03:02.400 --> 00:03:05.100
<00:03:02.400>a <00:03:02.527>little <00:03:02.654>bit <00:03:02.781>but <00:03:02.909>I <00:03:03.036>guess <00:03:03.163>the <00:03:03.290>most <00:03:03.418>important <00:03:03.545>ones <00:03:03.672>will <00:03:03.800>be

61
00:03:05.100 --> 00:03:05.700
mentioned.

62
00:03:06.700 --> 00:03:07.300
<00:03:06.700>starting <00:03:06.970>out <00:03:07.240>with

63
00:03:08.300 --> 00:03:11.000
<00:03:08.300>the <00:03:08.500>subject <00:03:08.700>which <00:03:08.900>I <00:03:09.100>assume <00:03:09.300>is <00:03:09.500>known <00:03:09.700>to

64
00:03:11.400 --> 00:03:14.100
<00:03:11.400>everyone <00:03:11.555>of <00:03:11.711>you <00:03:11.866>object <00:03:12.022>orientation <00:03:12.177>on <00:03:12.333>the <00:03:12.488>left. <00:03:12.644>All <00:03:12.800>we

65
00:03:14.100 --> 00:03:17.600
<00:03:14.100>have <00:03:14.299>is <00:03:14.500>a <00:03:14.700>common <00:03:14.900>Java <00:03:15.100>pocho <00:03:15.299>on <00:03:15.500>the

66
00:03:17.600 --> 00:03:20.000
<00:03:17.600>right. <00:03:17.833>We <00:03:18.066>have <00:03:18.299>the <00:03:18.533>counterpart <00:03:18.766>in <00:03:19.000>kotlin.

67
00:03:20.500 --> 00:03:23.300
<00:03:20.500>So, <00:03:20.640>how <00:03:20.780>is <00:03:20.920>it? <00:03:21.060>How <00:03:21.200>is <00:03:21.340>it <00:03:21.480>possible <00:03:21.620>that <00:03:21.760>kotlin <00:03:21.900>can

68
00:03:23.300 --> 00:03:26.500
<00:03:23.300>condense <00:03:23.427>the <00:03:23.554>code <00:03:23.681>on <00:03:23.809>the <00:03:23.936>left <00:03:24.063>to <00:03:24.190>only <00:03:24.318>few <00:03:24.445>lines <00:03:24.572>as <00:03:24.700>you

69
00:03:26.500 --> 00:03:29.200
<00:03:26.500>see <00:03:26.675>on <00:03:26.850>the <00:03:27.025>right? <00:03:27.200>Well <00:03:27.375>that <00:03:27.550>mostly <00:03:27.725>comes <00:03:27.900>because

70
00:03:29.200 --> 00:03:32.700
<00:03:29.200>it <00:03:29.549>combines <00:03:29.899>field <00:03:30.250>declarations <00:03:30.600>get

71
00:03:32.700 --> 00:03:35.400
<00:03:32.700>reset <00:03:32.899>declaration <00:03:33.100>and <00:03:33.299>construct <00:03:33.500>calculations <00:03:33.700>in <00:03:33.899>one <00:03:34.100>spot.

72
00:03:35.400 --> 00:03:38.300
<00:03:35.400>So <00:03:35.555>with <00:03:35.711>value <00:03:35.866>you <00:03:36.022>get <00:03:36.177>immutable <00:03:36.333>field <00:03:36.488>a <00:03:36.644>getter <00:03:36.800>with

73
00:03:38.300 --> 00:03:41.500
<00:03:38.300>bar <00:03:38.440>a <00:03:38.580>set <00:03:38.720>together <00:03:38.860>and <00:03:39.000>a <00:03:39.140>mutable <00:03:39.280>field <00:03:39.420>and <00:03:39.560>as <00:03:39.700>you

74
00:03:41.500 --> 00:03:43.200
<00:03:41.500>can <00:03:41.733>see <00:03:41.966>also <00:03:42.200>have <00:03:42.433>the <00:03:42.666>Constructor <00:03:42.900>there.

75
00:03:44.400 --> 00:03:47.300
<00:03:44.400>This <00:03:44.600>also <00:03:44.800>has <00:03:45.000>not <00:03:45.200>only <00:03:45.400>a <00:03:45.600>condensed <00:03:45.800>of

76
00:03:47.300 --> 00:03:50.200
<00:03:47.300>code <00:03:47.455>as <00:03:47.611>a <00:03:47.766>consequence. <00:03:47.922>It <00:03:48.077>also <00:03:48.233>is <00:03:48.388>a <00:03:48.544>safety <00:03:48.700>feature.

77
00:03:50.200 --> 00:03:53.300
<00:03:50.200>This <00:03:50.355>feature <00:03:50.511>is <00:03:50.666>called <00:03:50.822>the <00:03:50.977>primary <00:03:51.133>Constructor. <00:03:51.288>And <00:03:51.444>once <00:03:51.600>you've

78
00:03:53.300 --> 00:03:56.100
<00:03:53.300>gone <00:03:53.427>through <00:03:53.554>the <00:03:53.681>primary <00:03:53.809>construction, <00:03:53.936>you <00:03:54.063>can <00:03:54.190>assume <00:03:54.318>that <00:03:54.445>your <00:03:54.572>class <00:03:54.700>is

79
00:03:56.100 --> 00:03:59.400
<00:03:56.100>initiated <00:03:56.299>correctly <00:03:56.500>not <00:03:56.700>leading <00:03:56.900>to <00:03:57.100>unexpected <00:03:57.299>for <00:03:57.500>instance.

80
00:03:59.400 --> 00:04:00.300
<00:03:59.400>No <00:03:59.805>pointer <00:04:00.210>exceptions.

81
00:04:01.100 --> 00:04:04.900
<00:04:01.100>So <00:04:01.275>actually <00:04:01.450>this <00:04:01.625>simple <00:04:01.799>construct <00:04:01.975>makes <00:04:02.150>all <00:04:02.325>the <00:04:02.500>stuff

82
00:04:04.900 --> 00:04:06.100
<00:04:04.900>on <00:04:05.260>the <00:04:05.620>left. <00:04:05.980>Obsolete.

83
00:04:06.800 --> 00:04:09.300
<00:04:06.800>Another <00:04:07.033>interesting <00:04:07.266>and <00:04:07.500>quite <00:04:07.733>easy <00:04:07.966>addition <00:04:08.200>of

84
00:04:09.300 --> 00:04:10.500
<00:04:09.300>kotlin <00:04:09.660>are <00:04:10.020>default <00:04:10.380>arguments.

85
00:04:11.200 --> 00:04:14.000
<00:04:11.200>So <00:04:11.399>overloading <00:04:11.600>in <00:04:11.799>kotlin <00:04:12.000>is <00:04:12.200>actually <00:04:12.399>never <00:04:12.600>needed.

86
00:04:15.200 --> 00:04:18.700
<00:04:15.200>Let's <00:04:15.355>also <00:04:15.511>interesting <00:04:15.666>is <00:04:15.822>that <00:04:15.977>kotlin <00:04:16.133>doesn't <00:04:16.288>have <00:04:16.444>Primitives <00:04:16.599>in

87
00:04:18.700 --> 00:04:21.800
<00:04:18.700>the <00:04:18.979>language <00:04:19.260>because <00:04:19.539>kotlin <00:04:19.820>considers <00:04:20.099>primitive

88
00:04:21.800 --> 00:04:24.600
<00:04:21.800>a <00:04:22.150>compiler <00:04:22.500>concern <00:04:22.850>not <00:04:23.200>a

89
00:04:24.600 --> 00:04:27.200
<00:04:24.600>programmer <00:04:24.755>concern <00:04:24.911>and <00:04:25.066>we'll <00:04:25.222>see <00:04:25.377>that <00:04:25.533>this <00:04:25.688>has <00:04:25.844>quite <00:04:26.000>a

90
00:04:27.200 --> 00:04:27.600
<00:04:27.200>few <00:04:27.560>benefits.

91
00:04:30.100 --> 00:04:33.200
<00:04:30.100>Another <00:04:30.255>cool <00:04:30.411>feature <00:04:30.566>is <00:04:30.722>that <00:04:30.877>kotlin <00:04:31.033>allows <00:04:31.188>certain <00:04:31.344>operators <00:04:31.500>to

92
00:04:33.200 --> 00:04:36.700
<00:04:33.200>be <00:04:33.340>as <00:04:33.479>called <00:04:33.620>overloaded <00:04:33.760>so <00:04:33.900>that <00:04:34.039>you <00:04:34.180>can <00:04:34.320>write <00:04:34.460>natural <00:04:34.599>language

93
00:04:36.700 --> 00:04:38.500
<00:04:36.700>constructs <00:04:37.400>or <00:04:38.099>dsls.

94
00:04:40.400 --> 00:04:43.800
<00:04:40.400>When <00:04:40.539>you <00:04:40.679>prefix <00:04:40.820>a <00:04:40.960>class <00:04:41.099>in <00:04:41.239>kotlin <00:04:41.380>with <00:04:41.520>data, <00:04:41.659>you <00:04:41.799>get

95
00:04:43.800 --> 00:04:46.500
<00:04:43.800>something <00:04:44.033>which <00:04:44.266>is <00:04:44.500>more <00:04:44.733>like <00:04:44.966>like <00:04:45.200>a

96
00:04:46.500 --> 00:04:49.800
<00:04:46.500>record <00:04:46.675>class <00:04:46.850>in <00:04:47.025>newer <00:04:47.200>versions <00:04:47.375>of <00:04:47.550>java. <00:04:47.725>Well, <00:04:47.900>it's

97
00:04:49.800 --> 00:04:52.500
<00:04:49.800>actually <00:04:50.000>more <00:04:50.200>than <00:04:50.400>that <00:04:50.600>for <00:04:50.800>instance <00:04:51.000>in <00:04:51.200>data

98
00:04:52.500 --> 00:04:54.600
<00:04:52.500>class. <00:04:52.700>You <00:04:52.900>still <00:04:53.100>can <00:04:53.300>have <00:04:53.500>mutable <00:04:53.700>state <00:04:53.900>so

99
00:04:55.600 --> 00:04:58.400
<00:04:55.600>Immutable <00:04:55.740>state <00:04:55.880>is <00:04:56.020>encouraged, <00:04:56.160>but <00:04:56.300>you <00:04:56.440>still <00:04:56.580>can <00:04:56.720>have <00:04:56.860>it <00:04:57.000>in

100
00:04:58.400 --> 00:05:00.100
<00:04:58.400>record <00:04:58.750>classes. <00:04:59.099>That's <00:04:59.450>not <00:04:59.799>possible.

101
00:05:00.800 --> 00:05:03.300
<00:05:00.800>But <00:05:00.927>they <00:05:01.054>really <00:05:01.181>have <00:05:01.309>in <00:05:01.436>common <00:05:01.563>is <00:05:01.690>that <00:05:01.818>they <00:05:01.945>have <00:05:02.072>a <00:05:02.200>nice

102
00:05:03.300 --> 00:05:04.600
<00:05:03.300>implementation <00:05:03.690>of <00:05:04.080>two <00:05:04.470>string?

103
00:05:05.400 --> 00:05:08.500
<00:05:05.400>The <00:05:05.555>equals <00:05:05.711>method <00:05:05.866>which <00:05:06.022>is <00:05:06.177>by <00:05:06.333>value <00:05:06.488>red <00:05:06.644>number <00:05:06.799>reference

104
00:05:08.500 --> 00:05:11.200
<00:05:08.500>in <00:05:08.733>kotlin <00:05:08.966>is <00:05:09.200>with <00:05:09.433>the <00:05:09.666>more <00:05:09.900>natural

105
00:05:11.200 --> 00:05:13.100
<00:05:11.200>equals <00:05:11.433>equals <00:05:11.666>rather <00:05:11.900>than <00:05:12.133>the <00:05:12.366>equals <00:05:12.599>word.

106
00:05:14.100 --> 00:05:17.200
<00:05:14.100>And <00:05:14.240>what's <00:05:14.380>really <00:05:14.520>great <00:05:14.660>in <00:05:14.800>Carlton, <00:05:14.940>you <00:05:15.080>have <00:05:15.220>to <00:05:15.360>copy <00:05:15.500>method

107
00:05:17.200 --> 00:05:20.400
<00:05:17.200>which <00:05:17.375>allows <00:05:17.550>you <00:05:17.724>to <00:05:17.900>create <00:05:18.075>slight <00:05:18.250>variations <00:05:18.425>of <00:05:18.599>a

108
00:05:20.400 --> 00:05:23.300
<00:05:20.400>data <00:05:20.679>class <00:05:20.960>with <00:05:21.239>the <00:05:21.520>named <00:05:21.799>argument

109
00:05:23.300 --> 00:05:26.200
<00:05:23.300>syntax <00:05:23.440>that <00:05:23.580>is <00:05:23.720>also <00:05:23.860>available <00:05:24.000>in <00:05:24.140>kotlin <00:05:24.280>in <00:05:24.420>job. <00:05:24.560>You <00:05:24.700>have

110
00:05:26.200 --> 00:05:29.600
<00:05:26.200>to <00:05:26.316>copy <00:05:26.433>all <00:05:26.550>the <00:05:26.666>state <00:05:26.783>to <00:05:26.900>create <00:05:27.016>new <00:05:27.133>instances <00:05:27.250>of <00:05:27.366>record <00:05:27.483>slide <00:05:27.599>variations.

111
00:05:30.500 --> 00:05:31.500
<00:05:30.500>another <00:05:30.800>nice <00:05:31.100>feature <00:05:31.400>is

112
00:05:32.700 --> 00:05:36.200
<00:05:32.700>Methodist <00:05:32.875>structuring <00:05:33.050>which <00:05:33.224>allows <00:05:33.400>you <00:05:33.575>to <00:05:33.750>give <00:05:33.925>certain <00:05:34.099>clear

113
00:05:35.200 --> 00:05:38.200
<00:05:35.200>semantics <00:05:35.433>in <00:05:35.666>code <00:05:35.900>where <00:05:36.133>this <00:05:36.366>is <00:05:36.599>applicable.

114
00:05:40.400 --> 00:05:43.700
<00:05:40.400>Whatso <00:05:40.575>kind <00:05:40.750>of <00:05:40.924>interesting <00:05:41.099>to <00:05:41.275>mention <00:05:41.450>is <00:05:41.625>data <00:05:41.799>classes

115
00:05:43.700 --> 00:05:46.300
<00:05:43.700>even <00:05:43.875>in <00:05:44.050>the <00:05:44.224>immutable <00:05:44.400>form <00:05:44.575>are <00:05:44.750>fully <00:05:44.925>compatible <00:05:45.099>with

116
00:05:46.300 --> 00:05:50.000
<00:05:46.300>one <00:05:46.455>of <00:05:46.611>the <00:05:46.766>most <00:05:46.922>widely <00:05:47.077>used <00:05:47.233>or <00:05:47.388>amps <00:05:47.544>GPA <00:05:47.700>whereas

117
00:05:49.200 --> 00:05:52.400
<00:05:49.200>record <00:05:49.400>classes, <00:05:49.599>which <00:05:49.800>is <00:05:50.000>a <00:05:50.200>Java <00:05:50.400>concept <00:05:50.599>or

118
00:05:52.400 --> 00:05:53.800
<00:05:52.400>not <00:05:52.715>kind <00:05:53.030>of <00:05:53.345>interesting <00:05:53.660>fact.

119
00:05:55.100 --> 00:05:58.400
<00:05:55.100>When <00:05:55.227>it <00:05:55.354>comes <00:05:55.481>to <00:05:55.609>syntax, <00:05:55.736>the <00:05:55.863>syntax <00:05:55.990>in <00:05:56.118>kotlin <00:05:56.245>is <00:05:56.372>very <00:05:56.500>lightweight

120
00:05:58.400 --> 00:06:01.700
<00:05:58.400>and <00:05:58.539>consistent <00:05:58.679>on <00:05:58.820>the <00:05:58.960>left <00:05:59.099>side. <00:05:59.239>You <00:05:59.380>see <00:05:59.520>the <00:05:59.659>history <00:05:59.799>tickling

121
00:06:01.700 --> 00:06:04.500
<00:06:01.700>through <00:06:01.875>Java <00:06:02.050>with <00:06:02.224>bars <00:06:02.400>final <00:06:02.575>bars <00:06:02.750>and <00:06:02.925>still <00:06:03.099>using

122
00:06:04.500 --> 00:06:07.100
<00:06:04.500>the <00:06:04.780>typed <00:06:05.060>way <00:06:05.340>of <00:06:05.620>defining <00:06:05.900>your

123
00:06:07.100 --> 00:06:10.400
<00:06:07.100>variables <00:06:07.275>kotlin <00:06:07.450>because <00:06:07.625>it <00:06:07.800>started <00:06:07.975>later <00:06:08.150>on <00:06:08.325>in <00:06:08.500>this

124
00:06:10.400 --> 00:06:13.400
<00:06:10.400>case. <00:06:10.527>This <00:06:10.654>is <00:06:10.781>where <00:06:10.909>we <00:06:11.036>consistent <00:06:11.163>and <00:06:11.290>because <00:06:11.418>we <00:06:11.545>have <00:06:11.672>these <00:06:11.799>named

125
00:06:13.400 --> 00:06:16.400
<00:06:13.400>arguments <00:06:13.679>Builders. <00:06:13.960>You <00:06:14.239>never <00:06:14.520>see <00:06:14.799>in

126
00:06:16.400 --> 00:06:19.400
<00:06:16.400>kotlin <00:06:16.599>code <00:06:16.799>it <00:06:17.000>simply <00:06:17.200>unnecessary, <00:06:17.400>which <00:06:17.599>actually <00:06:17.799>true

127
00:06:19.400 --> 00:06:22.600
<00:06:19.400>for <00:06:19.599>all <00:06:19.799>that <00:06:20.000>long <00:06:20.200>book <00:06:20.400>is <00:06:20.599>offering. <00:06:20.799>So

128
00:06:22.600 --> 00:06:25.100
<00:06:22.600>whenever <00:06:22.755>you <00:06:22.911>try <00:06:23.066>to <00:06:23.222>use <00:06:23.377>lombok <00:06:23.533>in <00:06:23.688>kotlin <00:06:23.844>this <00:06:24.000>is

129
00:06:25.100 --> 00:06:28.300
<00:06:25.100>not <00:06:25.207>the <00:06:25.315>way <00:06:25.423>to <00:06:25.530>go <00:06:25.638>because <00:06:25.746>every <00:06:25.853>feature <00:06:25.961>on <00:06:26.069>book <00:06:26.176>offers <00:06:26.284>is <00:06:26.392>already <00:06:26.500>there

130
00:06:28.300 --> 00:06:29.200
<00:06:28.300>and <00:06:28.705>called <00:06:29.110>links.

131
00:06:30.600 --> 00:06:31.800
<00:06:30.600>basic <00:06:31.140>language <00:06:31.680>features

132
00:06:32.800 --> 00:06:35.200
<00:06:32.800>last <00:06:32.975>but <00:06:33.150>definitely <00:06:33.325>not <00:06:33.500>least. <00:06:33.675>What <00:06:33.850>cotton <00:06:34.025>allows <00:06:34.200>to

133
00:06:35.200 --> 00:06:38.200
<00:06:35.200>do <00:06:35.400>is <00:06:35.599>to <00:06:35.800>add <00:06:36.000>multiple <00:06:36.200>classes <00:06:36.400>in <00:06:36.599>a

134
00:06:38.200 --> 00:06:42.400
<00:06:38.200>single <00:06:38.355>file, <00:06:38.511>which <00:06:38.666>gives <00:06:38.822>you <00:06:38.977>the <00:06:39.133>possibility <00:06:39.288>to <00:06:39.444>at <00:06:39.599>one

135
00:06:42.400 --> 00:06:44.900
<00:06:42.400>glance <00:06:42.575>know <00:06:42.750>how <00:06:42.924>your <00:06:43.099>entities <00:06:43.275>relate <00:06:43.450>to <00:06:43.625>one <00:06:43.799>another.

136
00:06:47.500 --> 00:06:48.500
<00:06:47.500>Okay <00:06:47.950>so <00:06:48.400>far.

137
00:06:50.200 --> 00:06:54.100
<00:06:50.200>So <00:06:50.340>far <00:06:50.479>to <00:06:50.620>oh <00:06:50.760>now <00:06:50.900>let's <00:06:51.039>move <00:06:51.180>on <00:06:51.320>to <00:06:51.460>functional <00:06:51.599>programming

138
00:06:53.100 --> 00:06:56.300
<00:06:53.100>what <00:06:53.240>you <00:06:53.380>see <00:06:53.520>on <00:06:53.660>the <00:06:53.800>left <00:06:53.940>is <00:06:54.080>as <00:06:54.220>it's <00:06:54.360>called <00:06:54.500>a

139
00:06:56.300 --> 00:06:59.500
<00:06:56.300>higher <00:06:56.416>order <00:06:56.533>function <00:06:56.650>that <00:06:56.766>is <00:06:56.883>a <00:06:57.000>method <00:06:57.116>that <00:06:57.233>takes <00:06:57.350>a <00:06:57.466>function <00:06:57.583>as <00:06:57.700>argument.

140
00:07:00.400 --> 00:07:03.800
<00:07:00.400>And <00:07:00.555>the <00:07:00.711>Counterpoint <00:07:00.866>kotlin <00:07:01.022>would <00:07:01.177>look <00:07:01.333>as <00:07:01.488>follows <00:07:01.644>and <00:07:01.799>what

141
00:07:03.800 --> 00:07:06.800
<00:07:03.800>you <00:07:03.955>see <00:07:04.111>here <00:07:04.266>is <00:07:04.422>that <00:07:04.577>kotlin <00:07:04.733>treats <00:07:04.888>functions <00:07:05.044>as <00:07:05.200>first

142
00:07:06.800 --> 00:07:09.900
<00:07:06.800>class <00:07:07.080>citizens, <00:07:07.360>which <00:07:07.640>implies <00:07:07.920>that <00:07:08.200>coupling

143
00:07:09.900 --> 00:07:12.100
<00:07:09.900>offers <00:07:10.075>a <00:07:10.250>syntax <00:07:10.424>to <00:07:10.599>Define <00:07:10.775>for <00:07:10.950>instance, <00:07:11.125>which <00:07:11.299>is

144
00:07:12.100 --> 00:07:15.500
<00:07:12.100>quite <00:07:12.240>straightforward. <00:07:12.380>It <00:07:12.520>simply <00:07:12.660>tells <00:07:12.800>you <00:07:12.940>what <00:07:13.080>goes <00:07:13.220>into <00:07:13.360>function <00:07:13.500>and

145
00:07:15.500 --> 00:07:18.200
<00:07:15.500>what <00:07:15.640>goes <00:07:15.780>out <00:07:15.920>of <00:07:16.060>the <00:07:16.200>function <00:07:16.340>which <00:07:16.480>is <00:07:16.620>not <00:07:16.760>always <00:07:16.900>that

146
00:07:18.200 --> 00:07:21.200
<00:07:18.200>clear <00:07:18.340>with <00:07:18.479>the <00:07:18.620>functional <00:07:18.760>interface, <00:07:18.900>right? <00:07:19.039>So <00:07:19.180>especially <00:07:19.320>for <00:07:19.460>instance <00:07:19.599>a

147
00:07:21.200 --> 00:07:24.500
<00:07:21.200>long <00:07:21.316>predicate <00:07:21.433>in <00:07:21.550>order <00:07:21.666>to <00:07:21.783>know <00:07:21.900>what <00:07:22.016>goes <00:07:22.133>in <00:07:22.250>it <00:07:22.366>goes <00:07:22.483>out. <00:07:22.599>Sometimes

148
00:07:24.500 --> 00:07:27.500
<00:07:24.500>you <00:07:24.700>have <00:07:24.900>to <00:07:25.100>navigate <00:07:25.300>through <00:07:25.500>the <00:07:25.700>functional <00:07:25.900>interfaces

149
00:07:27.500 --> 00:07:29.800
<00:07:27.500>only <00:07:27.655>method <00:07:27.811>to <00:07:27.966>see <00:07:28.122>what's <00:07:28.277>actually <00:07:28.433>going <00:07:28.588>in <00:07:28.744>and <00:07:28.900>out.

150
00:07:32.700 --> 00:07:35.400
<00:07:32.700>So <00:07:32.979>think <00:07:33.260>like <00:07:33.539>knowing <00:07:33.820>all <00:07:34.099>these

151
00:07:35.400 --> 00:07:38.400
<00:07:35.400>Jungle <00:07:35.633>of <00:07:35.866>French <00:07:36.099>interface <00:07:36.333>is <00:07:36.566>simply <00:07:36.799>not

152
00:07:38.400 --> 00:07:41.500
<00:07:38.400>needed <00:07:38.555>in <00:07:38.711>kotlin <00:07:38.866>and <00:07:39.022>body <00:07:39.177>also <00:07:39.333>sees <00:07:39.488>because <00:07:39.644>Java <00:07:39.799>has

153
00:07:41.500 --> 00:07:44.700
<00:07:41.500>Primitives <00:07:41.675>you <00:07:41.850>get <00:07:42.025>all <00:07:42.200>these <00:07:42.375>conversions <00:07:42.550>of <00:07:42.725>double <00:07:42.900>long

154
00:07:44.700 --> 00:07:46.200
<00:07:44.700>and <00:07:45.037>so <00:07:45.375>on <00:07:45.712>functional <00:07:46.050>interface.

155
00:07:48.700 --> 00:07:51.600
<00:07:48.700>And <00:07:48.875>in <00:07:49.050>my <00:07:49.224>experience <00:07:49.400>because <00:07:49.575>functions <00:07:49.750>are <00:07:49.925>actually <00:07:50.099>more

156
00:07:51.600 --> 00:07:54.800
<00:07:51.600>straightforward <00:07:51.775>to <00:07:51.950>use <00:07:52.125>in <00:07:52.300>Carlton. <00:07:52.475>You've <00:07:52.650>also <00:07:52.825>leverage <00:07:53.000>functional

157
00:07:54.800 --> 00:07:56.700
<00:07:54.800>Concepts <00:07:55.033>easier <00:07:55.266>than <00:07:55.500>you <00:07:55.733>do <00:07:55.966>in <00:07:56.200>Java.

158
00:07:57.800 --> 00:08:00.700
<00:07:57.800>When <00:07:58.033>it <00:07:58.266>comes <00:07:58.500>to <00:07:58.733>calling <00:07:58.966>functions <00:07:59.200>with

159
00:08:00.700 --> 00:08:03.900
<00:08:00.700>lambdas, <00:08:00.840>the <00:08:00.979>syntax <00:08:01.120>is <00:08:01.260>quite <00:08:01.400>similar. <00:08:01.539>So <00:08:01.680>you <00:08:01.820>have <00:08:01.960>to <00:08:02.099>syntax

160
00:08:03.900 --> 00:08:06.400
<00:08:03.900>with <00:08:04.099>a <00:08:04.299>variable <00:08:04.500>name <00:08:04.700>or <00:08:04.900>the <00:08:05.099>method <00:08:05.299>reference

161
00:08:06.400 --> 00:08:09.200
<00:08:06.400>in <00:08:06.516>tax <00:08:06.633>and <00:08:06.750>kotlin <00:08:06.866>adds <00:08:06.983>on <00:08:07.099>top <00:08:07.216>of <00:08:07.333>that <00:08:07.450>the <00:08:07.566>eight <00:08:07.683>keyword <00:08:07.799>which

162
00:08:09.200 --> 00:08:12.400
<00:08:09.200>refers <00:08:09.479>the <00:08:09.760>argument <00:08:10.039>of <00:08:10.320>alumna <00:08:10.599>or

163
00:08:12.400 --> 00:08:12.800
<00:08:12.400>multiple <00:08:12.760>arguments.

164
00:08:15.000 --> 00:08:15.300
Okay.

165
00:08:16.600 --> 00:08:19.200
<00:08:16.600>No <00:08:16.880>safety. <00:08:17.160>Well, <00:08:17.440>what <00:08:17.720>do <00:08:18.000>we

166
00:08:19.200 --> 00:08:22.200
<00:08:19.200>get <00:08:19.340>without <00:08:19.479>Mill <00:08:19.620>safety, <00:08:19.760>which <00:08:19.900>is <00:08:20.039>kind <00:08:20.180>of <00:08:20.320>nice <00:08:20.460>depicted <00:08:20.599>in

167
00:08:22.200 --> 00:08:25.600
<00:08:22.200>this <00:08:22.375>meta <00:08:22.550>signature <00:08:22.724>here. <00:08:22.900>We <00:08:23.075>want <00:08:23.250>to <00:08:23.425>get <00:08:23.599>em

168
00:08:25.600 --> 00:08:28.200
<00:08:25.600>rating <00:08:25.740>of <00:08:25.880>some <00:08:26.020>product <00:08:26.160>what <00:08:26.300>happens <00:08:26.440>if <00:08:26.580>the <00:08:26.720>product <00:08:26.860>cannot <00:08:27.000>be

169
00:08:28.200 --> 00:08:30.900
<00:08:28.200>found <00:08:28.327>do <00:08:28.454>we <00:08:28.581>get <00:08:28.709>no <00:08:28.836>back <00:08:28.963>minus <00:08:29.090>one. <00:08:29.218>We <00:08:29.345>simply <00:08:29.472>don't <00:08:29.599>know.

170
00:08:31.800 --> 00:08:34.400
<00:08:31.800>So <00:08:31.975>the <00:08:32.150>contract <00:08:32.325>we <00:08:32.500>have <00:08:32.674>here <00:08:32.850>from <00:08:33.025>API <00:08:33.200>perspective

171
00:08:34.400 --> 00:08:36.000
<00:08:34.400>is <00:08:34.866>simply <00:08:35.333>not <00:08:35.799>sufficient.

172
00:08:36.800 --> 00:08:39.200
<00:08:36.799>and <00:08:37.000>because <00:08:37.199>it's <00:08:37.400>a <00:08:37.599>bad <00:08:37.799>contract <00:08:38.000>we <00:08:38.199>kind

173
00:08:39.200 --> 00:08:42.300
<00:08:39.200>of <00:08:39.355>have <00:08:39.511>to <00:08:39.666>be <00:08:39.822>defensive <00:08:39.977>hoping <00:08:40.133>and <00:08:40.288>checking <00:08:40.444>all <00:08:40.600>kind

174
00:08:42.300 --> 00:08:44.300
<00:08:42.299>of <00:08:42.533>situations <00:08:42.766>or <00:08:43.000>you <00:08:43.233>don't <00:08:43.466>and <00:08:43.699>then

175
00:08:45.100 --> 00:08:48.700
<00:08:45.100>You <00:08:45.207>have <00:08:45.315>to <00:08:45.423>pay <00:08:45.530>the <00:08:45.638>price <00:08:45.746>in <00:08:45.853>production <00:08:45.961>right <00:08:46.069>with <00:08:46.176>no <00:08:46.284>point <00:08:46.392>exceptions. <00:08:46.500>The

176
00:08:48.700 --> 00:08:50.200
<00:08:48.700>question <00:08:48.925>is, <00:08:49.150>is <00:08:49.375>there <00:08:49.600>a <00:08:49.825>better <00:08:50.050>way?

177
00:08:51.200 --> 00:08:54.700
<00:08:51.200>Well, <00:08:51.327>you <00:08:51.454>might <00:08:51.581>already <00:08:51.709>know <00:08:51.836>it <00:08:51.963>there <00:08:52.090>are <00:08:52.218>better <00:08:52.345>ways. <00:08:52.472>However, <00:08:52.600>there

178
00:08:54.700 --> 00:08:57.700
<00:08:54.700>are <00:08:54.840>so <00:08:54.980>many <00:08:55.120>to <00:08:55.260>from <00:08:55.400>to <00:08:55.540>choose <00:08:55.680>from <00:08:55.820>besides <00:08:55.960>that <00:08:56.100>it's

179
00:08:57.700 --> 00:09:00.600
<00:08:57.700>consistent <00:08:57.900>doesn't <00:08:58.100>enforce <00:08:58.300>it <00:08:58.500>to <00:08:58.700>you <00:08:58.900>in <00:08:59.100>your

180
00:09:00.600 --> 00:09:03.500
<00:09:00.600>code. <00:09:00.707>So <00:09:00.815>you <00:09:00.923>can <00:09:01.030>use <00:09:01.138>it <00:09:01.246>or <00:09:01.353>not <00:09:01.461>and <00:09:01.569>you <00:09:01.676>still <00:09:01.784>can <00:09:01.892>use <00:09:02.000>null

181
00:09:03.500 --> 00:09:06.600
<00:09:03.500>in <00:09:03.640>your <00:09:03.780>code. <00:09:03.920>So <00:09:04.060>you <00:09:04.200>could <00:09:04.340>assign <00:09:04.480>optional <00:09:04.620>to <00:09:04.760>know <00:09:04.900>so

182
00:09:06.600 --> 00:09:09.300
<00:09:06.600>in <00:09:06.707>that <00:09:06.815>sense, <00:09:06.923>it <00:09:07.030>gives <00:09:07.138>you <00:09:07.246>a <00:09:07.353>certain <00:09:07.461>degree <00:09:07.569>of <00:09:07.676>safety, <00:09:07.784>but <00:09:07.892>definitely <00:09:08.000>not

183
00:09:09.300 --> 00:09:12.300
<00:09:09.300>really <00:09:09.533>a <00:09:09.766>hardcore <00:09:10.000>safety <00:09:10.233>net <00:09:10.466>which <00:09:10.699>actually

184
00:09:12.300 --> 00:09:13.200
<00:09:12.300>would <00:09:12.569>like <00:09:12.840>to <00:09:13.110>have.

185
00:09:14.600 --> 00:09:17.900
<00:09:14.600>Carlton <00:09:14.800>realized <00:09:15.000>that <00:09:15.200>this <00:09:15.400>new <00:09:15.600>this <00:09:15.800>new <00:09:16.000>issue

186
00:09:17.900 --> 00:09:20.200
<00:09:17.900>is <00:09:18.133>really <00:09:18.366>a <00:09:18.600>big <00:09:18.833>concern. <00:09:19.066>So <00:09:19.300>they

187
00:09:20.200 --> 00:09:23.600
<00:09:20.200>try <00:09:20.340>to <00:09:20.480>comment <00:09:20.620>with <00:09:20.760>a <00:09:20.900>very <00:09:21.040>solid <00:09:21.180>solution <00:09:21.320>and <00:09:21.460>they <00:09:21.600>solved

188
00:09:23.600 --> 00:09:26.300
<00:09:23.600>it <00:09:23.755>on <00:09:23.911>the <00:09:24.066>type <00:09:24.222>level. <00:09:24.377>So <00:09:24.533>in <00:09:24.688>kotlin <00:09:24.844>every <00:09:25.000>normal

189
00:09:26.300 --> 00:09:29.500
<00:09:26.300>type <00:09:26.500>has <00:09:26.699>some <00:09:26.900>sort <00:09:27.099>of <00:09:27.300>nullable <00:09:27.500>super <00:09:27.699>type.

190
00:09:32.300 --> 00:09:35.500
<00:09:32.300>And <00:09:32.455>with <00:09:32.611>digital <00:09:32.766>new <00:09:32.922>super <00:09:33.077>types <00:09:33.233>you <00:09:33.388>get <00:09:33.544>a <00:09:33.699>variety

191
00:09:35.500 --> 00:09:38.200
<00:09:35.500>of <00:09:35.733>modifiers <00:09:35.966>to <00:09:36.200>deal <00:09:36.433>with <00:09:36.666>the <00:09:36.900>case

192
00:09:38.200 --> 00:09:39.000
<00:09:38.200>of <00:09:38.920>nobility.

193
00:09:39.700 --> 00:09:42.000
<00:09:39.700>So <00:09:39.875>the <00:09:40.050>question <00:09:40.225>is <00:09:40.400>why <00:09:40.575>did <00:09:40.750>kotlin <00:09:40.925>do <00:09:41.100>that?

194
00:09:42.300 --> 00:09:45.300
<00:09:42.300>Why <00:09:42.416>didn't <00:09:42.533>they <00:09:42.650>simply <00:09:42.766>choose <00:09:42.883>for <00:09:43.000>a <00:09:43.116>rapper? <00:09:43.233>Like <00:09:43.349>many <00:09:43.466>or <00:09:43.583>languages <00:09:43.699>do

195
00:09:45.300 --> 00:09:49.000
<00:09:45.300>Scala <00:09:45.439>Java? <00:09:45.579>And <00:09:45.719>there <00:09:45.859>are <00:09:46.000>many <00:09:46.140>others <00:09:46.280>out <00:09:46.420>there. <00:09:46.560>Well, <00:09:46.699>I

196
00:09:48.300 --> 00:09:51.500
<00:09:48.300>think <00:09:48.455>it <00:09:48.611>becomes <00:09:48.766>evident <00:09:48.922>when <00:09:49.077>you <00:09:49.233>look <00:09:49.388>at <00:09:49.544>graphs <00:09:49.699>of

197
00:09:51.500 --> 00:09:54.500
<00:09:51.500>objects. <00:09:51.655>So <00:09:51.811>here <00:09:51.966>we <00:09:52.122>simply <00:09:52.277>create <00:09:52.433>a <00:09:52.588>graph <00:09:52.744>but <00:09:52.900>because

198
00:09:54.500 --> 00:09:57.600
<00:09:54.500>you <00:09:54.627>do <00:09:54.754>not <00:09:54.881>have <00:09:55.009>the <00:09:55.136>rappers. <00:09:55.263>It's <00:09:55.390>kind <00:09:55.518>of <00:09:55.645>very <00:09:55.772>clean <00:09:55.900>depicted

199
00:09:57.600 --> 00:10:00.700
<00:09:57.600>how <00:09:57.775>our <00:09:57.950>graphs <00:09:58.125>look <00:09:58.300>like <00:09:58.475>looks <00:09:58.650>like <00:09:58.825>and <00:09:59.000>with

200
00:10:00.700 --> 00:10:03.100
<00:10:00.700>this <00:10:00.933>fancy <00:10:01.166>question <00:10:01.400>mark <00:10:01.633>dot <00:10:01.866>syntax. <00:10:02.100>It's

201
00:10:03.100 --> 00:10:06.400
<00:10:03.100>quite <00:10:03.255>easy <00:10:03.411>to <00:10:03.566>Traverse <00:10:03.722>the <00:10:03.877>graph <00:10:04.033>that <00:10:04.188>involves <00:10:04.344>notability <00:10:04.500>in

202
00:10:06.400 --> 00:10:07.300
<00:10:06.400>a <00:10:06.670>very <00:10:06.939>effective <00:10:07.209>way.

203
00:10:08.400 --> 00:10:11.600
<00:10:08.400>Carlton <00:10:08.540>also <00:10:08.680>adds <00:10:08.819>a <00:10:08.959>nice <00:10:09.100>feature <00:10:09.240>which <00:10:09.380>is <00:10:09.520>called <00:10:09.660>smart <00:10:09.800>casting.

204
00:10:11.600 --> 00:10:14.500
<00:10:11.600>So <00:10:11.775>whenever <00:10:11.950>you <00:10:12.125>checked <00:10:12.300>for <00:10:12.475>a <00:10:12.650>new <00:10:12.825>variable <00:10:13.000>then

205
00:10:14.500 --> 00:10:17.400
<00:10:14.500>in <00:10:14.733>the <00:10:14.966>upcoming <00:10:15.200>block <00:10:15.433>the <00:10:15.666>compiler <00:10:15.900>knows

206
00:10:17.400 --> 00:10:20.400
<00:10:17.400>hey <00:10:17.555>here <00:10:17.711>I've <00:10:17.866>checked <00:10:18.022>for <00:10:18.177>null. <00:10:18.333>So <00:10:18.488>I <00:10:18.644>downcast <00:10:18.800>it

207
00:10:20.400 --> 00:10:23.900
<00:10:20.400>to <00:10:20.600>its <00:10:20.800>non-dullable <00:10:21.000>counterpart. <00:10:21.199>So <00:10:21.400>from <00:10:21.600>nullable <00:10:21.800>booking

208
00:10:23.900 --> 00:10:25.200
<00:10:23.900>to <00:10:24.290>the <00:10:24.680>booking <00:10:25.070>itself.

209
00:10:28.200 --> 00:10:32.000
<00:10:28.200>And <00:10:28.340>this <00:10:28.480>I <00:10:28.620>said <00:10:28.760>would <00:10:28.900>be <00:10:29.040>the <00:10:29.180>counterpart <00:10:29.320>in <00:10:29.460>Java <00:10:29.600>and

210
00:10:31.400 --> 00:10:34.000
<00:10:31.400>up <00:10:31.574>to <00:10:31.750>you <00:10:31.925>to <00:10:32.100>church <00:10:32.275>what <00:10:32.449>you <00:10:32.625>would <00:10:32.800>prefer.

211
00:10:36.100 --> 00:10:39.400
<00:10:36.100>It's <00:10:36.216>no <00:10:36.333>wonder <00:10:36.450>that <00:10:36.566>even <00:10:36.683>so <00:10:36.800>it's <00:10:36.916>actually <00:10:37.033>quite <00:10:37.150>a <00:10:37.266>simple <00:10:37.383>feature. <00:10:37.500>It's

212
00:10:39.400 --> 00:10:42.100
<00:10:39.400>really <00:10:39.540>the <00:10:39.680>most <00:10:39.819>Loft <00:10:39.959>one <00:10:40.100>in <00:10:40.240>kotlin <00:10:40.380>and <00:10:40.520>it <00:10:40.660>can <00:10:40.800>reduce

213
00:10:42.100 --> 00:10:45.300
<00:10:42.100>your <00:10:42.275>amount <00:10:42.450>of <00:10:42.625>Errors <00:10:42.800>significantly <00:10:42.975>as <00:10:43.150>you <00:10:43.325>can <00:10:43.500>see

214
00:10:45.300 --> 00:10:45.400
here.

215
00:10:48.400 --> 00:10:51.100
<00:10:48.400>One <00:10:48.555>of <00:10:48.711>the <00:10:48.866>features <00:10:49.022>that <00:10:49.177>makes <00:10:49.333>kotlin <00:10:49.488>as <00:10:49.644>user-friendly <00:10:49.800>as

216
00:10:51.100 --> 00:10:52.900
<00:10:51.100>it <00:10:51.450>does <00:10:51.800>it <00:10:52.150>our <00:10:52.500>extensions.

217
00:10:53.500 --> 00:10:56.200
<00:10:53.500>Well, <00:10:53.733>what <00:10:53.966>are <00:10:54.200>extensions <00:10:54.433>extensions <00:10:54.666>is <00:10:54.900>a

218
00:10:56.200 --> 00:10:59.600
<00:10:56.200>very <00:10:56.400>simple <00:10:56.600>mechanism <00:10:56.800>to <00:10:57.000>add <00:10:57.200>new <00:10:57.400>methods <00:10:57.600>or

219
00:10:59.600 --> 00:11:02.000
<00:10:59.600>instance <00:10:59.950>variables <00:11:00.300>to <00:11:00.650>existing <00:11:01.000>types?

220
00:11:02.800 --> 00:11:05.900
<00:11:02.800>How <00:11:02.939>you <00:11:03.079>do <00:11:03.219>that <00:11:03.359>you <00:11:03.500>declare <00:11:03.640>type <00:11:03.780>like <00:11:03.920>in <00:11:04.060>then <00:11:04.199>you

221
00:11:05.900 --> 00:11:07.200
<00:11:05.900>say <00:11:06.095>I've <00:11:06.290>ever <00:11:06.485>met <00:11:06.680>the <00:11:06.875>dot <00:11:07.070>Square.

222
00:11:08.100 --> 00:11:11.700
<00:11:08.100>You <00:11:08.275>use <00:11:08.450>this <00:11:08.625>to <00:11:08.800>reference <00:11:08.975>the <00:11:09.150>the <00:11:09.325>instance <00:11:09.500>and

223
00:11:11.700 --> 00:11:14.800
<00:11:11.700>you <00:11:11.875>do <00:11:12.050>your <00:11:12.225>thing. <00:11:12.400>There <00:11:12.575>goes <00:11:12.750>our <00:11:12.925>Square <00:11:13.100>extensions

224
00:11:14.800 --> 00:11:15.500
<00:11:14.800>for <00:11:15.430>in.

225
00:11:16.500 --> 00:11:18.400
<00:11:16.500>Look <00:11:16.966>simple, <00:11:17.433>right <00:11:17.900>straightforward.

226
00:11:19.400 --> 00:11:22.500
<00:11:19.400>However, <00:11:19.555>I <00:11:19.711>said <00:11:19.866>it's <00:11:20.022>an <00:11:20.177>extremely <00:11:20.333>powerful <00:11:20.488>feature <00:11:20.644>which <00:11:20.800>you

227
00:11:22.500 --> 00:11:25.200
<00:11:22.500>will <00:11:22.700>see <00:11:22.900>in <00:11:23.100>many <00:11:23.300>many <00:11:23.500>regards <00:11:23.700>even <00:11:23.900>though

228
00:11:25.200 --> 00:11:28.400
<00:11:25.200>you <00:11:25.375>don't <00:11:25.550>really <00:11:25.725>realize <00:11:25.900>it <00:11:26.075>but <00:11:26.250>it's <00:11:26.425>basically <00:11:26.600>it's

229
00:11:28.400 --> 00:11:31.300
<00:11:28.400>extension. <00:11:28.555>So <00:11:28.711>for <00:11:28.866>instance <00:11:29.022>here <00:11:29.177>when <00:11:29.333>you <00:11:29.488>have <00:11:29.644>a <00:11:29.800>list

230
00:11:31.300 --> 00:11:35.100
<00:11:31.300>of <00:11:31.500>numeric <00:11:31.699>types, <00:11:31.900>you <00:11:32.099>get <00:11:32.300>some <00:11:32.500>extension <00:11:32.699>and

231
00:11:34.100 --> 00:11:37.400
<00:11:34.100>that's <00:11:34.255>nice <00:11:34.411>because <00:11:34.566>extensions <00:11:34.722>can <00:11:34.877>also <00:11:35.033>be <00:11:35.188>on <00:11:35.344>generic <00:11:35.500>types.

232
00:11:37.400 --> 00:11:40.900
<00:11:37.400>You <00:11:37.555>won't <00:11:37.711>have <00:11:37.866>some <00:11:38.022>with <00:11:38.177>a <00:11:38.333>list <00:11:38.488>of <00:11:38.644>non-numeric <00:11:38.800>types

233
00:11:40.900 --> 00:11:41.600
available.

234
00:11:42.800 --> 00:11:45.400
<00:11:42.800>Utility <00:11:42.939>methods <00:11:43.079>you <00:11:43.219>do <00:11:43.359>not <00:11:43.500>need <00:11:43.640>in <00:11:43.780>kotlin <00:11:43.920>because <00:11:44.060>actually <00:11:44.199>all

235
00:11:45.400 --> 00:11:48.200
<00:11:45.400>the <00:11:45.600>Apache <00:11:45.800>common <00:11:46.000>utils. <00:11:46.199>It's <00:11:46.400>there <00:11:46.600>in <00:11:46.800>the

236
00:11:48.200 --> 00:11:49.400
<00:11:48.200>in <00:11:48.560>the <00:11:48.920>default <00:11:49.280>language.

237
00:11:50.300 --> 00:11:53.300
<00:11:50.300>in <00:11:50.500>the <00:11:50.699>sense <00:11:50.900>of <00:11:51.099>by <00:11:51.300>means <00:11:51.500>of <00:11:51.699>extensions

238
00:11:54.200 --> 00:11:57.400
<00:11:54.200>As <00:11:54.327>for <00:11:54.454>instance <00:11:54.581>the <00:11:54.709>I/O <00:11:54.836>extensions <00:11:54.963>so <00:11:55.090>doing <00:11:55.218>I/O <00:11:55.345>stuff <00:11:55.472>is <00:11:55.600>very

239
00:11:57.400 --> 00:12:00.300
<00:11:57.400>straightforward <00:11:57.540>in <00:11:57.680>kotlin <00:11:57.819>because <00:11:57.959>they <00:11:58.100>have <00:11:58.240>all <00:11:58.380>these <00:11:58.520>beautiful <00:11:58.660>extensions <00:11:58.800>which

240
00:12:00.300 --> 00:12:03.200
<00:12:00.300>is <00:12:00.439>which <00:12:00.579>leads <00:12:00.719>to <00:12:00.859>code <00:12:01.000>like <00:12:01.140>to <00:12:01.280>want <00:12:01.420>to <00:12:01.560>see <00:12:01.699>above.

241
00:12:03.700 --> 00:12:07.200
<00:12:03.700>That's <00:12:03.875>also <00:12:04.050>nice <00:12:04.225>to <00:12:04.400>mention <00:12:04.575>is <00:12:04.750>that <00:12:04.925>all <00:12:05.100>actually

242
00:12:06.200 --> 00:12:09.400
<00:12:06.200>almost <00:12:06.666>all <00:12:07.133>serious <00:12:07.600>server

243
00:12:09.400 --> 00:12:12.600
<00:12:09.400>party <00:12:09.555>libraries <00:12:09.711>have <00:12:09.866>extensions <00:12:10.022>for <00:12:10.177>kotlin <00:12:10.333>available <00:12:10.488>like <00:12:10.644>spring <00:12:10.800>checks

244
00:12:12.600 --> 00:12:15.300
<00:12:12.600>and <00:12:12.740>so <00:12:12.880>on. <00:12:13.020>So <00:12:13.160>here <00:12:13.300>we <00:12:13.440>have <00:12:13.580>to <00:12:13.720>create <00:12:13.860>object <00:12:14.000>method

245
00:12:15.300 --> 00:12:18.300
<00:12:15.300>very <00:12:15.500>provided <00:12:15.699>type <00:12:15.900>and <00:12:16.099>then <00:12:16.300>the <00:12:16.500>results <00:12:16.699>that

246
00:12:18.300 --> 00:12:21.100
<00:12:18.300>will <00:12:18.427>be <00:12:18.554>serialized <00:12:18.681>to <00:12:18.809>this <00:12:18.936>particular <00:12:19.063>type <00:12:19.190>and <00:12:19.318>this <00:12:19.445>syntax <00:12:19.572>is <00:12:19.699>not

247
00:12:21.100 --> 00:12:22.700
<00:12:21.100>possible <00:12:21.800>in <00:12:22.500>Java.

248
00:12:23.500 --> 00:12:27.200
<00:12:23.500>Also <00:12:23.640>have <00:12:23.780>this <00:12:23.920>lead <00:12:24.060>extension <00:12:24.200>which <00:12:24.340>allows <00:12:24.480>you <00:12:24.620>to <00:12:24.760>do <00:12:24.900>Transformations

249
00:12:26.200 --> 00:12:28.100
<00:12:26.200>for <00:12:26.666>instance <00:12:27.133>nullable <00:12:27.600>types.

250
00:12:29.200 --> 00:12:33.100
<00:12:29.200>And <00:12:29.550>what's <00:12:29.900>definitely <00:12:30.250>last <00:12:30.600>but

251
00:12:32.100 --> 00:12:35.300
<00:12:32.100>not <00:12:32.380>least <00:12:32.660>is <00:12:32.940>testing <00:12:33.220>but <00:12:33.500>you

252
00:12:35.300 --> 00:12:38.200
<00:12:35.300>see <00:12:35.474>here <00:12:35.650>is <00:12:35.824>an <00:12:36.000>example <00:12:36.175>of <00:12:36.349>an <00:12:36.525>infix <00:12:36.699>method.

253
00:12:38.900 --> 00:12:41.100
<00:12:38.900>So <00:12:39.040>an <00:12:39.180>infinix <00:12:39.319>method <00:12:39.459>is <00:12:39.600>a <00:12:39.740>method <00:12:39.880>that <00:12:40.020>allows <00:12:40.160>you <00:12:40.300>to

254
00:12:41.100 --> 00:12:44.500
<00:12:41.100>omit <00:12:41.227>the <00:12:41.354>dot <00:12:41.481>and <00:12:41.609>the <00:12:41.736>parents. <00:12:41.863>So <00:12:41.990>it <00:12:42.118>looks <00:12:42.245>like <00:12:42.372>a <00:12:42.500>natural

255
00:12:44.500 --> 00:12:45.200
<00:12:44.500>language <00:12:45.130>concept.

256
00:12:46.300 --> 00:12:46.500
and

257
00:12:47.500 --> 00:12:51.200
<00:12:47.500>this <00:12:47.780>allows <00:12:48.060>for <00:12:48.340>extremely <00:12:48.620>expressive <00:12:48.900>testing

258
00:12:50.200 --> 00:12:53.200
<00:12:50.200>dsls. <00:12:50.550>So <00:12:50.900>the <00:12:51.250>examples <00:12:51.600>you

259
00:12:53.200 --> 00:12:53.400
<00:12:53.200>see <00:12:53.380>here.

260
00:12:54.300 --> 00:12:54.700
are

261
00:12:55.700 --> 00:12:58.500
<00:12:55.700>some <00:12:55.875>you <00:12:56.050>can <00:12:56.225>use <00:12:56.400>to <00:12:56.575>write <00:12:56.750>expressive <00:12:56.925>tests <00:12:57.100>rather

262
00:12:58.500 --> 00:13:01.100
<00:12:58.500>than <00:12:58.700>your <00:12:58.900>assert <00:12:59.100>equals <00:12:59.300>or <00:12:59.500>true. <00:12:59.700>You <00:12:59.900>normally

263
00:13:01.100 --> 00:13:02.200
<00:13:01.100>would <00:13:01.430>use <00:13:01.760>in <00:13:02.090>Java.

264
00:13:06.300 --> 00:13:09.500
<00:13:06.300>All <00:13:06.474>programmers <00:13:06.650>most <00:13:06.824>probably <00:13:07.000>you <00:13:07.175>too <00:13:07.349>use <00:13:07.525>collections <00:13:07.699>on

265
00:13:09.500 --> 00:13:13.000
<00:13:09.500>a <00:13:09.640>daily <00:13:09.780>base. <00:13:09.920>So <00:13:10.060>it <00:13:10.200>really <00:13:10.340>helps <00:13:10.480>if <00:13:10.620>they <00:13:10.760>get <00:13:10.900>if

266
00:13:12.300 --> 00:13:15.300
<00:13:12.300>they <00:13:12.427>don't <00:13:12.554>get <00:13:12.681>in <00:13:12.809>your <00:13:12.936>way <00:13:13.063>but <00:13:13.190>really <00:13:13.318>help <00:13:13.445>you <00:13:13.572>solving <00:13:13.699>problems.

267
00:13:15.300 --> 00:13:18.500
<00:13:15.300>So <00:13:15.474>what <00:13:15.650>would <00:13:15.824>happen <00:13:16.000>with <00:13:16.175>the <00:13:16.349>code <00:13:16.525>we <00:13:16.699>execute

268
00:13:18.500 --> 00:13:21.500
<00:13:18.500>on <00:13:18.655>the <00:13:18.811>left. <00:13:18.966>Well, <00:13:19.122>you <00:13:19.277>would <00:13:19.433>get <00:13:19.588>a <00:13:19.744>unsupport <00:13:19.900>operation

269
00:13:21.500 --> 00:13:24.300
<00:13:21.500>exception <00:13:21.700>because <00:13:21.900>we <00:13:22.100>hear <00:13:22.300>create <00:13:22.500>an <00:13:22.700>immutable <00:13:22.900>list

270
00:13:24.300 --> 00:13:27.500
<00:13:24.300>and <00:13:24.439>when <00:13:24.579>you <00:13:24.719>want <00:13:24.859>to <00:13:25.000>add <00:13:25.140>something <00:13:25.280>to <00:13:25.420>a <00:13:25.560>immutable <00:13:25.699>or

271
00:13:27.500 --> 00:13:30.600
<00:13:27.500>modifiable <00:13:27.640>list <00:13:27.780>in <00:13:27.920>Java, <00:13:28.060>then <00:13:28.200>you <00:13:28.340>get <00:13:28.480>an <00:13:28.620>exception <00:13:28.760>at <00:13:28.900>runtime.

272
00:13:31.200 --> 00:13:34.500
<00:13:31.200>In <00:13:31.375>kotlin <00:13:31.550>lists <00:13:31.725>are <00:13:31.900>immutable <00:13:32.075>by <00:13:32.250>default <00:13:32.425>2, <00:13:32.600>but

273
00:13:34.500 --> 00:13:37.400
<00:13:34.500>the <00:13:34.640>memory <00:13:34.780>add <00:13:34.920>an <00:13:35.060>element <00:13:35.200>to <00:13:35.340>it. <00:13:35.480>Then <00:13:35.620>you <00:13:35.760>get <00:13:35.900>a

274
00:13:37.400 --> 00:13:38.900
<00:13:37.400>new <00:13:37.625>lease <00:13:37.850>back <00:13:38.074>with <00:13:38.300>the <00:13:38.525>element <00:13:38.750>added.

275
00:13:39.800 --> 00:13:42.400
<00:13:39.800>Should <00:13:39.939>you <00:13:40.079>still <00:13:40.219>want <00:13:40.359>to <00:13:40.500>use <00:13:40.640>a <00:13:40.780>mutable <00:13:40.920>list <00:13:41.060>in <00:13:41.199>Java?

276
00:13:42.400 --> 00:13:45.200
<00:13:42.400>This <00:13:42.507>is <00:13:42.615>what <00:13:42.723>we <00:13:42.830>have <00:13:42.938>to <00:13:43.046>do. <00:13:43.153>You <00:13:43.261>would <00:13:43.369>use <00:13:43.476>the <00:13:43.584>mutable <00:13:43.692>list <00:13:43.800>of

277
00:13:45.200 --> 00:13:48.100
<00:13:45.200>factory <00:13:45.550>method <00:13:45.900>and <00:13:46.250>as <00:13:46.600>you

278
00:13:48.100 --> 00:13:49.800
<00:13:48.100>can <00:13:48.380>see <00:13:48.660>kotlin <00:13:48.940>actually <00:13:49.220>wants <00:13:49.500>you.

279
00:13:50.400 --> 00:13:53.500
<00:13:50.400>To <00:13:50.574>nudge <00:13:50.750>in <00:13:50.925>the <00:13:51.100>direction <00:13:51.275>of <00:13:51.449>immutability. <00:13:51.625>So <00:13:51.800>whenever

280
00:13:53.500 --> 00:13:56.600
<00:13:53.500>you <00:13:53.627>something <00:13:53.754>mutable <00:13:53.881>it <00:13:54.009>wants <00:13:54.136>you <00:13:54.263>to <00:13:54.390>make <00:13:54.518>you <00:13:54.645>aware <00:13:54.772>to <00:13:54.900>check.

281
00:13:56.600 --> 00:13:59.300
<00:13:56.600>Are <00:13:56.740>you <00:13:56.880>really <00:13:57.020>sure <00:13:57.160>you <00:13:57.300>want <00:13:57.440>to <00:13:57.580>use <00:13:57.720>immutable <00:13:57.860>construct <00:13:58.000>here?

282
00:14:04.200 --> 00:14:06.700
<00:14:04.200>What <00:14:04.400>I <00:14:04.600>personally <00:14:04.800>like <00:14:05.000>a <00:14:05.200>kotlin <00:14:05.400>or <00:14:05.600>ranges.

283
00:14:07.300 --> 00:14:10.700
<00:14:07.300>Which <00:14:07.533>are <00:14:07.766>definitely <00:14:08.000>less <00:14:08.233>verbose <00:14:08.466>than <00:14:08.699>what

284
00:14:10.700 --> 00:14:13.100
<00:14:10.700>you <00:14:10.875>have <00:14:11.050>in <00:14:11.225>Java <00:14:11.400>where <00:14:11.575>you <00:14:11.750>have <00:14:11.925>withinstream <00:14:12.100>certain

285
00:14:13.100 --> 00:14:15.600
<00:14:13.100>ways <00:14:13.240>to <00:14:13.380>create <00:14:13.520>ranges, <00:14:13.660>but <00:14:13.800>not <00:14:13.940>in <00:14:14.080>a <00:14:14.220>very <00:14:14.360>elegant <00:14:14.500>way.

286
00:14:17.200 --> 00:14:20.400
<00:14:17.200>Which <00:14:17.355>actually <00:14:17.511>true <00:14:17.666>for <00:14:17.822>all <00:14:17.977>collection <00:14:18.133>methods <00:14:18.288>in <00:14:18.444>kotlin <00:14:18.600>for

287
00:14:20.400 --> 00:14:23.200
<00:14:20.400>instance <00:14:20.516>on <00:14:20.633>the <00:14:20.750>left <00:14:20.866>when <00:14:20.983>I <00:14:21.100>want <00:14:21.216>to <00:14:21.333>map <00:14:21.449>value <00:14:21.566>to <00:14:21.683>a <00:14:21.800>map.

288
00:14:23.200 --> 00:14:26.300
<00:14:23.200>It's <00:14:23.316>kind <00:14:23.433>of <00:14:23.550>on <00:14:23.666>Cleaver <00:14:23.783>I <00:14:23.900>have <00:14:24.016>to <00:14:24.133>do <00:14:24.250>that <00:14:24.366>do <00:14:24.483>have <00:14:24.600>a

289
00:14:26.300 --> 00:14:29.300
<00:14:26.300>map <00:14:26.400>method <00:14:26.500>available <00:14:26.599>for <00:14:26.699>that <00:14:26.800>or <00:14:26.900>do <00:14:27.000>I <00:14:27.099>have <00:14:27.199>to <00:14:27.300>in <00:14:27.400>collect <00:14:27.500>step <00:14:27.599>for <00:14:27.699>me?

290
00:14:29.300 --> 00:14:32.400
<00:14:29.300>That's <00:14:29.439>not <00:14:29.579>clear. <00:14:29.719>And <00:14:29.859>because <00:14:30.000>I <00:14:30.140>don't <00:14:30.280>program <00:14:30.420>in <00:14:30.560>channels <00:14:30.699>often.

291
00:14:32.400 --> 00:14:34.000
<00:14:32.400>I <00:14:32.633>have <00:14:32.866>to <00:14:33.100>go <00:14:33.333>to <00:14:33.566>stack <00:14:33.800>overflow.

292
00:14:34.800 --> 00:14:37.500
<00:14:34.800>In <00:14:35.000>company <00:14:35.199>things <00:14:35.400>are <00:14:35.599>simply <00:14:35.800>straightforward. <00:14:36.000>You <00:14:36.199>have

293
00:14:37.500 --> 00:14:40.800
<00:14:37.500>adult <00:14:37.640>map <00:14:37.780>method <00:14:37.920>no <00:14:38.060>matter <00:14:38.200>which <00:14:38.340>collection <00:14:38.480>you <00:14:38.620>have <00:14:38.760>and <00:14:38.900>off

294
00:14:40.800 --> 00:14:41.000
<00:14:40.800>you <00:14:40.980>go.

295
00:14:43.300 --> 00:14:46.200
<00:14:43.300>So <00:14:43.416>more <00:14:43.533>examples <00:14:43.650>with <00:14:43.766>some <00:14:43.883>product <00:14:44.000>which <00:14:44.116>has <00:14:44.233>a <00:14:44.349>name <00:14:44.466>and <00:14:44.583>then <00:14:44.699>some

296
00:14:46.200 --> 00:14:49.300
<00:14:46.200>user <00:14:46.293>rating. <00:14:46.386>So <00:14:46.480>these <00:14:46.573>are <00:14:46.666>the <00:14:46.760>numbers <00:14:46.853>you <00:14:46.946>see <00:14:47.040>and <00:14:47.133>say <00:14:47.226>we <00:14:47.320>want <00:14:47.413>to <00:14:47.506>calculate <00:14:47.600>the

297
00:14:49.300 --> 00:14:53.000
<00:14:49.300>average <00:14:49.500>rating <00:14:49.699>and <00:14:49.900>here <00:14:50.099>actually <00:14:50.300>see <00:14:50.500>that <00:14:50.699>Java

298
00:14:52.200 --> 00:14:55.600
<00:14:52.200>is <00:14:52.375>suffering <00:14:52.550>from <00:14:52.725>quite <00:14:52.900>some <00:14:53.075>abstraction <00:14:53.250>level <00:14:53.425>and <00:14:53.600>it's

299
00:14:55.600 --> 00:14:58.400
<00:14:55.600>it's <00:14:55.833>fact <00:14:56.066>that <00:14:56.300>you <00:14:56.533>edit <00:14:56.766>supports <00:14:57.000>primitive.

300
00:14:58.400 --> 00:15:01.300
<00:14:58.400>So <00:14:58.633>first <00:14:58.866>we <00:14:59.100>have <00:14:59.333>this <00:14:59.566>transition <00:14:59.800>from

301
00:15:01.300 --> 00:15:04.500
<00:15:01.300>stream <00:15:01.416>and <00:15:01.533>back <00:15:01.650>and <00:15:01.766>you <00:15:01.883>also <00:15:02.000>have <00:15:02.116>to <00:15:02.233>deal <00:15:02.349>with <00:15:02.466>boxing <00:15:02.583>and <00:15:02.699>unboxing

302
00:15:04.500 --> 00:15:05.500
<00:15:04.500>of <00:15:04.800>these <00:15:05.100>primitive <00:15:05.400>types.

303
00:15:06.400 --> 00:15:09.300
<00:15:06.400>Because <00:15:06.574>in <00:15:06.750>kotlin <00:15:06.925>that <00:15:07.100>simply <00:15:07.275>not <00:15:07.449>there <00:15:07.625>again, <00:15:07.800>it's

304
00:15:09.300 --> 00:15:12.300
<00:15:09.300>very <00:15:09.500>straight <00:15:09.699>forward <00:15:09.900>statement <00:15:10.099>flatmap <00:15:10.300>average <00:15:10.500>and <00:15:10.699>you're

305
00:15:12.300 --> 00:15:12.700
done.

306
00:15:14.200 --> 00:15:18.100
<00:15:14.200>Whenever <00:15:14.355>you <00:15:14.511>need <00:15:14.666>to <00:15:14.822>correlate <00:15:14.977>pieces <00:15:15.133>of <00:15:15.288>data, <00:15:15.444>you <00:15:15.600>most

307
00:15:17.100 --> 00:15:20.400
<00:15:17.100>of <00:15:17.240>the <00:15:17.380>time <00:15:17.520>end <00:15:17.660>up <00:15:17.800>with <00:15:17.940>something <00:15:18.080>like <00:15:18.220>a <00:15:18.360>table <00:15:18.500>that

308
00:15:20.400 --> 00:15:23.200
<00:15:20.400>just <00:15:20.540>keeps <00:15:20.680>them <00:15:20.819>two <00:15:20.959>values <00:15:21.100>together. <00:15:21.240>You <00:15:21.380>have <00:15:21.520>to <00:15:21.660>write <00:15:21.800>them

309
00:15:23.200 --> 00:15:24.600
<00:15:23.200>yourself <00:15:23.410>or <00:15:23.620>use <00:15:23.830>a <00:15:24.040>library <00:15:24.250>for <00:15:24.460>that.

310
00:15:25.300 --> 00:15:28.500
<00:15:25.300>All <00:15:25.474>these <00:15:25.650>kind <00:15:25.824>of <00:15:26.000>basic <00:15:26.175>things <00:15:26.349>are <00:15:26.525>already <00:15:26.699>part

311
00:15:28.500 --> 00:15:30.200
<00:15:28.500>of <00:15:29.200>the <00:15:29.900>codling.

312
00:15:31.400 --> 00:15:34.700
<00:15:31.400>Default <00:15:31.555>language <00:15:31.711>constructs <00:15:31.866>like <00:15:32.022>the <00:15:32.177>pair <00:15:32.333>you <00:15:32.488>have <00:15:32.644>there, <00:15:32.800>which

313
00:15:34.700 --> 00:15:37.100
<00:15:34.700>is <00:15:34.900>used <00:15:35.100>as <00:15:35.300>I <00:15:35.500>said <00:15:35.700>in <00:15:35.900>standard <00:15:36.100>Library

314
00:15:37.100 --> 00:15:37.700
<00:15:37.100>also <00:15:37.370>in <00:15:37.640>many.

315
00:15:38.500 --> 00:15:39.900
<00:15:38.500>other <00:15:39.760>dependencies

316
00:15:40.600 --> 00:15:43.500
<00:15:40.600>and <00:15:40.716>it's <00:15:40.833>also <00:15:40.950>very <00:15:41.066>nice <00:15:41.183>in <00:15:41.300>kotlin <00:15:41.416>is <00:15:41.533>that <00:15:41.650>you <00:15:41.766>can <00:15:41.883>very <00:15:42.000>easily

317
00:15:43.500 --> 00:15:45.700
<00:15:43.500>convert <00:15:43.780>one <00:15:44.060>collection <00:15:44.340>type <00:15:44.620>to <00:15:44.900>another.

318
00:15:46.700 --> 00:15:49.400
<00:15:46.700>So <00:15:46.827>what <00:15:46.954>we <00:15:47.081>have <00:15:47.209>here <00:15:47.336>is <00:15:47.463>we <00:15:47.590>have <00:15:47.718>a <00:15:47.845>list <00:15:47.972>of <00:15:48.100>tuples

319
00:15:49.400 --> 00:15:53.600
<00:15:49.400>and <00:15:49.574>because <00:15:49.750>we <00:15:49.925>have <00:15:50.100>an <00:15:50.275>extension <00:15:50.449>method <00:15:50.625>that <00:15:50.800>knows

320
00:15:52.600 --> 00:15:55.000
<00:15:52.600>how <00:15:52.950>to <00:15:53.300>convert <00:15:53.650>a <00:15:54.000>list

321
00:15:55.100 --> 00:15:58.300
<00:15:55.100>of <00:15:55.216>tuples <00:15:55.333>into <00:15:55.450>a <00:15:55.566>map <00:15:55.683>you <00:15:55.800>simply <00:15:55.916>call <00:15:56.033>to <00:15:56.150>map <00:15:56.266>or <00:15:56.383>to <00:15:56.500>set

322
00:15:58.300 --> 00:15:59.100
<00:15:58.300>and <00:15:58.660>so <00:15:59.020>on.

323
00:16:01.200 --> 00:16:04.500
<00:16:01.200>Okay. <00:16:01.375>Now <00:16:01.550>we <00:16:01.725>have <00:16:01.900>arrived <00:16:02.075>at <00:16:02.250>the <00:16:02.425>probably <00:16:02.600>most

324
00:16:04.500 --> 00:16:07.200
<00:16:04.500>powerful <00:16:04.850>feature <00:16:05.200>kotlin <00:16:05.550>offers, <00:16:05.900>which

325
00:16:07.200 --> 00:16:10.300
<00:16:07.200>is <00:16:07.316>in <00:16:07.433>the <00:16:07.550>domain <00:16:07.666>of <00:16:07.783>concurrency, <00:16:07.900>which <00:16:08.016>is <00:16:08.133>a <00:16:08.250>bit <00:16:08.366>more <00:16:08.483>advanced <00:16:08.600>feature.

326
00:16:11.700 --> 00:16:14.400
<00:16:11.700>Let's <00:16:12.050>see <00:16:12.400>if <00:16:12.750>what <00:16:13.100>happens

327
00:16:14.400 --> 00:16:17.000
<00:16:14.400>if <00:16:14.516>we <00:16:14.633>do <00:16:14.750>not <00:16:14.866>use <00:16:14.983>this <00:16:15.100>feature, <00:16:15.216>then <00:16:15.333>we <00:16:15.449>get <00:16:15.566>code <00:16:15.683>like <00:16:15.800>this.

328
00:16:17.900 --> 00:16:20.100
<00:16:17.900>Where <00:16:18.074>we've <00:16:18.250>had <00:16:18.425>some <00:16:18.600>random <00:16:18.775>Avatar, <00:16:18.949>we <00:16:19.125>verify <00:16:19.300>some

329
00:16:20.100 --> 00:16:21.400
<00:16:20.100>evil <00:16:20.334>and <00:16:20.568>we <00:16:20.802>save <00:16:21.036>some <00:16:21.270>user.

330
00:16:22.100 --> 00:16:25.200
<00:16:22.100>And <00:16:22.240>we <00:16:22.380>assume <00:16:22.520>that <00:16:22.660>all <00:16:22.800>these <00:16:22.940>calls <00:16:23.080>are <00:16:23.220>remote <00:16:23.360>method <00:16:23.500>calls

331
00:16:25.200 --> 00:16:25.800
<00:16:25.200>and <00:16:25.740>blocking.

332
00:16:27.100 --> 00:16:30.900
<00:16:27.100>just <00:16:27.255>just <00:16:27.411>in <00:16:27.566>the <00:16:27.722>session <00:16:27.877>in <00:16:28.033>previous <00:16:28.188>session <00:16:28.344>announced <00:16:28.500>the

333
00:16:30.900 --> 00:16:33.000
<00:16:30.900>benefits <00:16:31.133>of <00:16:31.366>reactive <00:16:31.600>programming <00:16:31.833>and <00:16:32.066>if <00:16:32.300>you

334
00:16:33.300 --> 00:16:36.100
<00:16:33.300>want <00:16:33.439>to <00:16:33.579>do <00:16:33.719>this <00:16:33.859>resource <00:16:34.000>intensive, <00:16:34.140>sorry, <00:16:34.280>if <00:16:34.420>you <00:16:34.560>want <00:16:34.699>to

335
00:16:36.100 --> 00:16:39.200
<00:16:36.100>you <00:16:36.275>to <00:16:36.450>do <00:16:36.625>achieve <00:16:36.800>the <00:16:36.975>same <00:16:37.150>result <00:16:37.325>in <00:16:37.500>a

336
00:16:39.200 --> 00:16:42.600
<00:16:39.200>resource <00:16:39.327>efficient <00:16:39.454>way, <00:16:39.581>then <00:16:39.709>you <00:16:39.836>end <00:16:39.963>up <00:16:40.090>with <00:16:40.218>some <00:16:40.345>reactive <00:16:40.472>toolkit <00:16:40.600>like

337
00:16:42.600 --> 00:16:45.400
<00:16:42.600>mono <00:16:42.800>flux <00:16:43.000>we <00:16:43.200>seen <00:16:43.400>before <00:16:43.600>in <00:16:43.800>in <00:16:44.000>spring

338
00:16:45.400 --> 00:16:48.100
<00:16:45.400>or <00:16:45.555>completely <00:16:45.711>future <00:16:45.866>any <00:16:46.022>other <00:16:46.177>active <00:16:46.333>to <00:16:46.488>create <00:16:46.644>you <00:16:46.800>would

339
00:16:48.100 --> 00:16:48.400
<00:16:48.100>like <00:16:48.235>to <00:16:48.370>have

340
00:16:49.400 --> 00:16:52.800
<00:16:49.400>And <00:16:49.600>this <00:16:49.800>is <00:16:50.000>to <00:16:50.199>certain <00:16:50.400>degree <00:16:50.600>quite <00:16:50.800>problematic

341
00:16:52.800 --> 00:16:55.600
<00:16:52.800>because <00:16:53.033>all <00:16:53.266>of <00:16:53.500>a <00:16:53.733>sudden <00:16:53.966>my <00:16:54.199>code

342
00:16:55.600 --> 00:16:57.500
<00:16:55.600>has <00:16:55.800>to <00:16:56.000>deal <00:16:56.200>with <00:16:56.400>these <00:16:56.600>kind <00:16:56.800>of <00:16:57.000>combinators.

343
00:16:58.200 --> 00:17:02.000
<00:16:58.200>Which <00:16:58.480>you <00:16:58.760>can <00:16:59.040>querly <00:16:59.320>make <00:16:59.600>errors

344
00:17:01.200 --> 00:17:04.500
<00:17:01.200>because <00:17:01.375>you <00:17:01.550>for <00:17:01.725>instance <00:17:01.900>you <00:17:02.075>could <00:17:02.250>block <00:17:02.425>it <00:17:02.600>does

345
00:17:04.500 --> 00:17:06.200
<00:17:04.500>it <00:17:04.655>takes <00:17:04.811>quite <00:17:04.966>an <00:17:05.122>amount <00:17:05.277>of <00:17:05.433>time <00:17:05.588>to <00:17:05.744>learn <00:17:05.900>them?

346
00:17:07.300 --> 00:17:10.800
<00:17:07.300>And <00:17:07.455>personally, <00:17:07.611>I <00:17:07.766>think <00:17:07.922>the <00:17:08.077>worst <00:17:08.233>of <00:17:08.388>these <00:17:08.544>reactive <00:17:08.700>toolkits

347
00:17:10.800 --> 00:17:13.500
<00:17:10.800>is <00:17:11.000>that <00:17:11.200>the <00:17:11.399>intent <00:17:11.599>the <00:17:11.800>business <00:17:12.000>intent <00:17:12.200>of

348
00:17:13.500 --> 00:17:16.400
<00:17:13.500>your <00:17:13.700>code <00:17:13.900>is <00:17:14.099>simply <00:17:14.300>getting <00:17:14.500>lost <00:17:14.700>your <00:17:14.900>code

349
00:17:16.400 --> 00:17:19.500
<00:17:16.400>only <00:17:16.555>deals <00:17:16.711>with <00:17:16.866>these <00:17:17.022>reactive <00:17:17.177>abstraction <00:17:17.333>rather <00:17:17.488>what <00:17:17.644>it's <00:17:17.800>really

350
00:17:19.500 --> 00:17:22.200
<00:17:19.500>about <00:17:19.675>what <00:17:19.849>it's <00:17:20.025>should <00:17:20.200>do <00:17:20.375>from <00:17:20.550>a <00:17:20.724>business <00:17:20.900>perspective.

351
00:17:23.200 --> 00:17:26.600
<00:17:23.200>Also <00:17:23.316>cartoon <00:17:23.433>realized <00:17:23.550>is <00:17:23.666>in <00:17:23.783>the <00:17:23.900>early <00:17:24.016>stage. <00:17:24.133>He <00:17:24.250>said <00:17:24.366>okay, <00:17:24.483>we <00:17:24.600>should

352
00:17:26.600 --> 00:17:29.300
<00:17:26.599>solve <00:17:26.774>this <00:17:26.949>not <00:17:27.125>on <00:17:27.300>a <00:17:27.474>library <00:17:27.649>level. <00:17:27.824>We <00:17:28.000>should

353
00:17:29.300 --> 00:17:32.300
<00:17:29.300>solve <00:17:29.440>this <00:17:29.580>on <00:17:29.720>a <00:17:29.860>language <00:17:30.000>level <00:17:30.139>and <00:17:30.280>that's <00:17:30.419>what <00:17:30.560>it <00:17:30.700>is

354
00:17:32.300 --> 00:17:35.400
<00:17:32.300>with <00:17:32.475>coroutine. <00:17:32.649>So <00:17:32.825>coroutines <00:17:33.000>actually <00:17:33.175>combine <00:17:33.350>The <00:17:33.524>Best <00:17:33.700>of

355
00:17:35.400 --> 00:17:39.300
<00:17:35.400>Both <00:17:35.575>Worlds. <00:17:35.750>It <00:17:35.925>allows <00:17:36.100>you <00:17:36.275>to <00:17:36.450>Define <00:17:36.625>logic <00:17:36.800>sequentially.

356
00:17:40.200 --> 00:17:43.700
<00:17:40.200>But <00:17:40.433>at <00:17:40.666>runtime <00:17:40.900>it's <00:17:41.133>executed <00:17:41.366>asynchronously <00:17:41.600>by

357
00:17:43.700 --> 00:17:46.400
<00:17:43.700>means <00:17:43.855>of <00:17:44.011>coroutines <00:17:44.166>in <00:17:44.322>order <00:17:44.477>to <00:17:44.633>achieve <00:17:44.788>that <00:17:44.944>you <00:17:45.100>have

358
00:17:46.400 --> 00:17:49.600
<00:17:46.400>to <00:17:46.555>use <00:17:46.711>the <00:17:46.866>keyword <00:17:47.022>to <00:17:47.177>spend <00:17:47.333>for <00:17:47.488>methods <00:17:47.644>use <00:17:47.800>some

359
00:17:49.600 --> 00:17:52.500
<00:17:49.600>Builder <00:17:49.755>method <00:17:49.911>like <00:17:50.066>the <00:17:50.222>one <00:17:50.377>you <00:17:50.533>see <00:17:50.688>here <00:17:50.844>and <00:17:51.000>then

360
00:17:52.500 --> 00:17:55.100
<00:17:52.500>your <00:17:52.733>code <00:17:52.966>writes <00:17:53.200>like <00:17:53.433>sequential <00:17:53.666>code, <00:17:53.900>but

361
00:17:55.100 --> 00:17:58.400
<00:17:55.100>execute <00:17:55.379>like <00:17:55.659>very <00:17:55.939>performant <00:17:56.219>resource <00:17:56.500>efficient

362
00:17:58.400 --> 00:17:59.300
<00:17:58.400>reactive <00:17:59.210>code.

363
00:17:59.900 --> 00:18:02.100
<00:17:59.900>So <00:18:00.075>your <00:18:00.250>boss <00:18:00.425>definitely <00:18:00.600>will <00:18:00.775>understand <00:18:00.950>this <00:18:01.125>piece <00:18:01.300>of

364
00:18:02.100 --> 00:18:05.100
<00:18:02.100>code. <00:18:02.274>And <00:18:02.449>in <00:18:02.625>that <00:18:02.800>sense <00:18:02.975>this <00:18:03.149>can't <00:18:03.324>be <00:18:03.500>too

365
00:18:05.100 --> 00:18:05.300
hard.

366
00:18:06.500 --> 00:18:09.900
<00:18:06.500>Should <00:18:06.607>you <00:18:06.715>still <00:18:06.823>want <00:18:06.930>to <00:18:07.038>add <00:18:07.146>some <00:18:07.253>parallelism <00:18:07.361>to <00:18:07.469>your <00:18:07.576>code <00:18:07.684>to <00:18:07.792>gain <00:18:07.900>additional

367
00:18:09.900 --> 00:18:12.500
<00:18:09.900>performance <00:18:10.133>you <00:18:10.366>can <00:18:10.600>use <00:18:10.833>async. <00:18:11.066>Oh <00:18:11.300>wait.

368
00:18:13.100 --> 00:18:16.000
<00:18:13.100>And <00:18:13.255>of <00:18:13.411>course <00:18:13.566>await <00:18:13.722>does <00:18:13.877>not <00:18:14.033>block <00:18:14.188>a <00:18:14.344>way <00:18:14.500>to

369
00:18:16.500 --> 00:18:18.800
<00:18:16.500>spend <00:18:16.675>so <00:18:16.850>no <00:18:17.025>threat <00:18:17.200>blocking <00:18:17.375>is <00:18:17.550>taking <00:18:17.725>place <00:18:17.900>here.

370
00:18:20.100 --> 00:18:23.400
<00:18:20.100>While <00:18:20.240>at <00:18:20.379>the <00:18:20.520>same <00:18:20.659>time <00:18:20.800>you <00:18:20.939>can <00:18:21.080>leverage <00:18:21.219>parallelism <00:18:21.360>quite <00:18:21.500>easily.

371
00:18:25.400 --> 00:18:28.300
<00:18:25.400>You <00:18:25.540>might <00:18:25.680>ask. <00:18:25.820>Okay, <00:18:25.960>the <00:18:26.100>world <00:18:26.240>is <00:18:26.380>not <00:18:26.520>as <00:18:26.660>pure <00:18:26.800>as

372
00:18:28.300 --> 00:18:29.800
<00:18:28.300>you <00:18:28.570>can <00:18:28.840>see <00:18:29.110>here <00:18:29.379>with <00:18:29.649>coroutines.

373
00:18:30.600 --> 00:18:33.800
<00:18:30.600>Sometimes <00:18:30.774>you <00:18:30.949>have <00:18:31.125>to <00:18:31.300>deal <00:18:31.475>with <00:18:31.649>reactive <00:18:31.824>apis <00:18:32.000>libraries

374
00:18:33.800 --> 00:18:36.800
<00:18:33.800>and <00:18:33.940>so <00:18:34.080>on. <00:18:34.220>So <00:18:34.360>how <00:18:34.500>can <00:18:34.639>you <00:18:34.780>bridge <00:18:34.919>the <00:18:35.060>Two <00:18:35.200>Worlds

375
00:18:36.800 --> 00:18:39.700
<00:18:36.800>from <00:18:37.266>coroutines <00:18:37.733>and <00:18:38.200>reactive

376
00:18:39.700 --> 00:18:42.700
<00:18:39.700>toolkits? <00:18:39.900>Well, <00:18:40.100>that's <00:18:40.300>very <00:18:40.500>simple <00:18:40.700>again <00:18:40.900>extensions <00:18:41.100>are

377
00:18:42.700 --> 00:18:45.500
<00:18:42.700>a <00:18:42.855>friend <00:18:43.011>here. <00:18:43.166>We <00:18:43.322>simply <00:18:43.477>import <00:18:43.633>and <00:18:43.788>extensions <00:18:43.944>for <00:18:44.100>futures.

378
00:18:46.300 --> 00:18:49.800
<00:18:46.300>And <00:18:46.399>from <00:18:46.500>then <00:18:46.600>on <00:18:46.700>we <00:18:46.800>have <00:18:46.899>a <00:18:47.000>DOT <00:18:47.100>await <00:18:47.200>method <00:18:47.300>on <00:18:47.399>the <00:18:47.500>future <00:18:47.600>which <00:18:47.700>again

379
00:18:49.800 --> 00:18:52.300
<00:18:49.800>does <00:18:49.975>not <00:18:50.149>block. <00:18:50.325>Well, <00:18:50.500>there's <00:18:50.675>a <00:18:50.850>joint <00:18:51.024>method <00:18:51.200>on

380
00:18:52.300 --> 00:18:56.400
<00:18:52.300>complete <00:18:52.407>future <00:18:52.515>with <00:18:52.623>blocks. <00:18:52.730>This <00:18:52.838>one <00:18:52.946>don't <00:18:53.053>want <00:18:53.161>to <00:18:53.269>have <00:18:53.376>a <00:18:53.484>weight <00:18:53.592>convert <00:18:53.700>the

381
00:18:55.400 --> 00:18:59.200
<00:18:55.400>future <00:18:55.633>into <00:18:55.866>a <00:18:56.100>suspend <00:18:56.333>call <00:18:56.566>which <00:18:56.800>allows

382
00:18:58.200 --> 00:19:01.600
<00:18:58.200>you <00:18:58.433>to <00:18:58.666>write <00:18:58.900>the <00:18:59.133>logic <00:18:59.366>sequentially <00:18:59.600>rather

383
00:19:01.600 --> 00:19:04.400
<00:19:01.600>than <00:19:01.949>with <00:19:02.300>the <00:19:02.649>combinators <00:19:03.000>we

384
00:19:04.400 --> 00:19:04.600
<00:19:04.400>seen <00:19:04.580>before

385
00:19:06.300 --> 00:19:11.300
<00:19:06.300>So <00:19:06.500>in <00:19:06.700>my <00:19:06.899>experience <00:19:07.100>this <00:19:07.300>approach <00:19:07.500>allows <00:19:07.700>also

386
00:19:10.300 --> 00:19:13.600
<00:19:10.300>less <00:19:10.580>experienced <00:19:10.860>programs <00:19:11.139>to <00:19:11.419>Leverage <00:19:11.700>The

387
00:19:13.600 --> 00:19:14.000
reactive.

388
00:19:16.400 --> 00:19:17.000
ecosystem

389
00:19:18.600 --> 00:19:21.100
<00:19:18.600>because <00:19:18.774>by <00:19:18.949>now <00:19:19.125>it's <00:19:19.300>some <00:19:19.475>sort <00:19:19.649>of <00:19:19.824>specialty <00:19:20.000>that

390
00:19:21.100 --> 00:19:24.500
<00:19:21.100>is <00:19:21.216>reserved <00:19:21.333>to <00:19:21.449>a <00:19:21.566>select <00:19:21.683>group <00:19:21.800>of <00:19:21.916>people, <00:19:22.033>which <00:19:22.149>I <00:19:22.266>think <00:19:22.383>shouldn't <00:19:22.500>be

391
00:19:24.500 --> 00:19:25.100
<00:19:24.500>the <00:19:25.040>case.

392
00:19:27.200 --> 00:19:31.200
<00:19:27.200>Okay. <00:19:27.340>So <00:19:27.480>this <00:19:27.620>is <00:19:27.760>all <00:19:27.900>I <00:19:28.040>have <00:19:28.180>for <00:19:28.320>you <00:19:28.460>developers. <00:19:28.600>I

393
00:19:30.200 --> 00:19:33.000
<00:19:30.200>said <00:19:30.375>if <00:19:30.550>I <00:19:30.725>had <00:19:30.900>more <00:19:31.075>time <00:19:31.250>than <00:19:31.425>I <00:19:31.600>would

394
00:19:33.100 --> 00:19:36.500
<00:19:33.100>have <00:19:33.216>loved <00:19:33.333>to <00:19:33.449>mentioned <00:19:33.566>a <00:19:33.683>few <00:19:33.800>other <00:19:33.916>things, <00:19:34.033>but <00:19:34.149>I <00:19:34.266>think <00:19:34.383>this <00:19:34.500>is

395
00:19:36.500 --> 00:19:40.600
<00:19:36.500>around <00:19:36.600>to <00:19:36.700>that <00:19:36.800>but <00:19:36.900>for <00:19:37.000>the <00:19:37.100>management <00:19:37.200>we <00:19:37.300>haven't <00:19:37.400>talked <00:19:37.500>about <00:19:37.600>yet <00:19:37.700>and <00:19:37.800>sometimes <00:19:37.900>in

396
00:19:39.600 --> 00:19:42.400
<00:19:39.600>case <00:19:40.066>you <00:19:40.533>your <00:19:41.000>ntastic

397
00:19:42.400 --> 00:19:45.500
<00:19:42.400>about <00:19:42.540>kotlin <00:19:42.680>it's <00:19:42.820>also <00:19:42.960>worth <00:19:43.100>about <00:19:43.240>to <00:19:43.380>get <00:19:43.520>some <00:19:43.660>arguments <00:19:43.800>how

398
00:19:45.500 --> 00:19:48.200
<00:19:45.500>to <00:19:45.640>persuade <00:19:45.780>your <00:19:45.920>manager <00:19:46.060>to <00:19:46.200>embark <00:19:46.340>on <00:19:46.480>it <00:19:46.620>or <00:19:46.760>at <00:19:46.900>least

399
00:19:48.200 --> 00:19:51.400
<00:19:48.200>give <00:19:48.355>it <00:19:48.511>give <00:19:48.666>it <00:19:48.822>a <00:19:48.977>try. <00:19:49.133>So <00:19:49.288>how <00:19:49.444>about <00:19:49.600>me?

400
00:19:52.200 --> 00:19:52.600
well

401
00:19:53.400 --> 00:19:56.100
<00:19:53.400>Whenever <00:19:53.540>you <00:19:53.680>start <00:19:53.820>with <00:19:53.960>new <00:19:54.100>technology, <00:19:54.240>of <00:19:54.380>course, <00:19:54.520>there <00:19:54.660>is <00:19:54.800>an

402
00:19:56.100 --> 00:19:59.500
<00:19:56.100>investment <00:19:56.240>involved <00:19:56.379>and <00:19:56.520>the <00:19:56.659>investment <00:19:56.800>with <00:19:56.939>kotlin <00:19:57.080>is <00:19:57.219>definitely <00:19:57.360>educating <00:19:57.500>your

403
00:19:59.500 --> 00:20:04.000
<00:19:59.500>developers. <00:19:59.733>However, <00:19:59.966>if <00:20:00.200>you <00:20:00.433>educate <00:20:00.666>developers <00:20:00.900>you

404
00:20:02.500 --> 00:20:05.200
<00:20:02.500>guide <00:20:02.780>them. <00:20:03.060>Well, <00:20:03.340>you <00:20:03.620>give <00:20:03.900>them

405
00:20:05.200 --> 00:20:08.600
<00:20:05.200>good <00:20:05.375>material <00:20:05.550>give <00:20:05.725>them <00:20:05.900>a <00:20:06.075>course <00:20:06.250>then <00:20:06.425>my <00:20:06.600>experiences

406
00:20:08.600 --> 00:20:09.600
<00:20:08.600>within <00:20:08.824>two <00:20:09.050>till <00:20:09.274>three <00:20:09.500>weeks.

407
00:20:10.500 --> 00:20:10.800
a

408
00:20:11.900 --> 00:20:13.700
<00:20:11.900>average <00:20:12.180>child <00:20:12.460>labor <00:20:12.740>is <00:20:13.020>able <00:20:13.300>to

409
00:20:14.700 --> 00:20:16.400
<00:20:14.700>contribute <00:20:15.166>to <00:20:15.633>production <00:20:16.100>code

410
00:20:17.400 --> 00:20:19.000
<00:20:17.400>and <00:20:17.750>within <00:20:18.100>two <00:20:18.450>four <00:20:18.800>months

411
00:20:19.600 --> 00:20:20.600
<00:20:19.600>You <00:20:19.899>have <00:20:20.199>your <00:20:20.500>Roi?

412
00:20:21.300 --> 00:20:22.100
<00:20:21.300>on <00:20:21.540>the <00:20:21.780>gain <00:20:22.020>side

413
00:20:22.800 --> 00:20:25.500
<00:20:22.800>It <00:20:22.940>actually <00:20:23.080>quite <00:20:23.220>a <00:20:23.360>few <00:20:23.500>points <00:20:23.639>again. <00:20:23.780>First <00:20:23.919>of <00:20:24.060>all, <00:20:24.200>you

414
00:20:25.500 --> 00:20:27.400
<00:20:25.500>gain <00:20:25.780>about <00:20:26.060>40% <00:20:26.340>of <00:20:26.620>cold <00:20:26.900>reduction.

415
00:20:28.300 --> 00:20:31.800
<00:20:28.300>And <00:20:28.416>of <00:20:28.533>course <00:20:28.649>code <00:20:28.766>reduction <00:20:28.883>is <00:20:29.000>never <00:20:29.116>aimed <00:20:29.233>by <00:20:29.350>itself, <00:20:29.466>right? <00:20:29.583>The <00:20:29.700>aim

416
00:20:31.800 --> 00:20:34.400
<00:20:31.800>is <00:20:32.000>called <00:20:32.200>Clarity <00:20:32.399>you <00:20:32.600>want <00:20:32.800>to <00:20:33.000>have <00:20:33.200>code

417
00:20:34.400 --> 00:20:37.200
<00:20:34.400>that <00:20:34.575>is <00:20:34.750>easy <00:20:34.925>to <00:20:35.100>read <00:20:35.275>maintain <00:20:35.450>fixed <00:20:35.625>and <00:20:35.800>so

418
00:20:37.200 --> 00:20:41.300
<00:20:37.200>on <00:20:37.316>and <00:20:37.433>this <00:20:37.550>definitely <00:20:37.666>what <00:20:37.783>you <00:20:37.900>get <00:20:38.016>with <00:20:38.133>kotlin. <00:20:38.250>So <00:20:38.366>you're <00:20:38.483>maintainability <00:20:38.600>productivity

419
00:20:40.300 --> 00:20:42.300
<00:20:40.300>will <00:20:41.700>soar

420
00:20:42.700 --> 00:20:45.100
<00:20:42.700>you <00:20:42.875>really <00:20:43.050>get <00:20:43.225>less <00:20:43.400>bugs <00:20:43.575>because <00:20:43.750>of <00:20:43.925>all <00:20:44.100>these

421
00:20:45.100 --> 00:20:48.500
<00:20:45.100>safety <00:20:45.274>features <00:20:45.449>not <00:20:45.625>only <00:20:45.800>notability <00:20:45.975>but <00:20:46.149>also <00:20:46.324>primary <00:20:46.500>construction

422
00:20:48.500 --> 00:20:51.500
<00:20:48.500>and <00:20:48.640>variety <00:20:48.780>of <00:20:48.920>more <00:20:49.060>of <00:20:49.200>these <00:20:49.340>features <00:20:49.480>in <00:20:49.620>kotlin <00:20:49.760>just <00:20:49.900>by

423
00:20:51.500 --> 00:20:54.600
<00:20:51.500>having <00:20:51.640>them <00:20:51.780>in <00:20:51.920>the <00:20:52.060>language <00:20:52.200>doesn't <00:20:52.340>make <00:20:52.480>you <00:20:52.620>make <00:20:52.760>mistakes, <00:20:52.900>which

424
00:20:54.600 --> 00:20:57.600
<00:20:54.600>is <00:20:54.774>beautiful <00:20:54.949>thing. <00:20:55.125>So <00:20:55.300>you <00:20:55.475>as <00:20:55.649>developer <00:20:55.824>can <00:20:56.000>write

425
00:20:57.600 --> 00:20:59.700
<00:20:57.600>new <00:20:57.833>stuff <00:20:58.066>instead <00:20:58.300>of <00:20:58.533>fix <00:20:58.766>old <00:20:59.000>one.

426
00:21:01.600 --> 00:21:04.100
<00:21:01.600>A <00:21:01.800>significant <00:21:02.000>advantage <00:21:02.199>of <00:21:02.399>kotlin <00:21:02.600>is <00:21:02.800>that <00:21:03.000>you

427
00:21:04.100 --> 00:21:07.500
<00:21:04.100>only <00:21:04.216>have <00:21:04.333>to <00:21:04.449>invest <00:21:04.566>in <00:21:04.683>new <00:21:04.800>language. <00:21:04.916>You <00:21:05.033>keep <00:21:05.149>your <00:21:05.266>spring <00:21:05.383>boots. <00:21:05.500>You

428
00:21:07.500 --> 00:21:10.600
<00:21:07.500>keep <00:21:07.675>your <00:21:07.850>quarkers. <00:21:08.025>So <00:21:08.200>you <00:21:08.375>keep <00:21:08.550>your <00:21:08.725>other <00:21:08.900>framework

429
00:21:10.600 --> 00:21:12.200
<00:21:10.600>and <00:21:11.066>simply <00:21:11.533>use <00:21:12.000>kotlin.

430
00:21:12.800 --> 00:21:16.100
<00:21:12.800>So <00:21:13.033>you <00:21:13.266>framework <00:21:13.500>knowledge <00:21:13.733>is <00:21:13.966>100% <00:21:14.200>preserved.

431
00:21:18.300 --> 00:21:21.200
<00:21:18.300>Another <00:21:18.427>nice <00:21:18.554>thing <00:21:18.681>is <00:21:18.809>that <00:21:18.936>you <00:21:19.063>can <00:21:19.190>gradually <00:21:19.318>adopt <00:21:19.445>a <00:21:19.572>kotlin <00:21:19.700>which

432
00:21:21.200 --> 00:21:24.200
<00:21:21.200>goes <00:21:21.293>really <00:21:21.386>step <00:21:21.480>by <00:21:21.573>step. <00:21:21.666>We <00:21:21.760>will <00:21:21.853>see <00:21:21.946>in <00:21:22.040>a <00:21:22.133>minute. <00:21:22.226>We <00:21:22.320>have <00:21:22.413>some <00:21:22.506>time <00:21:22.600>left

433
00:21:24.200 --> 00:21:24.400
<00:21:24.200>for <00:21:24.380>that.

434
00:21:25.600 --> 00:21:28.300
<00:21:25.600>And <00:21:25.833>because <00:21:26.066>jetbrains <00:21:26.300>Google <00:21:26.533>are <00:21:26.766>players <00:21:27.000>behind

435
00:21:28.300 --> 00:21:31.400
<00:21:28.300>kotlin <00:21:28.475>kotlin <00:21:28.649>is <00:21:28.825>really <00:21:29.000>here <00:21:29.175>to <00:21:29.350>stay <00:21:29.524>well <00:21:29.700>supported.

436
00:21:32.800 --> 00:21:35.500
<00:21:32.800>And <00:21:33.033>in <00:21:33.266>my <00:21:33.500>experience <00:21:33.733>most <00:21:33.966>developers <00:21:34.200>that

437
00:21:35.500 --> 00:21:38.200
<00:21:35.500>use <00:21:35.675>kotlin <00:21:35.850>really <00:21:36.025>get <00:21:36.200>a <00:21:36.375>more <00:21:36.550>happy <00:21:36.725>species <00:21:36.900>because

438
00:21:38.200 --> 00:21:41.300
<00:21:38.200>what <00:21:38.340>I <00:21:38.480>experienced <00:21:38.620>in <00:21:38.760>my <00:21:38.900>work <00:21:39.040>is <00:21:39.180>that <00:21:39.320>kotlin <00:21:39.460>really <00:21:39.600>allows

439
00:21:41.300 --> 00:21:44.600
<00:21:41.300>to <00:21:41.455>express <00:21:41.611>your <00:21:41.766>ideas <00:21:41.922>without <00:21:42.077>any <00:21:42.233>hurdle <00:21:42.388>or <00:21:42.544>hindrance <00:21:42.700>it

440
00:21:44.600 --> 00:21:47.800
<00:21:44.600>just <00:21:44.755>kind <00:21:44.911>of <00:21:45.066>flows <00:21:45.222>from <00:21:45.377>your <00:21:45.533>brain <00:21:45.688>into <00:21:45.844>your <00:21:46.000>computer.

441
00:21:48.600 --> 00:21:51.000
<00:21:48.600>Which <00:21:48.800>of <00:21:49.000>course <00:21:49.199>might <00:21:49.399>also <00:21:49.600>track <00:21:49.800>new <00:21:50.000>Developers?

442
00:21:52.400 --> 00:21:56.100
<00:21:52.400>So <00:21:52.575>the <00:21:52.750>question <00:21:52.925>is <00:21:53.100>how <00:21:53.275>do <00:21:53.450>you <00:21:53.625>start <00:21:53.800>adopting

443
00:21:55.100 --> 00:21:56.600
kotlin?

444
00:21:57.300 --> 00:22:00.800
<00:21:57.300>Well, <00:21:57.475>I <00:21:57.649>would <00:21:57.825>say <00:21:58.000>you <00:21:58.175>should <00:21:58.350>start <00:21:58.524>by <00:21:58.700>adding

445
00:22:00.800 --> 00:22:02.400
<00:22:00.800>a <00:22:01.266>dependency <00:22:01.733>to <00:22:02.200>your

446
00:22:03.900 --> 00:22:06.500
<00:22:03.900>Built <00:22:04.250>configuration <00:22:04.600>Maven <00:22:04.950>or <00:22:05.300>Gretel

447
00:22:06.500 --> 00:22:09.300
<00:22:06.500>you <00:22:06.733>add <00:22:06.966>some <00:22:07.200>compiler <00:22:07.433>plugin <00:22:07.666>somewhere <00:22:07.900>here.

448
00:22:09.300 --> 00:22:10.700
<00:22:09.300>Copy <00:22:09.552>paste <00:22:09.804>it <00:22:10.056>from <00:22:10.308>a <00:22:10.560>website.

449
00:22:11.400 --> 00:22:14.500
<00:22:11.400>Use <00:22:11.527>Java <00:22:11.654>17. <00:22:11.781>I <00:22:11.909>heard <00:22:12.036>that <00:22:12.163>just <00:22:12.290>say <00:22:12.418>doesn't <00:22:12.545>matter <00:22:12.672>all <00:22:12.800>works

450
00:22:14.500 --> 00:22:15.800
<00:22:14.500>always <00:22:15.085>Channel <00:22:15.670>8.

451
00:22:16.600 --> 00:22:17.400
<00:22:16.600>and <00:22:16.780>then <00:22:16.960>a <00:22:17.140>lot <00:22:17.320>of

452
00:22:19.600 --> 00:22:22.300
<00:22:19.600>people <00:22:19.774>who <00:22:19.949>want <00:22:20.125>to <00:22:20.300>see <00:22:20.475>very <00:22:20.649>kotlin <00:22:20.824>have <00:22:21.000>some

453
00:22:22.300 --> 00:22:25.700
<00:22:22.300>benefits <00:22:22.407>with <00:22:22.515>them <00:22:22.623>start <00:22:22.730>out <00:22:22.838>with <00:22:22.946>testing. <00:22:23.053>So <00:22:23.161>here <00:22:23.269>we <00:22:23.376>have <00:22:23.484>a <00:22:23.592>simple <00:22:23.700>spring

454
00:22:25.700 --> 00:22:28.900
<00:22:25.700>boot <00:22:25.900>application <00:22:26.100>where <00:22:26.300>we <00:22:26.500>test <00:22:26.700>our <00:22:26.900>user <00:22:27.100>Dale

455
00:22:28.900 --> 00:22:29.700
<00:22:28.900>date <00:22:29.260>access <00:22:29.620>object.

456
00:22:31.500 --> 00:22:34.300
<00:22:31.500>And <00:22:31.675>he <00:22:31.850>can't <00:22:32.025>IntelliJ <00:22:32.200>you <00:22:32.375>have <00:22:32.550>of <00:22:32.725>you <00:22:32.900>have

457
00:22:34.300 --> 00:22:38.000
<00:22:34.300>these <00:22:34.533>magic <00:22:34.766>shortcuts, <00:22:35.000>which <00:22:35.233>simply <00:22:35.466>converts <00:22:35.700>your

458
00:22:37.500 --> 00:22:40.800
<00:22:37.500>Java <00:22:37.780>class <00:22:38.060>to <00:22:38.340>kotlin <00:22:38.620>Tada. <00:22:38.900>There

459
00:22:40.800 --> 00:22:43.600
<00:22:40.800>is <00:22:40.975>kotlin. <00:22:41.149>Of <00:22:41.325>course. <00:22:41.500>It's <00:22:41.675>not <00:22:41.850>really <00:22:42.024>nice <00:22:42.200>kotlin.

460
00:22:43.600 --> 00:22:46.600
<00:22:43.600>You <00:22:43.774>still <00:22:43.949>need <00:22:44.125>to <00:22:44.300>make <00:22:44.475>it <00:22:44.649>look <00:22:44.824>okay <00:22:45.000>for

461
00:22:46.600 --> 00:22:49.500
<00:22:46.600>instance <00:22:46.727>new <00:22:46.854>abilities <00:22:46.981>nice, <00:22:47.109>but <00:22:47.236>actually <00:22:47.363>I <00:22:47.490>do <00:22:47.618>not <00:22:47.745>want <00:22:47.872>to <00:22:48.000>have

462
00:22:49.500 --> 00:22:50.200
<00:22:49.500>a <00:22:50.130>nullable.

463
00:22:51.500 --> 00:22:52.400
<00:22:51.500>construct <00:22:52.310>here

464
00:22:54.200 --> 00:22:57.300
<00:22:54.200>I <00:22:54.287>want <00:22:54.375>to <00:22:54.462>have <00:22:54.550>this <00:22:54.637>thing <00:22:54.725>in <00:22:54.812>checked <00:22:54.900>it <00:22:54.987>right <00:22:55.075>away <00:22:55.162>in <00:22:55.250>my <00:22:55.337>test. <00:22:55.425>So <00:22:55.512>I <00:22:55.600>can't

465
00:22:57.300 --> 00:23:00.600
<00:22:57.300>even <00:22:57.440>make <00:22:57.580>it <00:22:57.720>Mill <00:22:57.860>even <00:22:58.000>if <00:22:58.139>I <00:22:58.280>would <00:22:58.419>try <00:22:58.560>and <00:22:58.700>not

466
00:23:00.600 --> 00:23:03.400
<00:23:00.600>nice <00:23:00.740>features <00:23:00.879>in <00:23:01.020>kotlin <00:23:01.159>that <00:23:01.300>you <00:23:01.439>have <00:23:01.580>these <00:23:01.719>path <00:23:01.860>back <00:23:02.000>ticks

467
00:23:03.400 --> 00:23:06.400
<00:23:03.400>and <00:23:03.633>then <00:23:03.866>you <00:23:04.100>can <00:23:04.333>write. <00:23:04.566>Whoa <00:23:04.800>that's

468
00:23:06.400 --> 00:23:09.200
<00:23:06.400>hard <00:23:06.680>type <00:23:06.960>insert <00:23:07.240>new <00:23:07.520>user <00:23:07.800>and

469
00:23:09.200 --> 00:23:12.800
<00:23:09.200>find <00:23:09.550>it <00:23:09.900>by <00:23:10.250>email. <00:23:10.600>So

470
00:23:12.800 --> 00:23:15.400
<00:23:12.800>you <00:23:12.975>test <00:23:13.149>definitely <00:23:13.325>gets <00:23:13.500>much <00:23:13.675>more <00:23:13.850>readable. <00:23:14.024>You <00:23:14.200>guys

471
00:23:15.400 --> 00:23:18.300
<00:23:15.400>could <00:23:15.493>do <00:23:15.586>this <00:23:15.680>in <00:23:15.773>your <00:23:15.866>own <00:23:15.960>code <00:23:16.053>in <00:23:16.146>your <00:23:16.240>in <00:23:16.333>your <00:23:16.426>business <00:23:16.520>code, <00:23:16.613>but <00:23:16.706>I <00:23:16.800>wouldn't

472
00:23:18.300 --> 00:23:21.600
<00:23:18.300>advise <00:23:18.455>that <00:23:18.611>then, <00:23:18.766>of <00:23:18.922>course <00:23:19.077>we <00:23:19.233>can <00:23:19.388>use <00:23:19.544>the <00:23:19.700>nice

473
00:23:21.600 --> 00:23:22.500
assertions.

474
00:23:23.400 --> 00:23:25.800
<00:23:23.400>Should <00:23:23.866>not <00:23:24.333>be <00:23:24.800>no.

475
00:23:26.600 --> 00:23:28.200
<00:23:26.600>Same <00:23:26.949>here <00:23:27.300>for <00:23:27.649>the <00:23:28.000>equals.

476
00:23:30.500 --> 00:23:31.200
<00:23:30.500>Should <00:23:31.130>be.

477
00:23:33.900 --> 00:23:35.400
<00:23:33.900>Then <00:23:34.170>we <00:23:34.440>want <00:23:34.710>to <00:23:34.980>remove <00:23:35.250>those.

478
00:23:36.700 --> 00:23:40.000
<00:23:36.700>And <00:23:36.875>then <00:23:37.050>we <00:23:37.225>actually <00:23:37.400>have <00:23:37.575>quite <00:23:37.750>decent <00:23:37.925>kotlin <00:23:38.100>code.

479
00:23:39.100 --> 00:23:40.900
<00:23:39.100>Let's <00:23:39.449>see <00:23:39.800>if <00:23:40.149>it <00:23:40.500>runs.

480
00:23:41.600 --> 00:23:44.100
<00:23:41.600>So <00:23:41.716>this <00:23:41.833>was <00:23:41.949>the <00:23:42.066>test <00:23:42.183>before <00:23:42.300>I <00:23:42.416>see <00:23:42.533>it's <00:23:42.649>green. <00:23:42.766>So, <00:23:42.883>let's <00:23:43.000>see

481
00:23:44.100 --> 00:23:45.300
<00:23:44.100>if <00:23:44.280>you <00:23:44.460>can <00:23:44.639>make <00:23:44.820>it <00:23:45.000>green, <00:23:45.179>too.

482
00:23:53.500 --> 00:23:56.600
<00:23:53.500>Thrilling. <00:23:53.733>Well <00:23:53.966>the <00:23:54.200>test <00:23:54.433>passes <00:23:54.666>even <00:23:54.900>nice

483
00:23:56.600 --> 00:23:59.200
<00:23:56.600>to <00:23:56.800>read <00:23:57.000>then <00:23:57.199>it <00:23:57.399>might <00:23:57.600>be <00:23:57.800>time <00:23:58.000>you're

484
00:23:59.200 --> 00:24:02.400
<00:23:59.200>in <00:23:59.293>case <00:23:59.386>your <00:23:59.480>period <00:23:59.573>that <00:23:59.666>is <00:23:59.760>a <00:23:59.853>good <00:23:59.946>thing. <00:24:00.040>If <00:24:00.133>you <00:24:00.226>might <00:24:00.320>be <00:24:00.413>time <00:24:00.506>to <00:24:00.600>for

485
00:24:02.400 --> 00:24:05.200
<00:24:02.400>instance <00:24:02.540>convert <00:24:02.680>your <00:24:02.820>remain. <00:24:02.960>So <00:24:03.100>here <00:24:03.240>we <00:24:03.380>have <00:24:03.520>our <00:24:03.660>TPA <00:24:03.800>class

486
00:24:05.200 --> 00:24:08.300
<00:24:05.200>entity <00:24:05.375>class <00:24:05.550>with <00:24:05.725>all <00:24:05.900>the <00:24:06.075>shebang <00:24:06.250>that <00:24:06.425>needs <00:24:06.600>to

487
00:24:08.300 --> 00:24:11.100
<00:24:08.300>be <00:24:08.440>there <00:24:08.580>really <00:24:08.720>equals <00:24:08.860>hash <00:24:09.000>code <00:24:09.139>to <00:24:09.280>string <00:24:09.419>and <00:24:09.560>so <00:24:09.700>on

488
00:24:11.100 --> 00:24:13.300
<00:24:11.100>and <00:24:11.274>also <00:24:11.449>here <00:24:11.625>we <00:24:11.800>have <00:24:11.975>our <00:24:12.149>magic <00:24:12.324>key <00:24:12.500>combination.

489
00:24:14.200 --> 00:24:17.100
<00:24:14.200>Convert <00:24:14.433>enter <00:24:14.666>Papa <00:24:14.900>and <00:24:15.133>there <00:24:15.366>it <00:24:15.600>is.

490
00:24:17.100 --> 00:24:20.300
<00:24:17.100>We <00:24:17.227>do <00:24:17.354>some <00:24:17.481>adjustments. <00:24:17.609>We <00:24:17.736>want <00:24:17.863>to <00:24:17.990>make <00:24:18.118>a <00:24:18.245>data <00:24:18.372>class <00:24:18.500>remember?

491
00:24:21.500 --> 00:24:24.300
<00:24:21.500>I <00:24:21.700>won't <00:24:21.900>have <00:24:22.100>these <00:24:22.300>arguments <00:24:22.500>as <00:24:22.700>Constructor <00:24:22.900>arguments.

492
00:24:24.300 --> 00:24:27.200
<00:24:24.300>I <00:24:24.533>don't <00:24:24.766>want <00:24:25.000>to <00:24:25.233>overuse <00:24:25.466>new <00:24:25.700>ability

493
00:24:27.200 --> 00:24:28.500
<00:24:27.200>only <00:24:27.492>there. <00:24:27.785>It's <00:24:28.077>really <00:24:28.370>applicable.

494
00:24:33.800 --> 00:24:36.300
<00:24:33.800>Here <00:24:34.000>want <00:24:34.200>to <00:24:34.399>keep <00:24:34.600>nullability <00:24:34.800>but <00:24:35.000>not <00:24:35.200>make

495
00:24:36.300 --> 00:24:39.500
<00:24:36.300>it <00:24:36.580>private. <00:24:36.860>And <00:24:37.139>that's <00:24:37.419>actually <00:24:37.700>how

496
00:24:39.500 --> 00:24:42.200
<00:24:39.500>far <00:24:39.675>things <00:24:39.850>go. <00:24:40.025>The <00:24:40.200>rest <00:24:40.375>can <00:24:40.550>simply <00:24:40.725>go <00:24:40.900>away.

497
00:24:43.200 --> 00:24:46.400
<00:24:43.200>And <00:24:43.327>of <00:24:43.454>course <00:24:43.581>no <00:24:43.709>Wars, <00:24:43.836>please <00:24:43.963>we <00:24:44.090>won't <00:24:44.218>have <00:24:44.345>any <00:24:44.472>notable <00:24:44.600>domain.

498
00:24:47.900 --> 00:24:50.800
<00:24:47.900>And <00:24:48.075>the <00:24:48.250>Builder <00:24:48.425>we <00:24:48.600>created <00:24:48.775>in <00:24:48.950>our <00:24:49.125>complication <00:24:49.300>also

499
00:24:50.800 --> 00:24:53.200
<00:24:50.800>a <00:24:51.000>lot <00:24:51.200>of <00:24:51.399>code <00:24:51.600>simply <00:24:51.800>throw <00:24:52.000>it <00:24:52.200>away

500
00:24:53.200 --> 00:24:54.600
<00:24:53.200>not <00:24:53.620>need <00:24:54.040>it <00:24:54.460>anymore.

501
00:24:55.900 --> 00:24:57.400
<00:24:55.900>Same <00:24:56.170>is <00:24:56.440>true <00:24:56.710>for <00:24:56.980>our <00:24:57.250>Dale.

502
00:24:58.200 --> 00:25:01.300
<00:24:58.200>Because <00:24:58.307>we <00:24:58.415>still <00:24:58.523>have <00:24:58.630>optional <00:24:58.738>here <00:24:58.846>and <00:24:58.953>we <00:24:59.061>don't <00:24:59.169>have <00:24:59.276>option <00:24:59.384>our <00:24:59.492>code. <00:24:59.600>We

503
00:25:01.300 --> 00:25:02.600
<00:25:01.300>don't <00:25:01.533>have <00:25:01.768>no <00:25:02.002>ability <00:25:02.235>of <00:25:02.469>kotlin.

504
00:25:05.300 --> 00:25:07.900
<00:25:05.300>Not <00:25:05.455>advisable <00:25:05.611>to <00:25:05.766>make <00:25:05.922>two <00:25:06.077>kind <00:25:06.233>of <00:25:06.388>nullable <00:25:06.544>Concepts <00:25:06.700>together.

505
00:25:08.700 --> 00:25:09.100
<00:25:08.700>also <00:25:09.060>here

506
00:25:11.100 --> 00:25:11.600
<00:25:11.100>convert <00:25:11.550>it.

507
00:25:12.800 --> 00:25:13.800
<00:25:12.800>apply <00:25:13.250>some <00:25:13.700>fixes

508
00:25:17.500 --> 00:25:20.500
<00:25:17.500>and <00:25:17.616>as <00:25:17.733>you <00:25:17.850>see <00:25:17.966>spring <00:25:18.083>boot <00:25:18.200>knows <00:25:18.316>how <00:25:18.433>to <00:25:18.550>use <00:25:18.666>notability. <00:25:18.783>So <00:25:18.900>there's

509
00:25:20.500 --> 00:25:22.800
<00:25:20.500>really <00:25:20.780>first <00:25:21.060>class <00:25:21.340>support <00:25:21.620>in <00:25:21.900>there.

510
00:25:23.700 --> 00:25:26.100
<00:25:23.700>Let's <00:25:23.840>see <00:25:23.980>if <00:25:24.120>our <00:25:24.260>test <00:25:24.400>still <00:25:24.540>works <00:25:24.680>because <00:25:24.820>now <00:25:24.960>we <00:25:25.100>can

511
00:25:26.100 --> 00:25:27.500
<00:25:26.100>throw <00:25:26.520>away <00:25:26.940>notability <00:25:27.360>here.

512
00:25:28.700 --> 00:25:29.500
<00:25:28.700>Run <00:25:28.940>the <00:25:29.180>test <00:25:29.420>again.

513
00:25:41.400 --> 00:25:44.300
<00:25:41.400>And <00:25:41.633>apparently <00:25:41.866>I <00:25:42.100>hope <00:25:42.333>pray <00:25:42.566>that <00:25:42.800>it's

514
00:25:44.300 --> 00:25:45.500
<00:25:44.300>still <00:25:44.659>green <00:25:45.020>still <00:25:45.380>green.

515
00:25:46.400 --> 00:25:47.300
<00:25:46.400>Then <00:25:46.562>we <00:25:46.724>go <00:25:46.886>to <00:25:47.048>our <00:25:47.210>controller.

516
00:25:48.900 --> 00:25:49.700
<00:25:48.900>I <00:25:49.620>uncommon

517
00:25:51.700 --> 00:25:52.000
Oh.

518
00:25:54.400 --> 00:25:57.700
<00:25:54.400>And <00:25:54.555>even <00:25:54.711>if <00:25:54.866>my <00:25:55.022>call <00:25:55.177>doesn't <00:25:55.333>compile <00:25:55.488>it's <00:25:55.644>worth <00:25:55.800>it.

519
00:25:59.100 --> 00:26:02.400
<00:25:59.100>We <00:25:59.240>can <00:25:59.379>write <00:25:59.520>this <00:25:59.659>in <00:25:59.800>a <00:25:59.939>more <00:26:00.080>elegant <00:26:00.219>way <00:26:00.360>for <00:26:00.500>instance

520
00:26:02.400 --> 00:26:06.000
<00:26:02.400>usual <00:26:02.633>dot <00:26:02.866>Avatar <00:26:03.100>URL. <00:26:03.333>Otherwise <00:26:03.566>we <00:26:03.800>fetch

521
00:26:05.100 --> 00:26:06.500
<00:26:05.100>in <00:26:06.360>Avatar.

522
00:26:09.500 --> 00:26:12.500
<00:26:09.500>This <00:26:09.627>code <00:26:09.754>can <00:26:09.881>go <00:26:10.009>away. <00:26:10.136>We <00:26:10.263>don't <00:26:10.390>use <00:26:10.518>the <00:26:10.645>Builder <00:26:10.772>we <00:26:10.900>use

523
00:26:12.500 --> 00:26:13.200
<00:26:12.500>to <00:26:12.815>remember <00:26:13.130>what?

524
00:26:15.700 --> 00:26:17.800
<00:26:15.700>Any <00:26:16.050>idea <00:26:16.400>copy, <00:26:16.750>of <00:26:17.100>course?

525
00:26:19.100 --> 00:26:20.200
<00:26:19.100>Avatar <00:26:20.090>URL

526
00:26:23.100 --> 00:26:26.400
<00:26:23.100>and <00:26:23.216>that's <00:26:23.333>all <00:26:23.449>too <00:26:23.566>and <00:26:23.683>that's <00:26:23.800>all <00:26:23.916>there <00:26:24.033>is <00:26:24.149>to <00:26:24.266>it. <00:26:24.383>We <00:26:24.500>still

527
00:26:26.400 --> 00:26:30.300
<00:26:26.400>have <00:26:26.555>some <00:26:26.711>Java <00:26:26.866>code <00:26:27.022>left, <00:26:27.177>right <00:26:27.333>so <00:26:27.488>our <00:26:27.644>Avatar <00:26:27.800>dial.

528
00:26:31.500 --> 00:26:34.800
<00:26:31.500>Is <00:26:31.780>still <00:26:32.060>Java <00:26:32.340>code <00:26:32.620>perfectly <00:26:32.900>interacts

529
00:26:34.800 --> 00:26:35.900
<00:26:34.800>with <00:26:35.130>our <00:26:35.460>kotlin <00:26:35.790>class.

530
00:26:36.900 --> 00:26:39.500
<00:26:36.900>So <00:26:37.100>once <00:26:37.300>you've <00:26:37.500>done <00:26:37.700>that, <00:26:37.900>so <00:26:38.100>make <00:26:38.300>your

531
00:26:39.500 --> 00:26:42.500
<00:26:39.500>test <00:26:39.675>work <00:26:39.850>rewrite <00:26:40.025>some <00:26:40.200>code <00:26:40.375>to <00:26:40.550>maybe <00:26:40.725>time <00:26:40.900>to

532
00:26:42.500 --> 00:26:45.300
<00:26:42.500>write <00:26:42.700>your <00:26:42.900>first <00:26:43.100>microservice <00:26:43.300>and <00:26:43.500>in <00:26:43.700>case <00:26:43.900>you're

533
00:26:45.300 --> 00:26:49.100
<00:26:45.300>happy <00:26:45.533>with <00:26:45.766>it, <00:26:46.000>it <00:26:46.233>also <00:26:46.466>probably <00:26:46.700>necessary

534
00:26:48.100 --> 00:26:51.200
<00:26:48.100>and <00:26:48.449>needed <00:26:48.800>to <00:26:49.149>embed <00:26:49.500>some

535
00:26:51.200 --> 00:26:54.300
<00:26:51.200>quality <00:26:51.375>toolchain <00:26:51.550>in <00:26:51.725>your <00:26:51.900>cotling <00:26:52.075>pipeline, <00:26:52.250>which <00:26:52.425>is <00:26:52.600>all

536
00:26:54.300 --> 00:26:54.900
<00:26:54.300>available. <00:26:54.570>Of <00:26:54.840>course.

537
00:26:57.300 --> 00:27:00.600
<00:26:57.300>And <00:26:57.475>when <00:26:57.649>you <00:26:57.825>have <00:26:58.000>some <00:26:58.175>proven <00:26:58.350>cases <00:26:58.524>that <00:26:58.700>your

538
00:27:00.600 --> 00:27:02.100
<00:27:00.600>kotlin <00:27:00.870>code <00:27:01.139>works <00:27:01.409>fine <00:27:01.679>in <00:27:01.949>production.

539
00:27:03.100 --> 00:27:07.600
<00:27:03.100>Time <00:27:03.274>to <00:27:03.449>spread <00:27:03.625>the <00:27:03.800>news <00:27:03.975>get <00:27:04.149>people <00:27:04.324>enthusiastic <00:27:04.500>start

540
00:27:06.600 --> 00:27:09.300
<00:27:06.600>a <00:27:06.949>community <00:27:07.300>in-house <00:27:07.649>invite <00:27:08.000>speakers

541
00:27:09.300 --> 00:27:12.700
<00:27:09.300>so <00:27:09.475>that <00:27:09.649>the <00:27:09.825>culturally <00:27:10.000>word <00:27:10.175>can <00:27:10.350>be <00:27:10.524>spread <00:27:10.700>and

542
00:27:12.700 --> 00:27:13.600
<00:27:12.700>can <00:27:13.510>grow.

543
00:27:14.800 --> 00:27:16.700
<00:27:14.800>It <00:27:14.955>also <00:27:15.111>helps <00:27:15.266>create <00:27:15.422>a <00:27:15.577>roadmap <00:27:15.733>how <00:27:15.888>to <00:27:16.044>deal <00:27:16.200>with.

544
00:27:17.800 --> 00:27:21.100
<00:27:17.800>Legacy <00:27:18.000>codebase <00:27:18.200>or <00:27:18.399>charcoal <00:27:18.600>base <00:27:18.800>or <00:27:19.000>kotlin <00:27:19.200>co-pays

545
00:27:20.100 --> 00:27:23.200
<00:27:20.100>which <00:27:20.274>things <00:27:20.449>rewrite <00:27:20.625>which <00:27:20.800>you <00:27:20.975>don't <00:27:21.149>to <00:27:21.324>give <00:27:21.500>some

546
00:27:23.200 --> 00:27:26.100
<00:27:23.200>guidelines <00:27:23.400>to <00:27:23.600>your <00:27:23.800>to <00:27:24.000>your <00:27:24.200>teams <00:27:24.400>in <00:27:24.600>order

547
00:27:26.100 --> 00:27:26.100
to

548
00:27:27.300 --> 00:27:30.600
<00:27:27.300>get <00:27:27.427>some <00:27:27.554>idea <00:27:27.681>of <00:27:27.809>what <00:27:27.936>to <00:27:28.063>do <00:27:28.190>instead <00:27:28.318>of <00:27:28.445>just <00:27:28.572>when <00:27:28.700>inventing

549
00:27:30.600 --> 00:27:31.300
<00:27:30.600>the <00:27:30.810>view <00:27:31.020>from <00:27:31.230>scratch.

550
00:27:32.700 --> 00:27:35.800
<00:27:32.700>And <00:27:32.840>what <00:27:32.980>I <00:27:33.120>see <00:27:33.260>particularly <00:27:33.400>helping <00:27:33.540>a <00:27:33.680>lot <00:27:33.820>is <00:27:33.960>starting <00:27:34.100>in-house

551
00:27:35.800 --> 00:27:38.100
<00:27:35.800>training <00:27:35.955>program. <00:27:36.111>What <00:27:36.266>I <00:27:36.422>see <00:27:36.577>is <00:27:36.733>when <00:27:36.888>people <00:27:37.044>kind <00:27:37.200>of

552
00:27:38.100 --> 00:27:41.900
<00:27:38.100>move <00:27:38.207>from <00:27:38.315>java <00:27:38.423>to <00:27:38.530>kotlin <00:27:38.638>what <00:27:38.746>they <00:27:38.853>first <00:27:38.961>write <00:27:39.069>is <00:27:39.176>kind <00:27:39.284>of <00:27:39.392>java <00:27:39.500>is

553
00:27:41.900 --> 00:27:44.400
<00:27:41.900>kotlin <00:27:42.055>and <00:27:42.211>they <00:27:42.366>get <00:27:42.522>some <00:27:42.677>benefits <00:27:42.833>out <00:27:42.988>of <00:27:43.144>kotlin <00:27:43.300>but

554
00:27:44.400 --> 00:27:47.200
<00:27:44.400>they <00:27:44.555>definitely <00:27:44.711>cannot <00:27:44.866>leverage <00:27:45.022>all <00:27:45.177>that's <00:27:45.333>in <00:27:45.488>there. <00:27:45.644>So <00:27:45.800>it

555
00:27:47.200 --> 00:27:51.400
<00:27:47.200>really <00:27:47.307>helps <00:27:47.415>to <00:27:47.523>get <00:27:47.630>some <00:27:47.738>experienced <00:27:47.846>people <00:27:47.953>on <00:27:48.061>board <00:27:48.169>for <00:27:48.276>the <00:27:48.384>beginning <00:27:48.492>for <00:27:48.600>training

556
00:27:51.400 --> 00:27:54.300
<00:27:51.400>or <00:27:51.600>maybe <00:27:51.800>someone <00:27:52.000>was <00:27:52.200>experience <00:27:52.400>in <00:27:52.600>your <00:27:52.800>project

557
00:27:54.300 --> 00:27:57.200
<00:27:54.300>and <00:27:54.427>then <00:27:54.554>within <00:27:54.681>two <00:27:54.809>or <00:27:54.936>three <00:27:55.063>months <00:27:55.190>also <00:27:55.318>all <00:27:55.445>the <00:27:55.572>child <00:27:55.700>people

558
00:27:57.200 --> 00:28:00.500
<00:27:57.200>know <00:27:57.355>how <00:27:57.511>to <00:27:57.666>write <00:27:57.822>idiomatic <00:27:57.977>kotlin <00:27:58.133>really <00:27:58.288>getting <00:27:58.444>all <00:27:58.600>out

559
00:28:00.500 --> 00:28:02.000
<00:28:00.500>of <00:28:00.725>the <00:28:00.950>language <00:28:01.175>which <00:28:01.400>is <00:28:01.625>in <00:28:01.850>there.

560
00:28:02.600 --> 00:28:05.500
<00:28:02.600>And <00:28:02.774>then <00:28:02.949>I <00:28:03.125>really <00:28:03.300>can <00:28:03.475>promise <00:28:03.649>you <00:28:03.824>based <00:28:04.000>on

561
00:28:05.500 --> 00:28:06.100
<00:28:05.500>experience <00:28:06.040>that.

562
00:28:07.400 --> 00:28:08.400
<00:28:07.400>You <00:28:07.700>won't <00:28:08.000>be <00:28:08.300>disappointed.

563
00:28:10.300 --> 00:28:10.600
<00:28:10.300>Thank <00:28:10.570>you.