[PDF] [PDF] Dart Programming Language Specification 5th edition draft

29 juil 2019 · This Ecma standard specifies the syntax and semantics of the Dart program- ming language It does not specify the APIs of the Dart libraries 



Previous PDF Next PDF





[PDF] Dart Programming Language Specification 5th edition draft

29 juil 2019 · This Ecma standard specifies the syntax and semantics of the Dart program- ming language It does not specify the APIs of the Dart libraries 



[PDF] Dart Programming Language Specification 5th edition draft

top-level, static, instance or local) mandated in this specification A conforming implementation is permitted to provide additional APIs, but not additional syntax,  



[PDF] dart - RIP Tutorial

Syntax 16 Remarks 16 Examples 16 End of Line Comment 16 Multi-Line Dart is an open-source, class-based, optionally-typed programming language for  



Dart for Absolute Beginners

Chapter 4: Five Small Programs to Showcase Fundamentals in Dart □ 25 Chapter 8: Using Dart to Interact with HTML □ List Syntax



[PDF] Preview Dart Programming Tutorial - Tutorialspoint

Dart is an open-source general-purpose programming language This tutorial provides a basic level understanding of the Dart programming Type Syntax



[PDF] The Dart Programming Language - InformIT

The design of Dart has been influenced by earlier languages, in particular Smalltalk[1], Java and Javascript Dart's syntax follows in the C tradition, via Java and 



[PDF] DART CHEAT SHEET PDF

DART CHEAT SHEET PDF A Dart Language PDF for C# and Java Developers bool, int, double String, List, Map, Set final list = [1, 2, 3]; final map = {'a': 1, 'b': 2};



[PDF] Type Safety Analysis for Dart - Department of Computer Science

Figure 1: Syntax of the simplified Dart language sible types of all expressions; second, the check phase emits warnings about potential message-not- understood 



[PDF] Dart cheat sheet and quick reference - RayWenderlichcom

Dart 2 Cheat Sheet and Quick Reference main function Visit for more Flutter/ Dart resources and tutorials Version 1 0 2 Arrow syntax for one line functions



JAVA and DART programming languages: Conceptual comparison

Applications usually run in Dart either by the browser directly, which supports Dart code, or by compiling code to JavaScript Dart has a familiar syntax, and it's  

[PDF] dart tutorial book pdf

[PDF] dart tutorial for flutter

[PDF] dart: up and running pdf

[PDF] data card policy for employees

[PDF] data packet diagram

[PDF] data packet example

[PDF] data packet header structure

[PDF] data packet structure definition

[PDF] data packet types

[PDF] data science crash course pdf

[PDF] data science lecture notes ppt

[PDF] data science primer pdf

[PDF] datasheet fortimail 400f

[PDF] datasheet fortimail cloud

[PDF] datasheet fortimanager 1000d

Dart Programming Language Specification

5th edition draft

Version 2.2

July 29, 2019

Contents

1 Scope 6

2 Conformance 6

3 Normative References 6

4 Terms and Definitions 6

5 Notation 6

6 Overview 9

6.1 Scoping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

6.2 Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

6.3 Concurrency . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

7 Errors and Warnings 13

8 Variables 14

8.1 Evaluation of Implicit Variable Getters . . . . . . . . . . . . . . .

17

9 Functions 17

9.1 Function Declarations . . . . . . . . . . . . . . . . . . . . . . . .

19

9.2 Formal Parameters . . . . . . . . . . . . . . . . . . . . . . . . . .

20

9.2.1 Required Formals . . . . . . . . . . . . . . . . . . . . . . .

21

9.2.2 Optional Formals . . . . . . . . . . . . . . . . . . . . . . .

22

9.2.3 Covariant Parameters . . . . . . . . . . . . . . . . . . . .

23

9.3 Type of a Function . . . . . . . . . . . . . . . . . . . . . . . . . .

24

9.4 External Functions . . . . . . . . . . . . . . . . . . . . . . . . . .

25
1

10 Classes 26

10.1 Instance Methods . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

10.1.1 Operators . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

10.1.2 The MethodnoSuchMethod. . . . . . . . . . . . . . . . .30

10.1.3 The Operator '==" . . . . . . . . . . . . . . . . . . . . . .

34

10.2 Getters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

10.3 Setters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

10.4 Abstract Instance Members . . . . . . . . . . . . . . . . . . . . .

35

10.5 Instance Variables . . . . . . . . . . . . . . . . . . . . . . . . . .

36

10.6 Constructors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

10.6.1 Generative Constructors . . . . . . . . . . . . . . . . . . .

