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.6}} | 8 {\large Version 1.6}} |
9 %\author{The Dart Team} | 9 %\author{The Dart Team} |
10 \begin{document} | 10 \begin{document} |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1199 (respectively \SUPER{}$.id(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$ | 1199 (respectively \SUPER{}$.id(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$ |
1200 | 1200 |
1201 proceeds as follows: | 1201 proceeds as follows: |
1202 | 1202 |
1203 First, the argument list $(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$ is evaluated. | 1203 First, the argument list $(a_1, \ldots, a_n, x_{n+1}: a_{n+1}, \ldots, x_{n+k}: a_{n+k})$ is evaluated. |
1204 | 1204 |
1205 Let $C$ be the class in which the superinitializer appears and let $S$ be the su perclass of $C$. If $S$ is generic (\ref{generics}), let $U_1, , \ldots, U_m$ b e the actual type arguments passed to $S$ in the superclass clause of $C$. | 1205 Let $C$ be the class in which the superinitializer appears and let $S$ be the su perclass of $C$. If $S$ is generic (\ref{generics}), let $U_1, , \ldots, U_m$ b e the actual type arguments passed to $S$ in the superclass clause of $C$. |
1206 | 1206 |
1207 Then, the initializer list of the constructor $S$ (respectively $S.id$) is execu ted with respect to the bindings that resulted from the evaluation of the argume nt list, with \THIS{} bound to the current binding of \THIS{}, and the type pa rameters (if any) of class $S$ bound to the current bindings of $U_1, , \ldots, U_m$. | 1207 Then, the initializer list of the constructor $S$ (respectively $S.id$) is execu ted with respect to the bindings that resulted from the evaluation of the argume nt list, with \THIS{} bound to the current binding of \THIS{}, and the type pa rameters (if any) of class $S$ bound to the current bindings of $U_1, , \ldots, U_m$. |
1208 | 1208 |
1209 It is a compile-time error if class $S$ does not declare a generative constructo r named $S$ (respectively $S.id$) | 1209 It is a compile-time error if class $S$ does not declare a generative constructo r named $S$ (respectively $S.id$). |
1210 | 1210 |
1211 \subsubsection{Factories} | 1211 \subsubsection{Factories} |
1212 \label{factories} | 1212 \label{factories} |
1213 | 1213 |
1214 A {\em factory} is a constructor prefaced by the built-in identifier (\ref{iden tifierReference}) \FACTORY{}. | 1214 A {\em factory} is a constructor prefaced by the built-in identifier (\ref{iden tifierReference}) \FACTORY{}. |
1215 | 1215 |
1216 \begin{grammar} | 1216 \begin{grammar} |
1217 {\bf factoryConstructorSignature:} | 1217 {\bf factoryConstructorSignature:} |
1218 \FACTORY{} identifier (`{\escapegrammar .}' identifier)? formalParameter List | 1218 \FACTORY{} identifier (`{\escapegrammar .}' identifier)? formalParameter List |
1219 . | 1219 . |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1503 \EXTENDS{} type | 1503 \EXTENDS{} type |
1504 . | 1504 . |
1505 \end{grammar} | 1505 \end{grammar} |
1506 | 1506 |
1507 %The superclass clause of a class C is processed within the enclosing scope of t he static scope of C. | 1507 %The superclass clause of a class C is processed within the enclosing scope of t he static scope of C. |
1508 %\commentary{ | 1508 %\commentary{ |
1509 %This means that in a generic class, the type parameters of the generic are avai lable in the superclass clause. | 1509 %This means that in a generic class, the type parameters of the generic are avai lable in the superclass clause. |
1510 %} | 1510 %} |
1511 | 1511 |
1512 %It is a compile-time error if the \EXTENDS{} clause of a class $C$ includes a type expression that does not denote a class available in the lexical scope of $ C$. | 1512 %It is a compile-time error if the \EXTENDS{} clause of a class $C$ includes a type expression that does not denote a class available in the lexical scope of $ C$. |
1513 It is a compile-time error if the \EXTENDS{} clause of a class $C$ specifies a malformed type or a deferred type (\ref{staticTypes}) as a superclass. | 1513 It is a compile-time error if the \EXTENDS{} clause of a class $C$ specifies an enumerated type (\ref{enums}), a malformed type or a deferred type (\ref{stati cTypes}) as a superclass. |
1514 % too strict? Do we e want extends List<Undeclared> to work as List<dynamic>? | 1514 % too strict? Do we e want extends List<Undeclared> to work as List<dynamic>? |
1515 | 1515 |
1516 \commentary{ The type parameters of a generic class are available in the lexical scope of the superclass clause, potentially shadowing classes in the surroundin g scope. The following code is therefore illegal and should cause a compile-time error: | 1516 \commentary{ The type parameters of a generic class are available in the lexical scope of the superclass clause, potentially shadowing classes in the surroundin g scope. The following code is therefore illegal and should cause a compile-time error: |
1517 } | 1517 } |
1518 | 1518 |
1519 \begin{dartCode} | 1519 \begin{dartCode} |
1520 class T \{\} | 1520 class T \{\} |
1521 | 1521 |
1522 /* Compilation error: Attempt to subclass a type parameter */ | 1522 /* Compilation error: Attempt to subclass a type parameter */ |
1523 class G$<$T$>$ extends T \{\} | 1523 class G$<$T$>$ extends T \{\} |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1626 | 1626 |
1627 A class has a set of direct superinterfaces. This set includes the interface of its superclass and the interfaces specified in the the \IMPLEMENTS{} clause of the class. | 1627 A class has a set of direct superinterfaces. This set includes the interface of its superclass and the interfaces specified in the the \IMPLEMENTS{} clause of the class. |
1628 % and any superinterfaces specified by interface injection (\ref{interfaceInject ion}). \Q{The latter needs to be worded carefully - when do interface injection clauses execute and in what scope?} | 1628 % and any superinterfaces specified by interface injection (\ref{interfaceInject ion}). \Q{The latter needs to be worded carefully - when do interface injection clauses execute and in what scope?} |
1629 | 1629 |
1630 \begin{grammar} | 1630 \begin{grammar} |
1631 {\bf interfaces:} | 1631 {\bf interfaces:} |
1632 \IMPLEMENTS{} typeList | 1632 \IMPLEMENTS{} typeList |
1633 . | 1633 . |
1634 \end{grammar} | 1634 \end{grammar} |
1635 | 1635 |
1636 It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifie s a type variable as a superinterface. It is a compile-time error if the \IMPL EMENTS{} clause of a class $C$ specifies a malformed type or deferred type (\re f{staticTypes}) as a superinterface It is a compile-time error if the \IMPLEMEN TS{} clause of a class $C$ specifies type \DYNAMIC{} as a superinterface. It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies a t ype $T$ as a superinterface more than once. | 1636 It is a compile-time error if the \IMPLEMENTS{} clause of a class $C$ specifie s a type variable as a superinterface. It is a compile-time error if the \IMPL EMENTS{} clause of a class $C$ specifies an enumerated type (\ref{enums}), a ma lformed type or deferred type (\ref{staticTypes}) as a superinterface It is a c ompile-time error if the \IMPLEMENTS{} clause of a class $C$ specifies type \DYN AMIC{} as a superinterface. It is a compile-time error if the \IMPLEMENTS{} cl ause of a class $C$ specifies a type $T$ as a superinterface more than once. |
1637 It is a compile-time error if the superclass of a class $C$ is specified as a su perinterface of $C$. | 1637 It is a compile-time error if the superclass of a class $C$ is specified as a su perinterface of $C$. |
1638 | 1638 |
1639 \rationale{ | 1639 \rationale{ |
1640 One might argue that it is harmless to repeat a type in the superinterface list, so why make it an error? The issue is not so much that the situation described in program source is erroneous, but that it is pointless. As such, it is an indi cation that the programmer may very well have meant to say something else - and that is a mistake that should be called to her or his attention. Nevertheless, we could simply issue a warning; and perhaps we should and will. That said, prob lems like these are local and easily corrected on the spot, so we feel justified in taking a harder line. | 1640 One might argue that it is harmless to repeat a type in the superinterface list, so why make it an error? The issue is not so much that the situation described in program source is erroneous, but that it is pointless. As such, it is an indi cation that the programmer may very well have meant to say something else - and that is a mistake that should be called to her or his attention. Nevertheless, we could simply issue a warning; and perhaps we should and will. That said, prob lems like these are local and easily corrected on the spot, so we feel justified in taking a harder line. |
1641 } | 1641 } |
1642 | 1642 |
1643 It is a compile-time error if the interface of a class $C$ is a superinterface o f itself. | 1643 It is a compile-time error if the interface of a class $C$ is a superinterface o f itself. |
1644 | 1644 |
1645 Let $C$ be a concrete class that does not declare its own \code{noSuchMethod()} method. | 1645 Let $C$ be a concrete class that does not declare its own \code{noSuchMethod()} method. |
1646 It is a static warning if the implicit interface of $C$ includes an instance me mber $m$ of type $F$ and $C$ does not declare or inherit a corresponding non-abs tract instance member $m$ of type $F'$ such that $F' <: F$. | 1646 It is a static warning if the implicit interface of $C$ includes an instance me mber $m$ of type $F$ and $C$ does not declare or inherit a corresponding non-abs tract instance member $m$ of type $F'$ such that $F' <: F$. |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1817 | 1817 |
1818 In both cases above, $C$ declares the same instance members as $M$ (respectively , $M_k$). If any of the instance fields of $M$ (respectively, $M_k$) have initia lizers, they are executed in the scope of $M$ (respectively, $M_k$) to initializ e the corresponding fields of $C$. | 1818 In both cases above, $C$ declares the same instance members as $M$ (respectively , $M_k$). If any of the instance fields of $M$ (respectively, $M_k$) have initia lizers, they are executed in the scope of $M$ (respectively, $M_k$) to initializ e the corresponding fields of $C$. |
1819 | 1819 |
1820 For each generative constructor named $q_i(T_{i1}$ $ a_{i1}, \ldots , T_{ik_i}$ $ a_{ik_i}), i \in 1..n$ of $S$, $C$ has an implicitly declared constructor name d | 1820 For each generative constructor named $q_i(T_{i1}$ $ a_{i1}, \ldots , T_{ik_i}$ $ a_{ik_i}), i \in 1..n$ of $S$, $C$ has an implicitly declared constructor name d |
1821 $q'_i = [C/S]q_i$ of the form | 1821 $q'_i = [C/S]q_i$ of the form |
1822 | 1822 |
1823 $q'_i(a_{i1}, \ldots , a_{ik_i}):\SUPER(a_{i1}, \ldots , a_{ik_i});$. | 1823 $q'_i(a_{i1}, \ldots , a_{ik_i}):\SUPER(a_{i1}, \ldots , a_{ik_i});$. |
1824 | 1824 |
1825 If the mixin application declares support for interfaces, the resulting class im plements those interfaces. | 1825 If the mixin application declares support for interfaces, the resulting class im plements those interfaces. |
1826 | 1826 |
1827 It is a compile-time error if $S$ is a malformed type. It is a compile-time erro r if $M$ (respectively, any of $M_1, \ldots, M_k$) is a malformed type. It is a compile time error if a well formed mixin cannot be derived from $M$ (respective ly, from each of $M_1, \ldots, M_k$). | 1827 It is a compile-time error if $S$ is an enumerated type (\ref{enums}) or a malfo rmed type. It is a compile-time error if $M$ (respectively, any of $M_1, \ldots, M_k$) is an enumerated type (\ref{enums}) or a malformed type. It is a compile time error if a well formed mixin cannot be derived from $M$ (respectively, from each of $M_1, \ldots, M_k$). |
1828 | 1828 |
1829 Let $K$ be a class declaration with the same constructors, superclass and inter faces as $C$, and the instance members declared by $M$ (respectively $M_1, \ldo ts, M_k$). It is a static warning if the declaration of $K$ would cause a static warning. It is a compile-time error if the declaration of $K$ would cause a co mpile-time error. | 1829 Let $K$ be a class declaration with the same constructors, superclass and inter faces as $C$, and the instance members declared by $M$ (respectively $M_1, \ldo ts, M_k$). It is a static warning if the declaration of $K$ would cause a static warning. It is a compile-time error if the declaration of $K$ would cause a co mpile-time error. |
1830 | 1830 |
1831 \commentary{ | 1831 \commentary{ |
1832 If, for example, $M$ declares an instance member $im$ whose type is at odds with the type of a member of the same name in $S$, this will result in a static warn ing just as if we had defined $K$ by means of an ordinary class declaration exte nding $S$, with a body that included $im$. | 1832 If, for example, $M$ declares an instance member $im$ whose type is at odds with the type of a member of the same name in $S$, this will result in a static warn ing just as if we had defined $K$ by means of an ordinary class declaration exte nding $S$, with a body that included $im$. |
1833 | 1833 |
1834 } | 1834 } |
1835 | 1835 |
1836 The effect of a class definition of the form \code{\CLASS{} $C$ = $M$; } or the form | 1836 The effect of a class definition of the form \code{\CLASS{} $C$ = $M$; } or the form |
1837 \code{\CLASS{} $C<T_1, \ldots, T_n>$ = $M$; } in library $L$ is to introduce t he name $C$ into the scope of $L$, bound to the class (\ref{classes}) defined by the mixin application $M$. The name of the class is also set to $C$. Iff the c lass is prefixed by the built-in identifier \ABSTRACT{}, the class being defined is an abstract class. | 1837 \code{\CLASS{} $C<T_1, \ldots, T_n>$ = $M$; } in library $L$ is to introduce t he name $C$ into the scope of $L$, bound to the class (\ref{classes}) defined by the mixin application $M$. The name of the class is also set to $C$. Iff the c lass is prefixed by the built-in identifier \ABSTRACT{}, the class being defined is an abstract class. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1869 } | 1869 } |
1870 | 1870 |
1871 Mixin composition is associative. | 1871 Mixin composition is associative. |
1872 | 1872 |
1873 | 1873 |
1874 \commentary{ | 1874 \commentary{ |
1875 Note that any subset of $M_1$, $M_2$ and $S$ may or may not be generic. For any non-generic declaration, the corresponding type parameters may be elided, and if no type parameters remain in the derived declarations $Id_1$ and/or $Id_2$ then the those declarations need not be generic either. | 1875 Note that any subset of $M_1$, $M_2$ and $S$ may or may not be generic. For any non-generic declaration, the corresponding type parameters may be elided, and if no type parameters remain in the derived declarations $Id_1$ and/or $Id_2$ then the those declarations need not be generic either. |
1876 } | 1876 } |
1877 | 1877 |
1878 | 1878 |
1879 \section{Enums} | |
1880 \label{enums} | |
1881 | |
1882 An {\em enumerated type}, or {\em enum}, is used to represent a fixed number of constant values. | |
1883 | |
1884 \begin{grammar} | |
1885 {\bf enumType:} | |
1886 metadata \ENUM{} id `\{' id [`,' id]* [`,'] `\}' | |
1887 . | |
1888 \end{grammar} | |
1889 | |
1890 The declaration of an enum of the form \code{metadata \ENUM{} E \{ id$_1$, \ldot s id$_n$\};} | |
kasperl
2014/08/19 05:04:35
You could consider calling these id$_0$ to id$_{n-
gbracha
2014/08/19 17:54:40
Done.
| |
1891 has the same effect as a class declaration | |
1892 | |
1893 \begin{dartCode} | |
1894 metadata \CLASS{} E \{ | |
1895 \FINAL{} int index; | |
1896 \FINAL{} String \_name; | |
1897 \CONST{} E(\THIS{}.index,\THIS{}.\_name); | |
1898 \STATIC{} \CONST{} E id$_1$ = \CONST{} E(0, `id$_1$'); | |
1899 $\ldots$ | |
1900 \STATIC{} \CONST{} E id$_n$ = const E(n - 1, `id$_{n-1}$'); | |
kasperl
2014/08/19 05:04:35
`id$_{n-1}$' should be `id$_n$'.
gbracha
2014/08/19 17:54:40
Not anymore.
| |
1901 | |
1902 \STATIC{} \CONST{} List$<$E$>$ values = const $<$E$>$[id$_1 \ldots $ id$_n$]; | |
1903 String toString() =$>$ `E.\$\_name'; | |
1904 \} | |
1905 \end{dartCode} | |
1906 | |
1907 | |
1908 | |
1909 It is compile-time error to access the private fields of an enumerated type anyw here outside its definition. | |
kasperl
2014/08/19 05:04:35
How can we tell statically?
Is there any way we c
gbracha
2014/08/19 17:54:41
The problem is that the surrounding library would
| |
1910 | |
1911 \commentary { | |
1912 It is also a compile-time error to subclass, mix-in or implement an enum or to e xplicitly instantiate an enum. These restrictions are given in normative form i n sections \ref{superclasses}, \ref{superinterfaces}, \ref{mixinApplication} and \ref{instanceCreation} as appropriate. | |
1913 | |
1914 All of these restrictions should be enforced by the implementation even in the c ase of reflection. | |
1915 } | |
1916 | |
1917 % should this be rephrased so that these rules go elsewhere (i.e., in the rules for new/const/extends/implements/with?) | |
kasperl
2014/08/19 05:04:35
Haven't you already done so?
gbracha
2014/08/19 17:54:41
Yes, I have. This is just an old comment. I'll get
| |
1918 | |
1919 | |
1879 \section{Generics} | 1920 \section{Generics} |
1880 \label{generics} | 1921 \label{generics} |
1881 | 1922 |
1882 A class declaration (\ref{classes}) or type alias (\ref{typedef}) | 1923 A class declaration (\ref{classes}) or type alias (\ref{typedef}) |
1883 $G$ may be {\em generic}, that is, $G$ may have formal type parameters declared. A generic declaration induces a family of declarations, one for each set of act ual type parameters provided in the program. | 1924 $G$ may be {\em generic}, that is, $G$ may have formal type parameters declared. A generic declaration induces a family of declarations, one for each set of act ual type parameters provided in the program. |
1884 | 1925 |
1885 \begin{grammar} | 1926 \begin{grammar} |
1886 {\bf typeParameter:} | 1927 {\bf typeParameter:} |
1887 metadata identifier (\EXTENDS{} type)? | 1928 metadata identifier (\EXTENDS{} type)? |
1888 . | 1929 . |
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2770 It is a static type warning if | 2811 It is a static type warning if |
2771 the type $T$ in an instance creation expression of one of the forms | 2812 the type $T$ in an instance creation expression of one of the forms |
2772 | 2813 |
2773 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | 2814 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, |
2774 | 2815 |
2775 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | 2816 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, |
2776 | 2817 |
2777 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | 2818 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, |
2778 | 2819 |
2779 \CONST{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$ is malformed (\ref{dynamicTypeSystem}) or malbounded (\ref{parameterizedTypes}). | 2820 \CONST{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$ is malformed (\ref{dynamicTypeSystem}) or malbounded (\ref{parameterizedTypes}). |
2821 | |
2822 It is a compile-time error if the type $T$ in an instance creation expression of one of the forms | |
kasperl
2014/08/19 05:04:35
one of the forms -> one of the forms (I know it w
gbracha
2014/08/19 17:54:40
Done.
| |
2823 | |
2824 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | |
2825 | |
2826 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | |
2827 | |
2828 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, | |
2829 | |
2830 \CONST{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$ | |
2831 | |
2832 is an enumerated type (\ref{enums}). | |
2780 %any of the type arguments to a constructor of a generic type $G$ invoked by a n ew expression or a constant object expression are not subtypes of the bounds of the corresponding formal type parameters of $G$. | 2833 %any of the type arguments to a constructor of a generic type $G$ invoked by a n ew expression or a constant object expression are not subtypes of the bounds of the corresponding formal type parameters of $G$. |
2781 | 2834 |
2782 | 2835 |
2783 \subsubsection{ New} | 2836 \subsubsection{ New} |
2784 \label{new} | 2837 \label{new} |
2785 | 2838 |
2786 The {\em new expression} invokes a constructor (\ref{constructors}). | 2839 The {\em new expression} invokes a constructor (\ref{constructors}). |
2787 | 2840 |
2788 \begin{grammar} | 2841 \begin{grammar} |
2789 {\bf newExpression:} | 2842 {\bf newExpression:} |
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4652 \begin{dartCode} | 4705 \begin{dartCode} |
4653 \SWITCH{} (x) \{ | 4706 \SWITCH{} (x) \{ |
4654 \CASE{} 1: \TRY{} \{ $\ldots$ \RETURN{};\} \FINALLY{} \{ $\ldots$ \RETURN{};\} | 4707 \CASE{} 1: \TRY{} \{ $\ldots$ \RETURN{};\} \FINALLY{} \{ $\ldots$ \RETURN{};\} |
4655 \} | 4708 \} |
4656 \end{dartCode} | 4709 \end{dartCode} |
4657 | 4710 |
4658 \rationale{ | 4711 \rationale{ |
4659 Very elaborate code in a case clause is probably bad style in any case, and su ch code can always be refactored. | 4712 Very elaborate code in a case clause is probably bad style in any case, and su ch code can always be refactored. |
4660 } | 4713 } |
4661 | 4714 |
4715 It is a static warning if all of the following conditions hold: | |
4716 \begin{itemize} | |
4717 \item The switch statement does not have a default clause. | |
4718 \item The static type of $e$ is an enumerated typed with elements $id_1, \ldots , id_n$. | |
4719 \item The sets $\{e_1, \ldots, e_k\} $ and $\{id_1, \ldots, id_n\}$ are not the same. | |
4720 \end{itemize} | |
4721 | |
4722 \commentary{ | |
4723 In other words, a warning will be issued if a switch statement over an enum is n ot exhaustive. | |
4724 } | |
4725 | |
4662 | 4726 |
4663 \subsection{ Rethrow} | 4727 \subsection{ Rethrow} |
4664 \label{rethrow} | 4728 \label{rethrow} |
4665 | 4729 |
4666 | 4730 |
4667 The {\em rethrow statement} is used to re-raise an exception. | 4731 The {\em rethrow statement} is used to re-raise an exception. |
4668 | 4732 |
4669 \begin{grammar} | 4733 \begin{grammar} |
4670 {\bf rethrowStatement:} | 4734 {\bf rethrowStatement:} |
4671 \RETHROW{} | 4735 \RETHROW{} |
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6059 \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. | 6123 \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. |
6060 \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 | 6124 \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 |
6061 \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. | 6125 \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. |
6062 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. | 6126 \item The names of type variables are short (preferably single letter). Examples : T, S, K, V , E. |
6063 \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. | 6127 \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. |
6064 \end{itemize} | 6128 \end{itemize} |
6065 } | 6129 } |
6066 | 6130 |
6067 | 6131 |
6068 \end{document} | 6132 \end{document} |
OLD | NEW |