@@ -141,6 +141,22 @@ $(P If the file name of a module is an invalid module name (e.g.
141
141
module foo_bar;
142
142
---------
143
143
144
+ $(IMPLEMENTATION_DEFINED
145
+ $(OL
146
+ $(LI The mapping of package and module identifiers to directory and file names.)
147
+ ))
148
+
149
+ $(BEST_PRACTICE
150
+ $(OL
151
+ $(LI $(GLINK PackageName)s and $(GLINK ModuleName)s should be composed of the ASCII
152
+ characters lower case letters, digits or `_` to ensure maximum portability and compatibility with
153
+ various file systems.)
154
+ $(LI The file names for packages and modules should be composed only of
155
+ the ASCII lower case letters, digits, and `_`s, and should not be a $(GLINK_LEX Keyword).)
156
+ ))
157
+
158
+ $(H3 $(LNAME2 deprecated_modules, Deprecated modules))
159
+
144
160
$(P A $(I ModuleDeclaration) can have an optional $(GLINK2 attribute,
145
161
DeprecatedAttribute). The compiler will produce a message when the deprecated
146
162
module is imported.)
@@ -155,7 +171,7 @@ import foo; // Deprecated: module foo is deprecated
155
171
---------
156
172
157
173
$(P A $(I DeprecatedAttribute) can have an optional $(ASSIGNEXPRESSION) argument to provide a
158
- more informative message. An $(I AssignExpression) must evaluate to a string at compile time.
174
+ more informative message. The $(I AssignExpression) must evaluate to a string at compile time.
159
175
)
160
176
161
177
---------
@@ -170,18 +186,9 @@ import foo; // Deprecated: module foo is deprecated - Please use foo2 instead.
170
186
171
187
$(IMPLEMENTATION_DEFINED
172
188
$(OL
173
- $(LI The mapping of package and module identifiers to directory and file names.)
174
189
$(LI How the deprecation messages are presented to the user.)
175
190
))
176
191
177
- $(BEST_PRACTICE
178
- $(OL
179
- $(LI $(GLINK PackageName)s and $(GLINK ModuleName)s should be composed of the ASCII
180
- characters lower case letters, digits or `_` to ensure maximum portability and compatibility with
181
- various file systems.)
182
- $(LI The file names for packages and modules should be composed only of
183
- the ASCII lower case letters, digits, and `_`s, and should not be a $(GLINK_LEX Keyword).)
184
- ))
185
192
186
193
$(H2 $(LEGACY_LNAME2 ImportDeclaration, import-declaration, Import Declaration))
187
194
@@ -226,7 +233,7 @@ $(P $(I ModuleFullyQualifiedName)s in the $(I ImportDeclaration) must be fully
226
233
qualified with whatever packages they are in. They are not considered to be
227
234
relative to the module that imports them.)
228
235
229
- $(H2 $(LNAME2 name_lookup, Symbol Name Lookup))
236
+ $(H3 $(LNAME2 name_lookup, Symbol Name Lookup))
230
237
231
238
$(P The simplest form of importing is to just list the modules being imported:)
232
239
@@ -317,7 +324,7 @@ void test()
317
324
}
318
325
---
319
326
320
- $(H2 $(LNAME2 public_imports, Public Imports))
327
+ $(H3 $(LNAME2 public_imports, Public Imports))
321
328
322
329
$(P By default, imports are $(I private). This means that if module A imports
323
330
module B, and module B imports module C, then names inside C are visible only inside
@@ -363,7 +370,7 @@ X.bar(); // ditto
363
370
Y.bar(); // ok, Y.bar() is an alias to X.bar()
364
371
---
365
372
366
- $(H2 $(LNAME2 static_imports, Static Imports))
373
+ $(H3 $(LNAME2 static_imports, Static Imports))
367
374
368
375
$(P A static import requires the use of a fully qualified name
369
376
to reference the module's names:)
@@ -378,7 +385,7 @@ void main()
378
385
}
379
386
---
380
387
381
- $(H2 $(LNAME2 renamed_imports, Renamed Imports))
388
+ $(H3 $(LNAME2 renamed_imports, Renamed Imports))
382
389
383
390
$(P A local name for an import can be given, through which all references to the
384
391
module's symbols must be qualified with:)
@@ -398,7 +405,7 @@ void main()
398
405
399
406
$(BEST_PRACTICE Renamed imports are handy when dealing with very long import names.)
400
407
401
- $(H2 $(LNAME2 selective_imports, Selective Imports))
408
+ $(H3 $(LNAME2 selective_imports, Selective Imports))
402
409
403
410
$(P Specific symbols can be exclusively imported from a module and bound into
404
411
the current namespace:)
@@ -420,7 +427,7 @@ void main()
420
427
421
428
$(P $(D static) cannot be used with selective imports.)
422
429
423
- $(H2 $(LNAME2 renamed_selective_imports, Renamed and Selective Imports))
430
+ $(H3 $(LNAME2 renamed_selective_imports, Renamed and Selective Imports))
424
431
425
432
$(P When renaming and selective importing are combined:)
426
433
@@ -444,7 +451,7 @@ void main()
444
451
--------------
445
452
)
446
453
447
- $(H2 $(LNAME2 scoped_imports, Scoped Imports))
454
+ $(H3 $(LNAME2 scoped_imports, Scoped Imports))
448
455
449
456
$(P Import declarations may be used at any scope. For example:)
450
457
@@ -557,7 +564,7 @@ $(H2 $(LNAME2 staticorder, Static Construction and Destruction))
557
564
thread local data.)
558
565
))
559
566
560
- $(H2 $(LNAME2 order_of_static_ctor, Order of Static Construction))
567
+ $(H3 $(LNAME2 order_of_static_ctor, Order of Static Construction))
561
568
562
569
$(P Shared static constructors on all modules are run before any non-shared static
563
570
constructors.)
@@ -603,12 +610,12 @@ destructors. Violation of this rule will result in a runtime exception.)
603
610
)
604
611
)
605
612
606
- $(H2 $(LNAME2 order_of_static_ctors, Order of Static Construction within a Module))
613
+ $(H3 $(LNAME2 order_of_static_ctors, Order of Static Construction within a Module))
607
614
608
615
$(P Within a module, static construction occurs in the lexical order in
609
616
which they appear.)
610
617
611
- $(H2 $(LNAME2 order_static_dtor, Order of Static Destruction))
618
+ $(H3 $(LNAME2 order_static_dtor, Order of Static Destruction))
612
619
613
620
$(P This is defined to be in exactly the reverse order of static construction.
614
621
Static destructors for individual modules will only be run if the
0 commit comments