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

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

Issue 483873002: Enums. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 months 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 | « no previous file | no next file » | 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{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
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
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
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
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
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$_0$, \ldot s id$_{n-1}$\};}
1891 has the same effect as a class declaration
1892
1893 \begin{dartCode}
1894 metadata \CLASS{} E \{
1895 \FINAL{} int index;
1896 \CONST{} E(\THIS{}.index);
1897 \STATIC{} \CONST{} E id$_0$ = \CONST{} E(0);
1898 $\ldots$
1899 \STATIC{} \CONST{} E id$_{n-1}$ = const E(n - 1);
1900 \STATIC{} \CONST{} List$<$E$>$ values = const $<$E$>$[id$_0 \ldots $ id$_{n-1} $];
1901 String toString() =$>$ \{ 0: `E.id$_0$', $\ldots$, n-1: `E.id$_{n-1}$'\}[index ]
1902 \}
1903 \end{dartCode}
1904
1905 \commentary {
1906 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.
1907 }
1908
1909
1910
1879 \section{Generics} 1911 \section{Generics}
1880 \label{generics} 1912 \label{generics}
1881 1913
1882 A class declaration (\ref{classes}) or type alias (\ref{typedef}) 1914 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. 1915 $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 1916
1885 \begin{grammar} 1917 \begin{grammar}
1886 {\bf typeParameter:} 1918 {\bf typeParameter:}
1887 metadata identifier (\EXTENDS{} type)? 1919 metadata identifier (\EXTENDS{} type)?
1888 . 1920 .
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 It is a static type warning if 2802 It is a static type warning if
2771 the type $T$ in an instance creation expression of one of the forms 2803 the type $T$ in an instance creation expression of one of the forms
2772 2804
2773 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, 2805 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2774 2806
2775 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, 2807 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2776 2808
2777 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$, 2809 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2778 2810
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}). 2811 \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}).
2812
2813 It is a compile-time error if the type $T$ in an instance creation expression of one of the forms
2814
2815 \NEW{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2816
2817 \NEW{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2818
2819 \CONST{} $T.id(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$,
2820
2821 \CONST{} $T(a_1, \ldots , a_n, x_{n+1}: a_{n+1}, \ldots , x_{n+k}: a_{n+k})$
2822
2823 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$. 2824 %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 2825
2782 2826
2783 \subsubsection{ New} 2827 \subsubsection{ New}
2784 \label{new} 2828 \label{new}
2785 2829
2786 The {\em new expression} invokes a constructor (\ref{constructors}). 2830 The {\em new expression} invokes a constructor (\ref{constructors}).
2787 2831
2788 \begin{grammar} 2832 \begin{grammar}
2789 {\bf newExpression:} 2833 {\bf newExpression:}
(...skipping 1862 matching lines...) Expand 10 before | Expand all | Expand 10 after
4652 \begin{dartCode} 4696 \begin{dartCode}
4653 \SWITCH{} (x) \{ 4697 \SWITCH{} (x) \{
4654 \CASE{} 1: \TRY{} \{ $\ldots$ \RETURN{};\} \FINALLY{} \{ $\ldots$ \RETURN{};\} 4698 \CASE{} 1: \TRY{} \{ $\ldots$ \RETURN{};\} \FINALLY{} \{ $\ldots$ \RETURN{};\}
4655 \} 4699 \}
4656 \end{dartCode} 4700 \end{dartCode}
4657 4701
4658 \rationale{ 4702 \rationale{
4659 Very elaborate code in a case clause is probably bad style in any case, and su ch code can always be refactored. 4703 Very elaborate code in a case clause is probably bad style in any case, and su ch code can always be refactored.
4660 } 4704 }
4661 4705
4706 It is a static warning if all of the following conditions hold:
4707 \begin{itemize}
4708 \item The switch statement does not have a default clause.
4709 \item The static type of $e$ is an enumerated typed with elements $id_1, \ldots , id_n$.
4710 \item The sets $\{e_1, \ldots, e_k\} $ and $\{id_1, \ldots, id_n\}$ are not the same.
4711 \end{itemize}
4712
4713 \commentary{
4714 In other words, a warning will be issued if a switch statement over an enum is n ot exhaustive.
4715 }
4716
4662 4717
4663 \subsection{ Rethrow} 4718 \subsection{ Rethrow}
4664 \label{rethrow} 4719 \label{rethrow}
4665 4720
4666 4721
4667 The {\em rethrow statement} is used to re-raise an exception. 4722 The {\em rethrow statement} is used to re-raise an exception.
4668 4723
4669 \begin{grammar} 4724 \begin{grammar}
4670 {\bf rethrowStatement:} 4725 {\bf rethrowStatement:}
4671 \RETHROW{} 4726 \RETHROW{}
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 6114 \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 6115 \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. 6116 \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. 6117 \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. 6118 \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} 6119 \end{itemize}
6065 } 6120 }
6066 6121
6067 6122
6068 \end{document} 6123 \end{document}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698