]> gitweb.factorcode.org Git - factor.git/commitdiff
cookbook: One less pitfall.
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Jul 2012 00:44:00 +0000 (17:44 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 20 Jul 2012 00:44:00 +0000 (17:44 -0700)
basis/help/cookbook/cookbook.factor

index d95598e0f9e488af52efff5865f0865e9b9be851..081676fdb0b36720ec42e685164923397953b3d8 100644 (file)
@@ -290,7 +290,6 @@ ARTICLE: "cookbook-pitfalls" "Pitfalls to avoid"
     { "Also, " { $link dup } " and related shuffle words don't copy entire objects or arrays; they only duplicate the reference to them. If you want to guard an object against mutation, use " { $link clone } "." }
     { "For a discussion of potential issues surrounding the " { $link f } " object, see " { $link "booleans" } "." }
     { "Factor's object system is quite flexible. Careless usage of union, mixin and predicate classes can lead to similar problems to those caused by “multiple inheritance” in other languages. In particular, it is possible to have two classes such that they have a non-empty intersection and yet neither is a subclass of the other. If a generic word defines methods on two such classes, various disambiguation rules are applied to ensure method dispatch remains deterministic, however they may not be what you expect. See " { $link "method-order" } " for details." }
-    { "Be careful when calling words which access variables from a " { $link make-assoc } " which constructs an assoc with arbitrary keys, since those keys might shadow variables." }
     { "If " { $link run-file } " throws a stack depth assertion, it means that the top-level form in the file left behind values on the stack. The stack depth is compared before and after loading a source file, since this type of situation is almost always an error. If you have a legitimate need to load a source file which returns data in some manner, define a word in the source file which produces this data on the stack and call the word after loading the file." }
 } ;