Check out a free preview of the full The Good Parts of JavaScript and the Web course:
The "Closure and Continuation" Lesson is part of the full, The Good Parts of JavaScript and the Web course featured in this preview video. Here's what you'd learn in this lesson:

Doug wraps up his coverage on Asynchronicity with a few final thoughts on closure and continuation. He also provides links to his RQ and JSCheck projects and answers a few audience questions.

Get Unlimited Access Now

Transcript from the "Closure and Continuation" Lesson

>> [MUSIC]

>> Douglas: Both of these systems RQ and JSCheck, make tremendous use of closure and continuation. And the really great thing about working with closure and continuation is that they make you feel really smart when you notice this right. Yesterday, that you've been doing a lot of work with closure, it makes you feel smart when you get these things, it's like, mm.

[00:00:28] So and everybody deserves to feel that way yet you know how people who do a lot of functional programming are always acting like they're so much smarter than you are? They're not, but they're working with this stuff all the time and it makes them feel good all the time.

[00:00:43] It makes them feel smart and that's a really good way to feel, everybody should feel like that. Whereas the stuff you're working with every day, does it make you feel smart? No it does not. So you want to get a hold of this stuff, and it's great. So both of these projects are public domain, they're both on GitHub.

[00:01:01] They're both totally free, if they can help you go ahead and take it there's lots of other good stuff in the world too if that is better suited to you use that. So any last questions about RQ or JSCheck or synchronicity? Yes?
>> Speaker 2: There's a couple that queued up here.

[00:01:19] One, he was wondering if you, have you checked out Elm since the type inference is the same as Hasko?
>> Douglas: Yeah, I mentioned Elm earlier, there's good stuff. Everything in that list is good, but I think our queue is of interest to you, because it is the best suited, I think, to the workflows that you have to implement.

>> Douglas: Anything else?
>> Speaker 2: There's one from earlier from the security section. He just wanted you to clarify, or he's asking, we're learning about objects in security and how to prevent attacks but isn't this something that servers are supposed to deal with?
>> Douglas: It's something everything has to deal with, it's not so much the servers, it's us.

[00:02:13] It's the people running the programs we have to deal with the stuff.
>> Speaker 3: Yeah, a little bit more specifically, though. It sounds like we're talking about, you have an object and you don't want some other object to attack it, this has to do with mash-ups, right? Because you want to lend out your code to somebody else and you want to make sure that they don't infect your code.

>> Douglas: I want to strengthen everything, so if I can make my code strong enough that I can run it with third parties, which is the thing that we want mash-ups to be able to do, I can be confident that it's going to work with my coworkers stuff as well that That most of the attacks that are bringing our systems down are self-inflicted right.

[00:03:01] The stuff that we do to ourselves because we just didn't get it working well.
>> Speaker 3: Because you're not saying if you're not doing mash-ups, don't worry about this?
>> Douglas: No, no we need to worry about this all the time. Everything we write should be to that level of quality, everything, everything.