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.2}} | 8 {\large Version 1.2}} |
9 \author{The Dart Team} | 9 \author{The Dart Team} |
10 \begin{document} | 10 \begin{document} |
(...skipping 3943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3954 \item Otherwise, if $e$ occurs inside a top level or static function (be it func tion, method, getter, or setter) or variable initializer, evaluation of $e$ cau ses a\code{NoSuchMethod} to be thrown. | 3954 \item Otherwise, if $e$ occurs inside a top level or static function (be it func tion, method, getter, or setter) or variable initializer, evaluation of $e$ cau ses a\code{NoSuchMethod} to be thrown. |
3955 \item Otherwise, $e$ is equivalent to the property extraction (\ref{propertyExtr action}) \THIS{}.$id$. | 3955 \item Otherwise, $e$ is equivalent to the property extraction (\ref{propertyExtr action}) \THIS{}.$id$. |
3956 % This implies that referring to an undefined static getter by simple name is an error, whereas doing so by qualified name is only a warning. Same with assignme nts. Revise? | 3956 % This implies that referring to an undefined static getter by simple name is an error, whereas doing so by qualified name is only a warning. Same with assignme nts. Revise? |
3957 \end{itemize} | 3957 \end{itemize} |
3958 | 3958 |
3959 The static type of $e$ is determined as follows: | 3959 The static type of $e$ is determined as follows: |
3960 | 3960 |
3961 \begin{itemize} | 3961 \begin{itemize} |
3962 \item If $d$ is a class, type alias or type parameter the static type of $e$ is \code{Type}. | 3962 \item If $d$ is a class, type alias or type parameter the static type of $e$ is \code{Type}. |
3963 \item If $d$ is a local variable or formal parameter the static type of $e$ is t he type of the variable $id$, unless $id$ is known to have some type $T$, in whi ch case the static type of $e$ is $T$, provided that $T$ is more specific than a ny other type $S$ such that $v$ is known to have type $S$. | 3963 \item If $d$ is a local variable or formal parameter the static type of $e$ is t he type of the variable $id$, unless $id$ is known to have some type $T$, in whi ch case the static type of $e$ is $T$, provided that $T$ is more specific than a ny other type $S$ such that $v$ is known to have type $S$. |
3964 \item If $d$ is a static method, top-level function or local function the static type of $e$ the function type defined by $d$. | 3964 \item If $d$ is a static method, top-level function or local function the static type of $e$ is the function type defined by $d$. |
3965 \item If $d$ is the declaration of a static variable or static getter declared i n class $C$, the static type of $e$ the static type of the getter invocation (\r ef{getterInvocation}) $C.id$. | 3965 \item If $d$ is the declaration of a static variable, static getter or static se tter declared in class $C$, the static type of $e$ is the static type of the get ter invocation (\ref{getterInvocation}) $C.id$. |
3966 \item If $d$ is the declaration of a library variable or top-level getter, the s tatic type of $e$ is the static type of the getter invocation $id$. | 3966 \item If $d$ is the declaration of a library variable, top-level getter or top-l evel setter, the static type of $e$ is the static type of the getter invocation $id$. |
Lasse Reichstein Nielsen
2014/03/06 12:20:01
I think this is ok - the static type of the getter
| |
3967 \item Otherwise, if $e$ occurs inside a top level or static function (be it func tion, method, getter, or setter) or variable initializer, the static type of $e $ is \DYNAMIC{}. | 3967 \item Otherwise, if $e$ occurs inside a top level or static function (be it func tion, method, getter, or setter) or variable initializer, the static type of $e $ is \DYNAMIC{}. |
3968 \item Otherwise, the static type of $e$ is the type of the property extraction ( \ref{propertyExtraction}) \THIS{}.$id$. | 3968 \item Otherwise, the static type of $e$ is the type of the property extraction ( \ref{propertyExtraction}) \THIS{}.$id$. |
3969 \end{itemize} | 3969 \end{itemize} |
3970 | 3970 |
3971 \commentary{Note that if one declares a setter, we bind to the corresponding ge tter even if it does not exist.} | 3971 \commentary{Note that if one declares a setter, we bind to the corresponding ge tter even if it does not exist.} |
3972 | 3972 |
3973 \rationale{ | 3973 \rationale{ |
3974 This prevents situations where one uses uncorrelated setters and getters. The i ntent is to prevent errors when a getter in a surrounding scope is used acciden tally. | 3974 This prevents situations where one uses uncorrelated setters and getters. The i ntent is to prevent errors when a getter in a surrounding scope is used acciden tally. |
3975 } | 3975 } |
3976 | 3976 |
(...skipping 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5841 \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. | 5841 \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. |
5842 \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 | 5842 \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 |
5843 \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. | 5843 \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. |
5844 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. | 5844 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. |
5845 \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. | 5845 \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. |
5846 \end{itemize} | 5846 \end{itemize} |
5847 } | 5847 } |
5848 | 5848 |
5849 | 5849 |
5850 \end{document} | 5850 \end{document} |
OLD | NEW |