 error or exception. Don't quite know what the distinction is. But this exception just means something happened and I want to know about it. Error means something really bad happened. But you can throw any object, which of course is everything, so you could throw a 7, you know, if you want to do. I don't know who would catch a 7, but you can if you want. The 7 catcher. The 7 catcher, exactly. And also the typical try catch finally blocks. So you can ensure that a block gets run, no matter how you get away from the original code. Classes might, since we've been talking about classes, I'll circle back around with them now. So again, everything is an instance of a class. Ultimately, all classes inherit from object. It's based on a single inheritance system with mixed ends. So no multiple inheritance, try to figure out where this method came from stuff. Okay, it's only single inheritance. An interesting side-up bit about that is constructors are not inherited at all. So you basically, after the next level down, you want to also understand a from array. You have to copy that. Now you can call super and get the super method of it. But we know only to have the problem of, okay, now we've done a couple levels down in inheritance. Which part of the constructor do you call first? And what are you passing it? And how does it get passed through? You're doing it all explicitly, yes. Is a function an object? Yes, I think there are methods. Yeah, because you can ask an anonymous function how many arguments are taken, what are their shapes? Oh, can you pass a function in? Yeah, functions are first class objects and that they can be passed as arguments. Yes, there's not any type checking on that yet. They're trying to figure out a good syntax for it. So the compiler doesn't know anything other than we have a function here. So we lose some of the type checking at that point. And like I said, they're working on that. So the new method can be used with a class name or with a class method. Again, typical strong typing object system. So objects have members. They consist of methods and instance variables. Classes can also be abstract, which is typically how you define a mix-in interface. And many operators can be over in to provide a custom interface. You can have nested, or not nested, but derive classes with the extends keyword. So you might create a class A and then class B extends A. Again, pretty familiar syntax if you're used to most modern languages. Class members look like this. So this is a typical, you know, first class that you see, a point with X and Y. And here we're defining, these are the instance variables. If they were class variables, so one per class, I think you put the word static in front of them. So it'd be static num X, static num Y. And so here's one of the methods defined here, two string. Two string is actually a special one. It's what the printer calls internally whenever it wants to convert something to a string. So typically, every class will define, at least for your debugging purposes, a two string that gives you the essential information from that particular instance. So this X and Y here refers to the X and Y that are created with it. So here I'm creating a new point. And initially, the X and Y are both going to be null, because I didn't have a constructor that took them in. So this is the default constructor. And I can set these. And then I will be able to print that. It will say a point, left bracket, four comma seven, right bracket. So very obvious, typical stuff. The classes in Dart have the ability to override getters and setters. So I could actually have it so that I would have the word set X equals some function, or arrow some function. And when this same exact code is run, it will run my setter instead of running the internal setter. So you don't even have to change the rest of your code and you decide later, oh, I want to add a getter for this to see what value is being gotten on a trace somehow. You can just change the code in the class and not change the rest of your system. So the code for setting members is already also the code for calling the setter on that member. That's where that slide bullet came from. Yes. Class variables, class methods, also supported typically with the word static in front of them so that you know they belong to the class. Generics. So there's a full support, as you've seen in a couple of examples, for defining a type that's like two things that are related or something like that. So again, with optional typing, why use generics is to inform the compiler during check mode and inform the IDE during development how to help you out. So now we're saying this is a new list, but it will only contain strings. So that typing information is carried along in this variable at this point. It says I know now this is a list of strings only. And so of course, at all with Randall and Kermit, it's going to work just fine there. But the compiler in check mode is going to see that and blow up. So it's going to tell me no, no, no, no, no, there has to be a string at that point. And actually, if you tab complete that while you're coding, it'll actually say this must be a string here. It's very, very calm because it's bringing all that information forward. You can also use to describe interfaces. And here we're seeing an example of I want to have a generic caching type. But of course, every cast might need a different thing, we might want to cache of strings, we might want to cache of numbers. So when you import this interface into your concrete class, it will know that this T stands for some type. And then this T here is saying I have a getter, a regular that is of type T, returning type T. And it has to have a string key. So this is caches that don't have key strings. We could actually do two levels of it. I didn't want to get the example too complicated. And here's my setter. Whenever I put something into one of these caches, it takes the original key and the value. Again, noticing every place that there's a T here is going to be replaced by a concrete class when I make it a concrete class of my own. Kind of nice. Asynchronous operations. So if you're familiar with like promise libraries for JavaScript, this is modeled on that. Actually, they both sort of modeled on each other because Dart got it first, then they added it to ECMA 6, but they used a different name. I don't know why they used a different name. I think it's because promise was already used for this in some libraries. So it provides two kinds of forward information. It provides futures, which is one value sometime soon, sometime eventually, and a stream, many values over time. You can also set up broadcast streams, which say all these values are being split out to whoever wants them, or all of people at the same time. And again, you can use try, catch, finally style logic with either of these. Again, if you're familiar with any of the promise libraries, you know about having the nested, not the thing that's avoiding callback hell is that you're basically then adding when this is true to this, and when the value comes out of that, when this is true to this, so on. So similar looking things in here. I don't have any examples of that, though. But you can also run in these asynchronous streams in what looks like synchronous mode. So if you add async to the beginning of a subroutine, it says we expect there to be some things, in this case, lookup version, that are actually returning futures. But we don't want to use the future notation for it. We just want to have it wait there, logically, until this future actually then completes. Now, what it's actually doing behind the scenes is it rewrites this code so that the subroutine can sort of temporarily put itself on hold, and it returns right away. And so the output you'll have is also going to be a future coming out of here. So if you use that future somewhere else, then it all just works together. But unless you use isolates, which I'll mention in a couple more minutes, it's really single threaded all the time. So this is to sort of turn it around and make it sort of the way you would do asynchronous work in JavaScript. Lots of libraries. A couple minutes here. So Dart Core is going to have your numbers, your collections, your strings. The async stuff has all the async programming, futures, promises, streams, things like that. Math, math and random. HTML, for client side apps, we need things like go get this element from the DOM, read out its attributes, things like that. And that's all in the HTML package. And Dart.io for server side stuff. You could never import both HTML and IO because you're either running in the browser or you're running on the server. So when they build apps that have common features on both the client side and the server side, they put all that stuff into a third library that both of the top level codes pull in. And that's how they get whether it's IO or HTML. IO is great, though. It has all things like fork a process and give me the result back or open up a file. Pretty much everything Node.js would have, that sort of level thing. Encoding, decoding JSON, UTF-8, mirrors, which is the package you bring in to say, what are my method calls? And call this method with these parameters, but do it sort of at runtime. Forget what you want to do at runtime. Lots more standard libraries. And by standard libraries, I mean all this comes out of the box with Dart. So you don't have to go fetch something or install something. But wait, there's more. The pub. There's a lot of things in the Dart community that are named like Darts. So this is the pub. This is where you go to get more code. Exactly. Or to get hammered, I guess. Okay. So again, like Perl's CPAN for Dart, my closest example. And it was set up like two years ago. So really early on. There's a hostable version, or the hosted version, which is the official central repository. But there's also, you can easily bring the version in house if you have private code that you still want to use with some sort of CPAN-like thing. So that's already set up that way. You publish your shared libraries, you incorporate those libraries into your project. There's a pubspec.yaml that is with your project that you use to control the pub it's going to come from. And also version ranges. So there's a thing that works out. Okay. I want a version 1 to 1.5 of this code. I want version 0.7 to 0.8 of this code. And it tries to solve all the different ways and looks at all the different code and tries to figure out, can you actually have this build? Sometimes it just says, no, you're not going to get anything. So you better figure out if those are too restrictive. I don't know what Maven is. So I can tell you, yes, that's one of those things in the spheres that I don't know. Yeah, pub is more about, yeah, pubs, yeah. And no, this is more, this is simpler. This is just about talking to the pub. So it's about getting just the version numbers correct. Yeah. Yeah, yeah, something like that. Yeah. So when you upload to pub, the pub spec is what gets downloaded for other people. So they pull that down. I think it's all cached and everything that way. Okay, so that's that. Oh, good. Pretty close then. So these are some of the places I went to create this talk, and I would suggest you go look at them. The Wikipedia page actually is fairly long, which is really nice. I stole a lot of little examples from there. There's a totally open source book from O'Reilly called Dart Up and Running. It was written by Seth Latt a couple years ago. It's also on the website for free on dartlang.org for free. And that one keeps getting updated as Dart continues to change. The hard copy, you know, dead tree books do not get updated. So they might be doing new printing cycles now. Last I checked it, there was no new edition of the printed version. So just use the one online. News.dartlang.org. I don't know why I didn't write the URLs in here. That's because I can click on them here. But you guys can't click on this. I'm sorry. That's a little stupid. All right. Yes, there's the only URL to remember. This is all linked from dartlang.org. And that one is not only clickable, you can read it. So that's good. Glad I did that. And that is the end of my presentation. I'll take questions now. Sorry. You were clapping too loud. Test frameworks. Yes. Yes, there's a lot of tests. There's a very robust testing system for Dart. It comes with the package. The testing system even deals with futures. So it understands, you know, I'm calling this code and I'm wanting to call this method. And then I'm hoping eventually it returns with this value. So it understands that from the get go. And all the HTML related things have HTML testing systems built with them as well. So yes, you can do modern testing all the way through with this. The back there. Yeah, it has exactly that. So when you have an isolate, you basically give it an, you have an inbox port. And the very first thing you usually do is then pass something, pass your import to them, and then they will return their out port. So yeah, it's kind of cool. Yeah. Yes, of course I can say many things about that. That was true a couple years ago. They're working very hard to do that. The first thing that Dart has as an advantage is that it does tree shaking. So if you pull in a huge library, let's say jQuery size, but you only use three methods in it. It will only transpile those three methods. So you don't get the whole thing. So some Dart deploys are much smaller. A little bit of the problem also is that the early JavaScript interoperability required always required using the mirrors. And then once you get the mirror in all the meta information has to be available at runtime. And that was a lot of the code that was in those bigger deploys. But they are very aware of this. Every release has been making smaller and smaller JavaScripts. And I guess you guys can tell the context of the question. We're making smaller and smaller JavaScript stuff. And they're even working on the JavaScript to actually sort of mimic the original Dart code using, if you flip the switch, so that you're using the original Dart variables and the original sort of layout of your code in terms of classes and methods and things. So they're trying to get much closer to what you would be doing with TypeScript, yes. Yeah. How about what? Unit testing fully supported, yes. So unit testing on individual classes can have their tests along with them. There's a standard layout when you upload something to pub about where the tests are because the tools to run those tests are built into the Dart distribution. Here. Is anyone single steps through Dart? Yes. The debugger that comes with the Dart SDK, which you would use from, say, a web storm or IntelliJ or something like that. You can set great points. You can single step. If you want a more higher level view of something that's running, there's of the observatory as well. So you can see what's currently running on the stack and all sorts of really wonderful things. So your timing runs and things like that. But, yes, it's a traditional language in the sense that, yes, you can set a breakpoint on a method call, stop it when it gets there, interact with it by feeding objects or inspecting things, yeah. So it's a standard full debugger. Graphics or audio libraries. Not yet, but you can call anything that JavaScript has directly. I mean, especially now that the new JavaScript interop is in there, again, it just looks like calling the methods directly and calling both directions. So it should have a problem. You could, for example, it's a little weird. You could pull in J query and run it directly. But the problem with that is then you'll be duking it out with their DOM management. And that's probably not a good idea. And back there. Ajax, yeah, Ajax is just fine. So he asked if interop also works with Ajax. Yes, it does. Or you can do that same sort of Ajax directly native in Dart. So, and then it just gets a future and you just run on the future and stuff like that. Want to show me time? So four minutes, four minutes. Ask a couple questions here. Yeah, I understand there's an investment any of us make when we go to a new system. Google is committed to Dart. Google has large projects that have hundreds of people on the team. And they've already deployed three things client side for customer facing. So that, apparently, there's more, but they can't talk to us about it because it's still in progress. But Google is very committed to Dart. And the reason that's not really, it doesn't really overlap Go. Go has its own needs. Dart's never going to replace Go. So Go is still there. Dart's got a different set of audiences because they want stuff that is going to be multi-threaded, nice debugging, all that sort of thing, similar to Go in that sense. But they're not looking to turn it into something like the single binary deploy that Go has, for example. So Dart's Dartshare this day. Those presentations in Slide Share, it's not this exact one. I'll get this one up pretty soon. So just look for Randall Schwartz, a brief introduction to Dart. It'll be there somewhere. Yeah. And also I've done videos of this. So if you go to the most recent slide show I have, there are links to a video that I did at Fizzley. But that's a little bit out of date now. And you can't see any of these little printouts because I used the wrong colors. I used the default colors and they put it on a big screen and all the characters disappeared. So that's why it's all white, blue, dark blue now because I can actually see that. A couple more still, yes. Backward compatibility is very important to them, but there might be some minor breakages and things they discovered over the last couple of years that don't make any sense anymore. So I mean adding the async await stuff, it has changed the way most people write futures. So there might be some change to a couple of the awkward places that futures for being used. But you know, Dart 1 will be around for a long time anyway. It could just stay with Dart 1 but it won't get new features. Nobody knows. He asked when it's expected, nobody knows. It's one of these things, it'll be ready when it's ready, hopefully not like Pearl 6. Yeah, Dart 2 is going to be 12 years away, right? No, no. Just a quick survey, how many people have not seen anything about Dart before they came here? Wow. How many people now, including the set of people who raised their hands a second, are inspired to go back and look at it some more? I did my job. All right, thank you very much. Thank you. Yeah, I've got to be somewhere. Yeah, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, no, You can do it sometime. I don't know, they're double-folded. So it's like this. The quote is some range numbers. Doubles are twice the range. It's like, I don't know. Two of them. One of them. Two of them. One twenty-eighth or something. And then, I don't know. I'm used to doing double-scripts all the time. I didn't want to put it up. When you set an element, and it has to be one of the variables, is that like two double-scripts? Yes. That's apparent, but it's actually over as far. I just want to say, like, one slash with me, that's going to take inspiration. Thank you. Thank you. Thank you. Thank you.