37

10.6.2 Factories . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

10.6.3 Constant Constructors . . . . . . . . . . . . . . . . . . . .

45

10.7 Static Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

10.8 Superclasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

10.8.1 Inheritance and Overriding . . . . . . . . . . . . . . . . .

48

10.9 Superinterfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

10.10Class Member Conflicts . . . . . . . . . . . . . . . . . . . . . . .

51

11 Interfaces 51

11.1 Combined Member Signatures . . . . . . . . . . . . . . . . . . . .

53

11.2 Superinterfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

11.2.1 Inheritance and Overriding . . . . . . . . . . . . . . . . .

55

11.2.2 Correct Member Overrides . . . . . . . . . . . . . . . . .

56

12 Mixins 57

12.1 Mixin Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

12.2 Mixin Declaration . . . . . . . . . . . . . . . . . . . . . . . . . .

58

12.3 Mixin Application . . . . . . . . . . . . . . . . . . . . . . . . . .

59

13 Enums 60

14 Generics 61

14.1 Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

14.2 Super-Bounded Types . . . . . . . . . . . . . . . . . . . . . . . .

66

14.3 Instantiation to Bound . . . . . . . . . . . . . . . . . . . . . . . .

68

14.3.1 Auxiliary Concepts for Instantiation to Bound . . . . . .

69

14.3.2 The Instantiation to Bound Algorithm . . . . . . . . . . .

71

15 Metadata 73

16 Expressions 74

16.1 Expression Evaluation . . . . . . . . . . . . . . . . . . . . . . . .

74

16.2 Object Identity . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

16.3 Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

16.3.1 Constant Contexts . . . . . . . . . . . . . . . . . . . . . .

81

16.4 Null . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82
2

16.5 Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .82

16.6 Booleans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

16.7 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

16.7.1 String Interpolation . . . . . . . . . . . . . . . . . . . . .

87

16.8 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

16.9 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

16.10Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

16.11Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

16.12Throw . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

16.13Function Expressions . . . . . . . . . . . . . . . . . . . . . . . . .

94

16.14This . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

16.15Instance Creation . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

16.15.1New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

16.15.2Const . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

16.16Spawning an Isolate . . . . . . . . . . . . . . . . . . . . . . . . .

101

16.17Function Invocation . . . . . . . . . . . . . . . . . . . . . . . . .

101

16.17.1Actual Argument Lists . . . . . . . . . . . . . . . . . . . .

103

16.17.2Actual Argument List Evaluation . . . . . . . . . . . . . .

104

16.17.3Binding Actuals to Formals . . . . . . . . . . . . . . . . .

105

16.17.4Unqualified Invocation . . . . . . . . . . . . . . . . . . . .

107

16.17.5Function Expression Invocation . . . . . . . . . . . . . . .

108

16.18Function Closurization . . . . . . . . . . . . . . . . . . . . . . . .

110

16.18.1Generic Function Instantiation . . . . . . . . . . . . . . .

110

16.19Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

112

16.20Top level Getter Invocation . . . . . . . . . . . . . . . . . . . . .

113

16.21Method Invocation . . . . . . . . . . . . . . . . . . . . . . . . . .

114

16.21.1Ordinary Invocation . . . . . . . . . . . . . . . . . . . . .

114

16.21.2Cascaded Invocations . . . . . . . . . . . . . . . . . . . .

116

16.21.3Super Invocation . . . . . . . . . . . . . . . . . . . . . . .

116

16.21.4Sending Messages . . . . . . . . . . . . . . . . . . . . . . .

117

16.22Property Extraction . . . . . . . . . . . . . . . . . . . . . . . . .

117

16.22.1Getter Access and Method Extraction . . . . . . . . . . .

118

16.22.2Super Getter Access and Method Closurization . . . . . .

119

16.22.3Ordinary Member Closurization . . . . . . . . . . . . . .

120

16.22.4Super Closurization . . . . . . . . . . . . . . . . . . . . .

122

16.22.5Generic Method Instantiation . . . . . . . . . . . . . . . .

123

16.23Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

16.23.1Compound Assignment . . . . . . . . . . . . . . . . . . .

128

16.24Conditional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

130

16.25If-null Expressions . . . . . . . . . . . . . . . . . . . . . . . . . .

131

16.26Logical Boolean Expressions . . . . . . . . . . . . . . . . . . . . .

131

16.27Equality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

132

16.28Relational Expressions . . . . . . . . . . . . . . . . . . . . . . . .

133

16.29Bitwise Expressions . . . . . . . . . . . . . . . . . . . . . . . . . .

