The Dart Programming Language
معرفی کتاب «The Dart Programming Language» نوشتهٔ Sienna Blake و Gilad Bracha; Erik Meijer، منتشرشده توسط نشر Addison-Wesley Professional در سال 2015. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
Dart is a class-based, object-oriented language that simplifies the development of structured modern apps, scales from small scripts to large applications, and can be compiled to JavaScript for use in any modern browser. In this rigorous but readable introductory text, Dart specification lead Gilad Bracha fully explains both the language and the ideas that have shaped it. The Dart Programming Language offers an authoritative description of Dart for programmers, computer science students, and other well-qualified professionals. The text illuminates key programming constructs with significant examples, focusing on principles of the language, such as optional typing and pure object-orientation. Bracha thoroughly explains reflection in Dart, showing how it is evolving into a form that programmers can easily apply without creating excessively large programs. He also shares valuable insights into Dart’s actor-style model for concurrency and asynchronous programming. Throughout, he covers both language semantics and the rationale for key features, helping you understand not just what Dart does, but why it works the way it does. You will learn about Dart’s object model, in which everything is an object, even numbers and Boolean values How Dart programs are organized into modular libraries How Dart functions are structured, stored in variables, passed as parameters, and returned as results Dart’s innovative approach to optional typing How Dart handles expressions and statements How to use Dart’s implementation of reflection to introspect on libraries, classes, functions, and objects Isolates and other Dart features that support concurrency and distribution Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available. About This E-Book 2 Title Page 3 Copyright Page 4 Dedication Page 5 Contents 6 Foreword 11 Preface 14 Acknowledgments 16 About the Author 18 Chapter 1. Introduction 19 1.1 Motivation 19 1.2 Design Principles 20 1.2.1 Everything Is an Object 20 1.2.2 Program to an Interface, not an Implementation 20 1.2.3 Types in the Service of the Programmer 21 1.3 Constraints 22 1.4 Overview 22 1.5 Book Structure 27 1.6 Related Work and Influences 28 Chapter 2. Objects, Interfaces, Classes and Mixins 29 2.1 Accessors 29 2.2 Instance Variables 32 2.3 Class Variables 32 2.4 Finals 34 2.5 Identity and Equality 34 2.6 Class and Superclass 36 2.7 Abstract Methods and Classes 37 2.8 Interfaces 38 2.9 Life of an Object 39 2.9.1 Redirecting Constructors 43 2.9.2 Factories 44 2.10 noSuchMethod() 45 2.11 Constant Objects and Fields 46 2.12 Class Methods 46 2.13 Instances, Their Classes and Metaclasses 48 2.14 Object and Its Methods 49 2.15 Mixins 50 2.15.1 Example: The Expression Problem 54 2.16 Related Work 60 2.17 Summary 60 Chapter 3. Libraries 62 3.1 The Top Level 62 3.2 Scripts 63 3.3 Privacy 63 3.4 Imports 64 3.5 Breaking Libraries into Parts 68 3.6 Exports 69 3.7 Diamond Imports 70 3.8 Deferred Loading 71 3.9 Related Work 73 3.10 Summary 73 Chapter 4. Functions 74 4.1 Parameters 74 4.1.1 Positional Parameters 74 4.1.2 Named Parameters 75 4.2 Function Bodies 76 4.3 Function Declarations 76 4.4 Closures 77 4.5 Invoking Methods and Functions 78 4.5.1 Cascades 78 4.5.2 Assignment 79 4.5.3 Using Operators 80 4.6 The Function Class 80 4.6.1 Emulating Functions 81 4.7 Functions as Objects 81 4.8 Generator Functions 84 4.8.1 Iterators and Iterables 84 4.8.2 Synchronous Generators 85 4.9 Related Work 86 4.10 Summary 86 Chapter 5. Types 87 5.1 Optional Typing 87 5.2 A Tour of Types 88 5.3 Interface Types 91 5.4 Types in Action: The Expression Problem, Typed 93 5.5 Generics 96 5.5.1 The Expression Problem with Generics 98 5.6 Function Types 101 5.6.1 Optional Positional Parameters 103 5.6.2 Named Parameters 104 5.6.3 Call() Revisited 105 5.7 Type Reification 105 5.7.1 Type Tests 105 5.7.2 Type Casts 106 5.7.3 Checked Mode 107 5.7.4 Reified Generics 108 5.7.5 Reification and Optional Typing 108 5.7.6 Types and Proxies 109 5.8 Malformed Types 112 5.9 Unsoundness 113 5.10 Related Work 116 5.11 Summary 116 Chapter 6. Expressions and Statements 118 6.1 Expressions 118 6.1.1 Literals 118 6.1.2 Identifiers 124 6.1.3 this 128 6.1.4 Constants 128 6.1.5 Creating Objects 129 6.1.6 Assignment 129 6.1.7 Extracting Properties 130 6.1.8 Method Access 131 6.1.9 Using Operators 132 6.1.10 Throw 132 6.1.11 Conditionals 133 6.2 Statements 133 6.2.1 Blocks 133 6.2.2 If 134 6.2.3 Loops 134 6.2.4 Try-Catch 136 6.2.5 Rethrow 137 6.2.6 Switch 137 6.2.7 Assert 139 6.2.8 Return 141 6.2.9 Yield and Yield-Each 142 6.2.10 Labels 144 6.2.11 Break and Continue 144 6.3 Summary 145 Chapter 7. Reflection 146 7.1 Introspection 146 7.1.1 Implications for Speed and Size 148 7.1.2 Example: Proxies 150 7.1.3 Example: Serialization 151 7.1.4 Example: Parser Combinators 161 7.2 Why Mirrors 169 7.3 Metadata 170 7.4 Reflection via Code Generation 170 7.5 Beyond Introspection 173 7.6 Related Work 174 7.7 Summary 174 Chapter 8. Asynchrony and Isolates 175 8.1 Asynchrony 175 8.2 Futures 176 8.2.1 Consuming Futures 176 8.2.2 Producing Futures 177 8.2.3 Scheduling 178 8.3 Streams 178 8.4 Isolates 179 8.4.1 Ports 179 8.4.2 Spawning 180 8.4.3 Security 181 8.5 Example: Client-Server Communication 181 8.5.1 Promise: A Brighter Future 181 8.5.2 Isolates as Distributed Objects 183 8.6 Asynchronous Functions 187 8.6.1 Await 187 8.6.2 Asynchronous Generators 188 8.6.3 Await-For loops 189 8.7 Related Work 189 8.8 Summary 189 Chapter 9. Conclusion 190 9.1 Optional Typing 190 9.2 Object Orientation 191 9.3 Reflection 191 9.4 Tooling 192 9.5 Summary 192 Bibliography 193 Index 195 Code Snippets 214 Dart is a class-based, object-oriented language that simplifies the development of structured modern apps, scales from small scripts to large applications, and can be compiled to JavaScript for use in any modern browser. In this rigorous but readable introductory text, Dart specification lead Gilad Bracha fully explains both the language and the ideas that have shaped it. **__**The Dart Programming Language**__** offers an authoritative description of Dart for programmers, computer science students, and other well-qualified professionals. The text illuminates key programming constructs with significant examples, focusing on principles of the language, such as optional typing and pure object-orientation. Bracha thoroughly explains reflection in Dart, showing how it is evolving into a form that programmers can easily apply without creating excessively large programs. He also shares valuable insights into Dart’s actor-style model for concurrency and asynchronous programming. Throughout, he covers both language semantics and the rationale for key features, helping you understand not just what Dart does, but why it works the way it does. You will learn about * Dart’s object model, in which everything is an object, even numbers and Boolean values * How Dart programs are organized into modular libraries * How Dart functions are structured, stored in variables, passed as parameters, and returned as results * Dart’s innovative approach to optional typing * How Dart handles expressions and statements * How to use Dart’s implementation of reflection to introspect on libraries, classes, functions, and objects * Isolates and other Dart features that support concurrency and distribution __Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.__ Dart is a class-based, object-oriented language that simplifies the development of structured modern apps, scales from small scripts to large applications, and can be compiled to JavaScript for use in any modern browser. In this rigorous but readable introductory text, Dart specification lead Gilad Bracha fully explains both the language and the ideas that have shaped it. The Dart Programming Language offers an authoritative description of Dart for programmers, computer science students, and other well-qualified professionals. The text illuminates key programming constructs with significant examples, focusing on principles of the language, such as optional typing and pure object-orientation. Bracha thoroughly explains reflection in Dart, showing how it is evolving into a form that programmers can easily apply without creating excessively large programs. He also shares valuable insights into Darts actor-style model for concurrency and asynchronous programming. Throughout, he covers both language semantics and the rationale for key features, helping you understand not just what Dart does, but why it works the way it does. You will learn about Register your product at (http://informit.com/register) informit.com/register for convenient access to downloads, updates, and corrections as they become available. The design and description of the Dart programming language, a language designed to run on both sides of browser-server web platforms.
دانلود کتاب The Dart Programming Language