From: Alexander Iljin Date: Thu, 16 Mar 2017 08:54:44 +0000 (+0300) Subject: *-docs: fix a typo in the word parametErized X-Git-Tag: unmaintained~129 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=bad5408c76d9c88fe7c24e1ddd5c7ede4b6fd1d2 *-docs: fix a typo in the word parametErized --- diff --git a/basis/furnace/actions/actions-docs.factor b/basis/furnace/actions/actions-docs.factor index edf3eb1520..88bacd2c04 100644 --- a/basis/furnace/actions/actions-docs.factor +++ b/basis/furnace/actions/actions-docs.factor @@ -134,7 +134,7 @@ ARTICLE: "furnace.actions.lifecycle" "Furnace action lifecycle" "Any one of the above steps can perform validation; if " { $link validation-failed } " is called during a POST request, the client is sent back to the page containing the form submission, with current form values and validation errors passed in a " { $link "furnace.conversations" } "." ; ARTICLE: "furnace.actions.impl" "Furnace actions implementation" -"The following parametrized constructor should be called from constructors for subclasses of " { $link action } ":" +"The following parameterized constructor should be called from constructors for subclasses of " { $link action } ":" { $subsections new-action } ; ARTICLE: "furnace.actions" "Furnace actions" diff --git a/basis/ui/ui-docs.factor b/basis/ui/ui-docs.factor index d6c9450224..292cc5456f 100644 --- a/basis/ui/ui-docs.factor +++ b/basis/ui/ui-docs.factor @@ -291,7 +291,7 @@ ARTICLE: "new-gadgets" "Implementing new gadgets" $nl "Bare gadgets can be constructed directly, which is useful if all you need is a custom appearance with no further behavior (see " { $link "ui-pen-protocol" } "):" { $subsections } -"New gadgets are defined as subclasses of an existing gadget type, perhaps even " { $link gadget } " itself. Direct subclasses of " { $link gadget } " can be constructed using " { $link new } ", however some subclasses may define their own parametrized constructors (see " { $link "parametrized-constructors" } ")." +"New gadgets are defined as subclasses of an existing gadget type, perhaps even " { $link gadget } " itself. Direct subclasses of " { $link gadget } " can be constructed using " { $link new } ", however some subclasses may define their own parameterized constructors (see " { $link "parameterized-constructors" } ")." $nl "Further topics:" { $subsections diff --git a/core/classes/tuple/tuple-docs.factor b/core/classes/tuple/tuple-docs.factor index 86bfd85da9..8695c25727 100644 --- a/core/classes/tuple/tuple-docs.factor +++ b/core/classes/tuple/tuple-docs.factor @@ -36,10 +36,10 @@ ARTICLE: "tuple-declarations" "Tuple slot declarations" "slot-initial-values" } ; -ARTICLE: "parametrized-constructors" "Parameterized constructors" -"A " { $emphasis "parametrized constructor" } " is a word which directly or indirectly calls " { $link new } " or " { $link boa } ", but instead of passing a literal class symbol, it takes the class symbol as an input from the stack." +ARTICLE: "parameterized-constructors" "Parameterized constructors" +"A " { $emphasis "parameterized constructor" } " is a word which directly or indirectly calls " { $link new } " or " { $link boa } ", but instead of passing a literal class symbol, it takes the class symbol as an input from the stack." $nl -"Parametrized constructors are useful in many situations, in particular with subclassing. For example, consider the following code:" +"Parameterized constructors are useful in many situations, in particular with subclassing. For example, consider the following code:" { $code "TUPLE: vehicle max-speed occupants ;" "" @@ -59,7 +59,7 @@ $nl " swap >>max-altitude" " swap >>max-speed ;" } -"The two constructors depend on the implementation of " { $snippet "vehicle" } " because they are responsible for initializing the " { $snippet "occupants" } " slot to an empty vector. If this slot is changed to contain a hashtable instead, there will be two places instead of one. A better approach is to use a parametrized constructor for vehicles:" +"The two constructors depend on the implementation of " { $snippet "vehicle" } " because they are responsible for initializing the " { $snippet "occupants" } " slot to an empty vector. If this slot is changed to contain a hashtable instead, there will be two places instead of one. A better approach is to use a parameterized constructor for vehicles:" { $code "TUPLE: vehicle max-speed occupants ;" "" @@ -81,7 +81,7 @@ $nl " swap >>max-altitude" " swap >>max-speed ;" } -"The naming convention for parametrized constructors is " { $snippet "new-" { $emphasis "class" } } "." ; +"The naming convention for parameterized constructors is " { $snippet "new-" { $emphasis "class" } } "." ; ARTICLE: "tuple-constructors" "Tuple constructors" "Tuples are created by calling one of two constructor primitives:" @@ -118,7 +118,7 @@ $nl "! Run-time error" "\"not a number\" 2 3 4 color boa" } -{ $subsections "parametrized-constructors" } ; +{ $subsections "parameterized-constructors" } ; ARTICLE: "tuple-inheritance-example" "Tuple subclassing example" "Rectangles, parallelograms and circles are all shapes. We support two operations on shapes:" @@ -176,8 +176,8 @@ $nl $nl "The second is to use ad-hoc slot polymorphism. If two classes define a slot with the same name, then code which uses " { $link "accessors" } " can operate on instances of both objects, assuming the values stored in that slot implement a common protocol. This allows code to be shared without creating contrived relationships between classes." { $heading "Anti-pattern #3: subclassing to override a method definition" } -"While method overriding is a very powerful tool, improper use can cause tight coupling of code and lead to difficulty in testing and refactoring. Subclassing should not be used as a means of “monkey patching” methods to fix bugs and add features. Only subclass from classes which were designed to be inherited from, and when writing classes of your own which are intended to be subclassed, clearly document what subclasses may and may not do. This includes construction policy; document whether subclasses should use " { $link new } ", " { $link boa } ", or a custom parametrized constructor." -{ $see-also "parametrized-constructors" } ; +"While method overriding is a very powerful tool, improper use can cause tight coupling of code and lead to difficulty in testing and refactoring. Subclassing should not be used as a means of “monkey patching” methods to fix bugs and add features. Only subclass from classes which were designed to be inherited from, and when writing classes of your own which are intended to be subclassed, clearly document what subclasses may and may not do. This includes construction policy; document whether subclasses should use " { $link new } ", " { $link boa } ", or a custom parameterized constructor." +{ $see-also "parameterized-constructors" } ; ARTICLE: "tuple-subclassing" "Tuple subclassing" "Tuple subclassing can be used to express natural relationships between classes at the language level. For example, every car " { $emphasis "is a" } " vehicle, so if the " { $snippet "car" } " class subclasses the " { $snippet "vehicle" } " class, it can " { $emphasis "inherit" } " the slots and methods of " { $snippet "vehicle" } "." @@ -192,7 +192,7 @@ $nl } "Declaring a tuple class final prohibits other classes from subclassing it:" { $subsections POSTPONE: final } -{ $see-also "call-next-method" "parametrized-constructors" "unions" "mixins" } ; +{ $see-also "call-next-method" "parameterized-constructors" "unions" "mixins" } ; ARTICLE: "tuple-introspection" "Tuple introspection" "In addition to the slot reader and writer words which " { $link POSTPONE: TUPLE: } " defines for every tuple class, it is possible to construct and take apart entire tuples in a generic way." diff --git a/core/destructors/destructors-docs.factor b/core/destructors/destructors-docs.factor index a6ad46ede5..700f7bdccb 100644 --- a/core/destructors/destructors-docs.factor +++ b/core/destructors/destructors-docs.factor @@ -94,7 +94,7 @@ ARTICLE: "destructors-using" "Using destructors" ARTICLE: "destructors-extending" "Writing new destructors" "Superclass for disposable objects:" { $subsections disposable } -"Parametrized constructor for disposable objects:" +"Parameterized constructor for disposable objects:" { $subsections new-disposable } "Generic disposal word:" { $subsections dispose* }