134

16.30Shift . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

16.31Additive Expressions . . . . . . . . . . . . . . . . . . . . . . . . .

135
3

16.32Multiplicative Expressions . . . . . . . . . . . . . . . . . . . . . .135

16.33Unary Expressions . . . . . . . . . . . . . . . . . . . . . . . . . .

136

16.34Await Expressions . . . . . . . . . . . . . . . . . . . . . . . . . .

137

16.35Postfix Expressions . . . . . . . . . . . . . . . . . . . . . . . . . .

137

16.36Assignable Expressions . . . . . . . . . . . . . . . . . . . . . . . .

139

16.37Identifier Reference . . . . . . . . . . . . . . . . . . . . . . . . . .

140

16.38Type Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

143

16.39Type Cast . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

144

17 Statements 145

17.0.1 Statement Completion . . . . . . . . . . . . . . . . . . . .

145

17.1 Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

146

17.2 Expression Statements . . . . . . . . . . . . . . . . . . . . . . . .

146

17.3 Local Variable Declaration . . . . . . . . . . . . . . . . . . . . . .

146

17.4 Local Function Declaration . . . . . . . . . . . . . . . . . . . . .

148

17.5 If . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

149

17.6 For . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

150

17.6.1 For Loop . . . . . . . . . . . . . . . . . . . . . . . . . . .

150

17.6.2 For-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

151

17.6.3 Asynchronous For-in . . . . . . . . . . . . . . . . . . . . .

151

17.7 While . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153

17.8 Do . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153

17.9 Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153

17.9.1 Switch case statements . . . . . . . . . . . . . . . . . . . .

156

17.10Rethrow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

157

17.11Try . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

158

17.11.1on-catchclauses . . . . . . . . . . . . . . . . . . . . . . .1 59

17.12Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

159

17.13Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

161

17.14Break . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

162

17.15Continue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

162

17.16Yield and Yield-Each . . . . . . . . . . . . . . . . . . . . . . . . .

162

17.16.1Yield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

162

17.16.2Yield-Each . . . . . . . . . . . . . . . . . . . . . . . . . .

163

17.17Assert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

165

18 Libraries and Scripts 165

18.1 Imports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

167

18.2 Exports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

171

18.3 Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

172

18.4 Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

173

18.5 URIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

174
4

19 Types 175

19.1 Static Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

175

19.1.1 Type Promotion . . . . . . . . . . . . . . . . . . . . . . .

178

19.2 Dynamic Type System . . . . . . . . . . . . . . . . . . . . . . . .

178

19.3 Type Aliases . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

179

19.4 Subtypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

180

19.4.1 Meta-Variables . . . . . . . . . . . . . . . . . . . . . . . .

181

19.4.2 Subtype Rules . . . . . . . . . . . . . . . . . . . . . . . .

181

19.4.3 Being a subtype . . . . . . . . . . . . . . . . . . . . . . .

184

19.4.4 Informal Subtype Rule Descriptions . . . . . . . . . . . .

185

19.4.5 Additional Subtyping Concepts . . . . . . . . . . . . . . .

187

19.5 Function Types . . . . . . . . . . . . . . . . . . . . . . . . . . . .

187

19.6 TypeFunction. . . . . . . . . . . . . . . . . . . . . . . . . . . .188

19.7 Typedynamic. . . . . . . . . . . . . . . . . . . . . . . . . . . .188

19.8 Type FutureOr . . . . . . . . . . . . . . . . . . . . . . . . . . . .

190

19.9 Type Void . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

191

19.9.1 Void Soundness . . . . . . . . . . . . . . . . . . . . . . . .

193

19.10Parameterized Types . . . . . . . . . . . . . . . . . . . . . . . . .

195

19.10.1Actual Type of Declaration . . . . . . . . . . . . . . . . .

196

19.10.2Least Upper Bounds . . . . . . . . . . . . . . . . . . . . .

196

20 Reference 197

20.1 Lexical Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

197

20.1.1 Reserved Words . . . . . . . . . . . . . . . . . . . . . . .

197

20.1.2 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . .

198

20.2 Operator Precedence . . . . . . . . . . . . . . . . . . . . . . . . .

198
5

Dart Programming Language Specification6

1 Scope

ecmaScope This Ecma standard specifies the syntax and semantics of the Dart program- ming language. It does not specify the APIs of the Dart libraries except where those library elements are essential to the correct functioning of the language itself (e.g., the existence of classObjectwith methods such asnoSuchMethod, runtimeType).

2 Conformance

quotesdbs_dbs12.pdfusesText_18