OLD | NEW |
---|---|
1 \documentclass{article} | 1 \documentclass{article} |
2 \usepackage{epsfig} | 2 \usepackage{epsfig} |
3 \usepackage{dart} | 3 \usepackage{dart} |
4 \usepackage{bnf} | 4 \usepackage{bnf} |
5 \usepackage{hyperref} | 5 \usepackage{hyperref} |
6 \newcommand{\code}[1]{{\sf #1}} | 6 \newcommand{\code}[1]{{\sf #1}} |
7 \title{Dart Programming Language Specification \\ | 7 \title{Dart Programming Language Specification \\ |
8 {\large Version 1.3}} | 8 {\large Version 1.3}} |
9 %\author{The Dart Team} | 9 %\author{The Dart Team} |
10 \begin{document} | 10 \begin{document} |
(...skipping 5013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5024 | 5024 |
5025 Then, for each entry mapping key $k$ to declaration $d$ in $NS$, $d$ is made av ailable in the top level scope of $L$ under the name $k$ unless either: | 5025 Then, for each entry mapping key $k$ to declaration $d$ in $NS$, $d$ is made av ailable in the top level scope of $L$ under the name $k$ unless either: |
5026 \begin{itemize} | 5026 \begin{itemize} |
5027 \item | 5027 \item |
5028 a top-level declaration with the name $k$ exists in $L$, OR | 5028 a top-level declaration with the name $k$ exists in $L$, OR |
5029 \item a prefix clause of the form \AS{} $k$ is used in $L$. | 5029 \item a prefix clause of the form \AS{} $k$ is used in $L$. |
5030 \end{itemize} | 5030 \end{itemize} |
5031 | 5031 |
5032 \rationale{The greatly increases the chance that a member can be added to a libr ary without breaking its importers.} | 5032 \rationale{The greatly increases the chance that a member can be added to a libr ary without breaking its importers.} |
5033 | 5033 |
5034 If a name $N$ is referenced by a library $L$ and $N$ would be introduced into th e top level scope of $L$ by an import from a library whose URI begins with \code {dart:} and an import from a library whose URI does not begin with \code{dart:}: | 5034 A {\em system library} is a library whose URI begins with \code{dart:}. Any othe r library is {\em non-system library}. If a name $N$ is referenced by a library $L$ and $N$ would be introduced into the top level scope of $L$ by an import of a system library and an import of a non-system library: |
kasperl
2014/03/24 07:48:14
I don't think this is enough. We need to talk abou
| |
5035 \begin{itemize} | 5035 \begin{itemize} |
5036 \item The import from \code{dart:} is implicitly extended by a \code{\HIDE{} $N$ } clause. | 5036 \item The import of the system library is implicitly extended by a \code{\HIDE{} $N$} clause. |
5037 \item A static warning is issued. | 5037 \item A static warning is issued. |
5038 \end{itemize} | 5038 \end{itemize} |
5039 | 5039 |
5040 \rationale { | 5040 \rationale { |
5041 Whereas normal conflicts are resolved at deployment time, the functionality of \ code{dart:} libraries is injected into an application at run time, and may vary over time as browsers are upgraded. Thus, conflicts with \code{dart:} libraries can arise at runtime, outside the developerÕs control. To avoid breaking deploy ed applications in this way, conflicts with the \code{dart:} libraries are treat ed specially. | 5041 Whereas normal conflicts are resolved at deployment time, the functionality of \ code{dart:} libraries is injected into an application at run time, and may vary over time as browsers are upgraded. Thus, conflicts with \code{dart:} libraries can arise at runtime, outside the developerÕs control. To avoid breaking deploy ed applications in this way, conflicts with the \code{dart:} libraries are treat ed specially. |
5042 | 5042 |
5043 It is recommended that tools that deploy Dart code produce output in which all i mports use show clauses to ensure that additions to the namespace of a library n ever impact deployed code. | 5043 It is recommended that tools that deploy Dart code produce output in which all i mports use show clauses to ensure that additions to the namespace of a library n ever impact deployed code. |
5044 } | 5044 } |
5045 | 5045 |
5046 If a name $N$ is referenced by a library $L$ and $N$ is introduced into the to p level scope of $L$ by more than one import, and not all the imports denote the same declaration, then: | 5046 If a name $N$ is referenced by a library $L$ and $N$ is introduced into the to p level scope of $L$ by more than one import, and not all the imports denote the same declaration, then: |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5126 | 5126 |
5127 $NS_i = \SHOW{}([id_1, \ldots, id_k], NS_{i-1}$). | 5127 $NS_i = \SHOW{}([id_1, \ldots, id_k], NS_{i-1}$). |
5128 \item If $C_i$ is of the form \code{\HIDE{} $id_1, \ldots, id_k$} | 5128 \item If $C_i$ is of the form \code{\HIDE{} $id_1, \ldots, id_k$} |
5129 | 5129 |
5130 then let $NS_i = \HIDE{}([id_1, \ldots, id_k], NS_{i-1}$). | 5130 then let $NS_i = \HIDE{}([id_1, \ldots, id_k], NS_{i-1}$). |
5131 \end{itemize} | 5131 \end{itemize} |
5132 | 5132 |
5133 For each | 5133 For each |
5134 entry mapping key $k$ to declaration $d$ in $NS_n$ an entry mapping $k$ to $d$ i s added to the exported namespace of $L$ unless a top-level declaration with th e name $k$ exists in $L$. | 5134 entry mapping key $k$ to declaration $d$ in $NS_n$ an entry mapping $k$ to $d$ i s added to the exported namespace of $L$ unless a top-level declaration with th e name $k$ exists in $L$. |
5135 | 5135 |
5136 If a name $N$ is referenced by a library $L$ and $N$ would be introduced into th e exported namespace of $L$ by an export from a library whose URI begins with \c ode{dart:} and an export from a library whose URI does not begin with \code{dart :}: | 5136 If a name $N$ is referenced by a library $L$ and $N$ would be introduced into th e exported namespace of $L$ by an export of a system library and an export of a non-system library: |
5137 \begin{itemize} | 5137 \begin{itemize} |
5138 \item The export from \code{dart:} is implicitly extended by a \code{\HIDE{} $N$ } clause. | 5138 \item The export of the system library is implicitly extended by a \code{\HIDE{} $N$} clause. |
5139 \item A static warning is issued. | 5139 \item A static warning is issued. |
5140 \end{itemize} | 5140 \end{itemize} |
5141 | 5141 |
5142 \rationale{ | 5142 \rationale{ |
5143 See the discussion in section \ref{imports} for the reasoning behind this rule. | 5143 See the discussion in section \ref{imports} for the reasoning behind this rule. |
5144 } | 5144 } |
5145 | 5145 |
5146 We say that $L$ {\em re-exports library } $B$, and also that $L$ {\em re-exports namespace } $NS_n$. When no confusion can arise, we may simply state that $L$ { \em re-exports }$B$, or that $L$ {\em re-exports }$NS_n$. | 5146 We say that $L$ {\em re-exports library } $B$, and also that $L$ {\em re-exports namespace } $NS_n$. When no confusion can arise, we may simply state that $L$ { \em re-exports }$B$, or that $L$ {\em re-exports }$NS_n$. |
5147 | 5147 |
5148 It is a compile-time error if a name $N$ is re-exported by a library $L$ and $N$ is introduced into the export namespace of $L$ by more than one export, unless all exports refer to same declaration for the name $N$. It is a static warnin g to export two different libraries with the same name. | 5148 It is a compile-time error if a name $N$ is re-exported by a library $L$ and $N$ is introduced into the export namespace of $L$ by more than one export, unless all exports refer to same declaration for the name $N$. It is a static warnin g to export two different libraries with the same name. |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5883 \item The names of compile time constant variables never use lower case letters. If they consist of multiple words, those words are separated by underscores. Ex amples: PI, I\_AM\_A\_CONSTANT. | 5883 \item The names of compile time constant variables never use lower case letters. If they consist of multiple words, those words are separated by underscores. Ex amples: PI, I\_AM\_A\_CONSTANT. |
5884 \item The names of functions (including getters, setters, methods and local or l ibrary functions) and non-constant variables begin with a lowercase letter. If t he name consists of multiple words, each word (except the first) begins with an uppercase letter. No other uppercase letters are used. Examples: camlCase, dar t4TheWorld | 5884 \item The names of functions (including getters, setters, methods and local or l ibrary functions) and non-constant variables begin with a lowercase letter. If t he name consists of multiple words, each word (except the first) begins with an uppercase letter. No other uppercase letters are used. Examples: camlCase, dar t4TheWorld |
5885 \item The names of types (including classes and type aliases) begin with an uppe r case letter. If the name consists of multiple words, each word begins with an uppercase letter. No other uppercase letters are used. Examples: CamlCase, D art4TheWorld. | 5885 \item The names of types (including classes and type aliases) begin with an uppe r case letter. If the name consists of multiple words, each word begins with an uppercase letter. No other uppercase letters are used. Examples: CamlCase, D art4TheWorld. |
5886 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. | 5886 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. |
5887 \item The names of libraries or library prefixes never use upper case letters. I f they consist of multiple words, those words are separated by underscores. Exam ple: my\_favorite\_library. | 5887 \item The names of libraries or library prefixes never use upper case letters. I f they consist of multiple words, those words are separated by underscores. Exam ple: my\_favorite\_library. |
5888 \end{itemize} | 5888 \end{itemize} |
5889 } | 5889 } |
5890 | 5890 |
5891 | 5891 |
5892 \end{document} | 5892 \end{document} |
OLD | NEW |