Register your product to gain access to bonus material or receive a coupon.
This eBook includes the following formats, accessible from your Account page after purchase:
EPUB The open industry format known for its reflowable content and usability on supported mobile devices.
PDF The popular standard, used most often with the free Acrobat® Reader® software.
This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.
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
Register your product at informit.com/register for convenient access to downloads, updates, and corrections as they become available.
Introduction to the Dart Programming Language
Download the sample pages (includes Chapter 1 and Index)
Foreword xi
Preface xv
Acknowledgments xvii
About the Author xix
Chapter 1: Introduction 1
1.1 Motivation 1
1.2 Design Principles 2
1.3 Constraints 4
1.4 Overview 4
1.5 Book Structure 10
1.6 Related Work and Influences 10
Chapter 2: Objects, Interfaces, Classes and Mixins 13
2.1 Accessors 14
2.2 Instance Variables 17
2.3 Class Variables 17
2.4 Finals 18
2.5 Identity and Equality 19
2.6 Class and Superclass 21
2.7 Abstract Methods and Classes 22
2.8 Interfaces 23
2.9 Life of an Object 24
2.10 noSuchMethod() 30
2.11 Constant Objects and Fields 31
2.12 Class Methods 32
2.13 Instances, Their Classes and Metaclasses 33
2.14 Object and Its Methods 34
2.15 Mixins 36
2.16 Related Work 45
2.17 Summary 46
Chapter 3: Libraries 47
3.1 The Top Level 47
3.2 Scripts 48
3.3 Privacy 48
3.4 Imports 49
3.5 Breaking Libraries into Parts 53
3.6 Exports 55
3.7 Diamond Imports 56
3.8 Deferred Loading 57
3.9 Related Work 58
3.10 Summary 59
Chapter 4: Functions 61
4.1 Parameters 61
4.2 Function Bodies 63
4.3 Function Declarations 64
4.4 Closures 65
4.5 Invoking Methods and Functions 66
4.6 The Function Class 68
4.7 Functions as Objects 69
4.8 Generator Functions 71
4.9 Related Work 74
4.10 Summary 74
Chapter 5: Types 75
5.1 Optional Typing 75
5.2 A Tour of Types 77
5.3 Interface Types 79
5.4 Types in Action: The Expression Problem, Typed 82
5.5 Generics 85
5.6 Function Types 91
5.7 Type Rei_cation 95
5.8 Malformed Types 102
5.9 Unsoundness 104
5.10 Related Work 106
5.11 Summary 107
Chapter 6: Expressions and Statements 109
6.1 Expressions 109
6.2 Statements 125
6.3 Summary 137
Chapter 7: Reflection 139
7.1 Introspection 139
7.2 Why Mirrors 165
7.3 Metadata 165
7.4 Reflection via Cod