Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Side by Side Diff: docs/language/dartLangSpec.tex

Issue 652993005: Working insertion of hash values; added a few labels in spec (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Working insertion of hash values (fix: invokes dart with full path) Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « docs/language/dart.sty ('k') | tests/standalone/io/addlatexhash_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 \documentclass{article} 1 \documentclass{article}
2 \usepackage{epsfig} 2 \usepackage{epsfig}
3 \usepackage{color} 3 \usepackage{color}
4 \usepackage{dart} 4 \usepackage{dart}
5 \usepackage{bnf} 5 \usepackage{bnf}
6 \usepackage{hyperref} 6 \usepackage{hyperref}
7 \usepackage{lmodern} 7 \usepackage{lmodern}
8 \newcommand{\code}[1]{{\sf #1}} 8 \newcommand{\code}[1]{{\sf #1}}
9 \title{Dart Programming Language Specification \\ 9 \title{Dart Programming Language Specification \\
10 {\large Version 1.6}} 10 {\large Version 1.6}}
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 279
280 \rationale{Libraries do not reference each other by name and so the idea of a pr ivate library is meaningless. 280 \rationale{Libraries do not reference each other by name and so the idea of a pr ivate library is meaningless.
281 Thus, if the name of a library begins with an underscore, it has no effect on th e accessibility of the library or its members. 281 Thus, if the name of a library begins with an underscore, it has no effect on th e accessibility of the library or its members.
282 } 282 }
283 283
284 \rationale{Privacy is, at this point, a static notion tied to a particular piece of code (a library). It is designed to support software engineering concerns ra ther than security concerns. Untrusted code should always run in an another isol ate. It is possible that libraries will become first class objects and privacy will be a dynamic notion tied to a library instance. 284 \rationale{Privacy is, at this point, a static notion tied to a particular piece of code (a library). It is designed to support software engineering concerns ra ther than security concerns. Untrusted code should always run in an another isol ate. It is possible that libraries will become first class objects and privacy will be a dynamic notion tied to a library instance.
285 285
286 Privacy is indicated by the name of a declaration - hence privacy and naming are not orthogonal. This has the advantage that both humans and machines can recogn ize access to private declarations at the point of use without knowledge of the context from which the declaration is derived.} 286 Privacy is indicated by the name of a declaration - hence privacy and naming are not orthogonal. This has the advantage that both humans and machines can recogn ize access to private declarations at the point of use without knowledge of the context from which the declaration is derived.}
287 287
288 \subsection{Concurrency} 288 \subsection{Concurrency}
289 \LMLabel{concurrency}
289 290
290 \LMHash{} 291 \LMHash{}
291 Dart code is always single threaded. There is no shared-state concurrency in Dar t. Concurrency is supported via actor-like entities called {\em isolates}. 292 Dart code is always single threaded. There is no shared-state concurrency in Dar t. Concurrency is supported via actor-like entities called {\em isolates}.
292 293
293 \LMHash{} 294 \LMHash{}
294 An isolate is a unit of concurrency. It has its own memory and its own thread of control. Isolates communicate by message passing (\ref{sendingMessages}). No st ate is ever shared between isolates. Isolates are created by spawning (\ref{spaw ningAnIsolate}). 295 An isolate is a unit of concurrency. It has its own memory and its own thread of control. Isolates communicate by message passing (\ref{sendingMessages}). No st ate is ever shared between isolates. Isolates are created by spawning (\ref{spaw ningAnIsolate}).
295 296
296 297
297 \section{Errors and Warnings} 298 \section{Errors and Warnings}
298 \LMLabel{errorsAndWarnings} 299 \LMLabel{errorsAndWarnings}
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 {\bf simpleFormalParameter:}declaredIdentifier; 711 {\bf simpleFormalParameter:}declaredIdentifier;
711 metadata identifier 712 metadata identifier
712 . 713 .
713 714
714 {\bf fieldFormalParameter:} 715 {\bf fieldFormalParameter:}
715 metadata finalConstVarOrType? \THIS{} `{\escapegrammar .}' identifier formalP arameterList? 716 metadata finalConstVarOrType? \THIS{} `{\escapegrammar .}' identifier formalP arameterList?
716 . 717 .
717 \end{grammar} 718 \end{grammar}
718 719
719 %\subsubsection{Rest Formals} 720 %\subsubsection{Rest Formals}
721 %\LMLabel{restFormals}
720 722
721 %A rest formal $R$ must be the last parameter in a formal parameter list. If a type $T$ is specified for $R$, it signifies that the type of $R$ is $T[]$. 723 %A rest formal $R$ must be the last parameter in a formal parameter list. If a type $T$ is specified for $R$, it signifies that the type of $R$ is $T[]$.
722 724
723 %\begin{grammar} 725 %\begin{grammar}
724 %restFormalParameter: 726 %restFormalParameter:
725 % finalConstVarOrType? '{\escapegrammar ...}' identifier 727 % finalConstVarOrType? '{\escapegrammar ...}' identifier
726 %\end{grammar} 728 %\end{grammar}
727 729
728 \subsubsection{Optional Formals} 730 \subsubsection{Optional Formals}
729 \LMLabel{optionalFormals} 731 \LMLabel{optionalFormals}
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 `{\escapegrammar :}' \THIS{} (`{\escapegrammar .}' identifier)? arguments 1262 `{\escapegrammar :}' \THIS{} (`{\escapegrammar .}' identifier)? arguments
1261 . 1263 .
1262 \end{grammar} 1264 \end{grammar}
1263 1265
1264 % Need to specify exactly how executing a redirecting constructor works 1266 % Need to specify exactly how executing a redirecting constructor works
1265 1267
1266 1268
1267 %\Q{We now have generative constructors with no bodies as well.} 1269 %\Q{We now have generative constructors with no bodies as well.}
1268 1270
1269 \paragraph{Initializer Lists} 1271 \paragraph{Initializer Lists}
1272 \LMLabel{initializerLists}
1270 1273
1271 \LMHash{} 1274 \LMHash{}
1272 An initializer list begins with a colon, and consists of a comma-separated list of individual {\em initializers}. There are two kinds of initializers. 1275 An initializer list begins with a colon, and consists of a comma-separated list of individual {\em initializers}. There are two kinds of initializers.
1273 \begin{itemize} 1276 \begin{itemize}
1274 \item A {\em superinitializer} identifies a {\em superconstructor} - that is, a specific constructor of the superclass. Execution of the superinitializer caus es the initializer list of the superconstructor to be executed. 1277 \item A {\em superinitializer} identifies a {\em superconstructor} - that is, a specific constructor of the superclass. Execution of the superinitializer caus es the initializer list of the superconstructor to be executed.
1275 1278
1276 \item An {\em instance variable initializer} assigns a value to an individual in stance variable. 1279 \item An {\em instance variable initializer} assigns a value to an individual in stance variable.
1277 \end{itemize} 1280 \end{itemize}
1278 1281
1279 \begin{grammar} 1282 \begin{grammar}
(...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after
3640 The implication of this definition, and the other definitions involving the meth od \code{call()}, is that user defined types can be used as function values prov ided they define a \CALL{} method. The method \CALL{} is special in this regard. The signature of the \CALL{} method determines the signature used when using th e object via the built-in invocation syntax. 3643 The implication of this definition, and the other definitions involving the meth od \code{call()}, is that user defined types can be used as function values prov ided they define a \CALL{} method. The method \CALL{} is special in this regard. The signature of the \CALL{} method determines the signature used when using th e object via the built-in invocation syntax.
3641 } 3644 }
3642 3645
3643 \LMHash{} 3646 \LMHash{}
3644 It is a static warning if the static type $F$ of $e_f$ may not be assigned to a function type. If $F$ is not a function type, the static type of $i$ is \DYNAMI C{}. Otherwise 3647 It is a static warning if the static type $F$ of $e_f$ may not be assigned to a function type. If $F$ is not a function type, the static type of $i$ is \DYNAMI C{}. Otherwise
3645 the static type of $i$ is the declared return type of $F$. 3648 the static type of $i$ is the declared return type of $F$.
3646 %\item Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static war ning if $F$ is not a supertype of $(T_1, \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldot s, T_{n+k}$ $x_{n+k}]) \to \bot$. 3649 %\item Let $T_i$ be the static type of $a_i, i \in 1 .. n+k$. It is a static war ning if $F$ is not a supertype of $(T_1, \ldots, T_n, [T_{n+1}$ $x_{n+1}, \ldot s, T_{n+k}$ $x_{n+k}]) \to \bot$.
3647 %\end{itemize} 3650 %\end{itemize}
3648 3651
3649 \subsection{ Lookup} 3652 \subsection{ Lookup}
3653 \LMLabel{lookup}
3650 3654
3651 \subsubsection{Method Lookup} 3655 \subsubsection{Method Lookup}
3652 \LMLabel{methodLookup} 3656 \LMLabel{methodLookup}
3653 3657
3654 \LMHash{} 3658 \LMHash{}
3655 The result of a lookup of a method $m$ in object $o$ with respect to library $L$ is the result of a lookup of method $m$ in class $C$ with respect to library $ L$, where $C$ is the class of $o$. 3659 The result of a lookup of a method $m$ in object $o$ with respect to library $L$ is the result of a lookup of method $m$ in class $C$ with respect to library $ L$, where $C$ is the class of $o$.
3656 3660
3657 \LMHash{} 3661 \LMHash{}
3658 The result of a lookup of method $m$ in class $C$ with respect to library $L$ i s: 3662 The result of a lookup of method $m$ in class $C$ with respect to library $L$ i s:
3659 If $C$ declares a concrete instance method named $m$ that is accessible to $L$, then that method is the result of the lookup. Otherwise, if $C$ has a superclas s $S$, then the result of the lookup is the result of looking up $m$ in $S$ wit h respect to $L$. Otherwise, we say that the method lookup has failed. 3663 If $C$ declares a concrete instance method named $m$ that is accessible to $L$, then that method is the result of the lookup. Otherwise, if $C$ has a superclas s $S$, then the result of the lookup is the result of looking up $m$ in $S$ wit h respect to $L$. Otherwise, we say that the method lookup has failed.
(...skipping 3451 matching lines...) Expand 10 before | Expand all | Expand 10 after
7111 The scope of a documentation comment immediately preceding the declaration of a class $C$ is the instance scope of $C$, excluding any names introduced via the i mport namespace of the enclosing library. 7115 The scope of a documentation comment immediately preceding the declaration of a class $C$ is the instance scope of $C$, excluding any names introduced via the i mport namespace of the enclosing library.
7112 7116
7113 \LMHash{} 7117 \LMHash{}
7114 The scope of a documentation comment immediately preceding the declaration of a function $f$ is the scope in force at the very beginning of the body of $f$, excluding any names introduced via the import namespace of the enclosing library . 7118 The scope of a documentation comment immediately preceding the declaration of a function $f$ is the scope in force at the very beginning of the body of $f$, excluding any names introduced via the import namespace of the enclosing library .
7115 7119
7116 7120
7117 7121
7118 7122
7119 7123
7120 %\subsection{Grammar} 7124 %\subsection{Grammar}
7125 %\LMLabel{grammar}
7121 \subsection{Operator Precedence} 7126 \subsection{Operator Precedence}
7122 \LMLabel{operatorPrecedence} 7127 \LMLabel{operatorPrecedence}
7123 7128
7124 \LMHash{} 7129 \LMHash{}
7125 Operator precedence is given implicitly by the grammar. 7130 Operator precedence is given implicitly by the grammar.
7126 7131
7127 \commentary{The following non-normative table may be helpful 7132 \commentary{The following non-normative table may be helpful
7128 \newline 7133 \newline
7129 7134
7130 \begin{tabular}{| r | r | r | r |} 7135 \begin{tabular}{| r | r | r | r |}
(...skipping 26 matching lines...) Expand all
7157 \hline 7162 \hline
7158 Conditional & e1? e2: e3 & None & 3\\ 7163 Conditional & e1? e2: e3 & None & 3\\
7159 \hline 7164 \hline
7160 Cascade & .. & Left & 2\\ 7165 Cascade & .. & Left & 2\\
7161 \hline 7166 \hline
7162 Assignment & =, *=, /=, +=, -= ,\&=, \^{}= etc. & Right & 1\\ 7167 Assignment & =, *=, /=, +=, -= ,\&=, \^{}= etc. & Right & 1\\
7163 \hline 7168 \hline
7164 \end{tabular} 7169 \end{tabular}
7165 } 7170 }
7166 %\subsection{Glossary} 7171 %\subsection{Glossary}
7172 %\LMLabel{glossary}
7167 7173
7168 %\bibliographystyle{alpha} 7174 %\bibliographystyle{alpha}
7169 %\bibliography{/users/gilad/research/bibs/master} 7175 %\bibliography{/users/gilad/research/bibs/master}
7170 \section*{Appendix: Naming Conventions} 7176 \section*{Appendix: Naming Conventions}
7177 \LMLabel{namingConventions}
7171 7178
7172 \commentary{ 7179 \commentary{
7173 The following naming conventions are customary in Dart programs. 7180 The following naming conventions are customary in Dart programs.
7174 \begin{itemize} 7181 \begin{itemize}
7175 \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. 7182 \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.
7176 \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 7183 \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
7177 \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. 7184 \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.
7178 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. 7185 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E.
7179 \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. 7186 \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.
7180 \end{itemize} 7187 \end{itemize}
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
7328 7335
7329 The invariant that each normative paragraph is associated with a line 7336 The invariant that each normative paragraph is associated with a line
7330 containing the text \LMHash{} should be maintained. Extra occurrences 7337 containing the text \LMHash{} should be maintained. Extra occurrences
7331 of \LMHash{} can be added if needed, e.g., in order to make 7338 of \LMHash{} can be added if needed, e.g., in order to make
7332 individual \item{}s in itemized lists addressable. Each \LM.. command 7339 individual \item{}s in itemized lists addressable. Each \LM.. command
7333 must occur on a separate line. \LMHash{} must occur immediately 7340 must occur on a separate line. \LMHash{} must occur immediately
7334 before the associated paragraph, and \LMLabel must occur immediately 7341 before the associated paragraph, and \LMLabel must occur immediately
7335 after the associated \section{}, \subsection{} etc. 7342 after the associated \section{}, \subsection{} etc.
7336 7343
7337 ---------------------------------------------------------------------- 7344 ----------------------------------------------------------------------
OLDNEW
« no previous file with comments | « docs/language/dart.sty ('k') | tests/standalone/io/addlatexhash_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698