]> gitweb.factorcode.org Git - factor.git/commitdiff
clean up typos and improve synergy between locals and namespaces docs
authorJoe Groff <arcata@gmail.com>
Thu, 29 Oct 2009 19:08:45 +0000 (14:08 -0500)
committerJoe Groff <arcata@gmail.com>
Thu, 29 Oct 2009 19:08:45 +0000 (14:08 -0500)
basis/locals/locals-docs.factor
core/namespaces/namespaces-docs.factor

index 0f27240c33da14fe0bd5cfd20ac64813d2398218..17d11d566a1cb1980ba52a1cf350f5745c416a84 100644 (file)
@@ -274,8 +274,8 @@ $nl
 }
 "The reason is that locals are rewritten into stack code at parse time, whereas macro expansion is performed later during compile time. To circumvent this problem, the " { $vocab-link "macros.expander" } " vocabulary is used to rewrite simple macro usages prior to local transformation. However, " { $vocab-link "macros.expander" } " cannot deal with more complicated cases where the literal inputs to the macro do not immediately precede the macro call in the source." ;
 
-ARTICLE: "locals" "Lexical variables and closures"
-"The " { $vocab-link "locals" } " vocabulary provides lexically scoped local variables. Full closure semantics, both downward and upward, are supported. Mutable variable bindings are also provided, supporting assignment to bindings in the current scope or outer scopes."
+ARTICLE: "locals" "Lexical variables"
+"The " { $vocab-link "locals" } " vocabulary provides lexically scoped local variables. Full closure semantics, both downward and upward, are supported. Mutable variable bindings are also provided, supporting assignment to bindings in the current scope or in outer scopes."
 { $subsections
     "locals-examples"
 }
@@ -300,6 +300,6 @@ ARTICLE: "locals" "Lexical variables and closures"
     "locals-fry"
     "locals-limitations"
 }
-"Locals complement dynamically scoped variables implemented in the " { $vocab-link "namespaces" } " vocabulary." ;
+"Local variables complement " { $link "namespaces" } "." ;
 
 ABOUT: "locals"
index 9fc4695e66e7dc27ed730f2388f97fe82c141b81..05a72c602583ba669031d83b98100d7c0215d5ac 100755 (executable)
@@ -43,24 +43,24 @@ ARTICLE: "namespaces.private" "Namespace implementation details"
     ndrop
 } ;
 
-ARTICLE: "namespaces" "Dynamic variables and namespaces"
-"The " { $vocab-link "namespaces" } " vocabulary implements simple dynamically-scoped variables."
+ARTICLE: "namespaces" "Dynamic variables"
+"The " { $vocab-link "namespaces" } " vocabulary implements dynamically-scoped variables."
 $nl
-"A variable is an entry in an assoc of bindings, where the assoc is implicit rather than passed on the stack. These assocs are termed " { $emphasis "namespaces" } ". Nesting of scopes is implemented with a search order on namespaces, defined by a " { $emphasis "namestack" } ". Since namespaces are just assoc, any object can be used as a variable, however by convention, variables are keyed by symbols (see " { $link "words.symbol" } ")."
+"A dynamic variable is an entry in an assoc of bindings, where the assoc is implicit rather than passed on the stack. These assocs are termed " { $emphasis "namespaces" } ". Nesting of scopes is implemented with a search order on namespaces, defined by a " { $emphasis "namestack" } ". Since namespaces are just assocs, any object can be used as a variable. By convention, variables are keyed by " { $link "words.symbol" } "."
 $nl
-"The " { $link get } " and " { $link set } " words read and write variable values. The " { $link get } " word searches up the chain of nested namespaces, while " { $link set } " always sets variable values in the current namespace only. Namespaces are dynamically scoped; when a quotation is called from a nested scope, any words called by the quotation also execute in that scope."
+"The " { $link get } " and " { $link set } " words read and write variable values. The " { $link get } " word searches the chain of nested namespaces, while " { $link set } " always sets variable values in the current namespace only. Namespaces are dynamically scoped; when a quotation is called from a nested scope, any words called by the quotation also execute in that scope."
 { $subsections
     get
     set
 }
-"Various utility words abstract away common variable access patterns:"
+"Various utility words provide common variable access patterns:"
 { $subsections
     "namespaces-change"
     "namespaces-combinators"
 }
 "Implementation details your code probably does not care about:"
 { $subsections "namespaces.private" }
-"An alternative to dynamic scope is lexical scope. Lexically-scoped values and closures are implemented in the " { $vocab-link "locals" } " vocabulary." ;
+"Dynamic variables complement " { $link "locals" } "." ;
 
 ABOUT: "namespaces"