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

Unified Diff: docs/language/dartLangSpec.tex

Issue 165483004: Libraries can be private. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: docs/language/dartLangSpec.tex
===================================================================
--- docs/language/dartLangSpec.tex (revision 32683)
+++ docs/language/dartLangSpec.tex (working copy)
@@ -5,7 +5,7 @@
\usepackage{hyperref}
\newcommand{\code}[1]{{\sf #1}}
\title{Dart Programming Language Specification \\
-{\large Version 1.11}}
+{\large Version 1.2}}
ahe 2014/02/25 10:28:20 I believe 1.11 is larger than 1.2, so this version
\author{The Dart Team}
\begin{document}
\maketitle
@@ -209,7 +209,9 @@
\subsection{Privacy}
\label{privacy}
-Dart supports two levels of privacy: {\em public} and {\em private}. A declaration is {\em private} iff its name begins with an underscore (the \_ character) otherwise it is {\em public.}
+Dart supports two levels of privacy: {\em public} and {\em private}. A declaration is {\em private} iff its name is private, otherwise it is {\em public.} A name $q$ is private iff any one of the identifiers that comprise $q$ is private, otherwise it is {\em public.} An identifier is private iff it
ahe 2014/02/20 15:51:39 What is a "declaration"? What is "its name" (that
+begins with an underscore (the \_ character) otherwise it is {\em public.}
+
A declaration $m$ is {\em accessible to library $L$} if $m$ is declared in $L$ or if $m$ is public.
\commentary{
@@ -218,9 +220,8 @@
Privacy applies only to declarations within a library, not to library declarations themselves.
-\rationale{
-Libraries do not reference each other by name and so the idea of a private library is meaningless.
-Thus, if the name of a library begins with an underscore, it has no special significance.
+\rationale{Libraries do not reference each other by name and so the idea of a private library is meaningless.
+Thus, if the name of a library begins with an underscore, it has no effect on the accessibility of the library or its members.
}
\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 rather than security concerns. Untrusted code should always run in an another isolate. It is possible that libraries will become first class objects and privacy will be a dynamic notion tied to a library instance.
@@ -1667,7 +1668,7 @@
\item $m$ is accessible to $K$ and
\item $A$ is a direct superinterface of $J$ and either
\begin{itemize}
- \item $m$ is a member of $A$ or
+ \item $A$ declares a member $m$ or
\item $m$ is a member of $inherited(A, K)$.
\end{itemize}
\item $m$ is not overridden by $J$.
@@ -1681,7 +1682,7 @@
\item $m^\prime$ is accessible to $K$.
\item $A$ is a direct superinterface of $J$ and either
\begin{itemize}
- \item $m^\prime$ is a member of $A$ or
+ \item $A$ declares a member $m^\prime$ or
\item $m^\prime$ is a member of $inherited(A, K)$.
\end{itemize}
\end{itemize}
@@ -4832,7 +4833,7 @@
A Dart program consists of one or more libraries, and may be built out of one or more {\em compilation units}. A compilation unit may be a library or a part (\ref{parts}).
-A library consists of (a possibly empty) set of imports, a set of exports, and a set of top-level declarations. A top-level declaration is either a class (\ref{classes}), a type alias declaration (\ref{typedef}), a function (\ref{functions}) or a variable declaration (\ref{variables}). The members of a library $L$ are those top level declarations given within a $L$.
+A library consists of (a possibly empty) set of imports, a set of exports, and a set of top-level declarations. A top-level declaration is either a class (\ref{classes}), a type alias declaration (\ref{typedef}), a function (\ref{functions}) or a variable declaration (\ref{variables}). The members of a library $L$ are those top level declarations given within a $L$.
\begin{grammar}
{\bf topLevelDefinition:}classDefinition;
« 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