Commits

shl...@13c2ddb8-3aa7-4284-800b-8db07c650eef  committed a91f230

Add delegated arguments

  • Participants
  • Parent commits c3f37f4

Comments (0)

Files changed (3)

     - http://www.stonehenge.com/merlyn/UnixReview/col52.html
         - $object->new() to create a new instance.
     - Law of Demeter
+    - EEK 
+        - pass items from one subroutine to another.
+            - use objects.
+            - assign them to slots.
 
     - refactoring:
         - duplicate code.
         - long functions and methods.
-    - EEK 
-        - pass items from one subroutine to another.
-            - use objects.
-            - assign them to slots.
 
 * Link to Fomberg's Hebrew with Perl site.
 

File src/tutorials/bad-elements/index.html.wml

 
 </item>
 
+<item id="delegating_parameter_passing" h="Passing parameters in delegation">
+
+<p>
+Sometimes we encounter a case where subroutines each pass the same parameter
+to one another in delegation, just because the innermost subroutines in the
+callstack need it.
+</p>
+
+<p>
+To avoid it, create a class, and declare methods that operate on the
+fields of the class, where you can assign the delegated arguments.
+</p>
+
+</item>
+
+
 </main_list>
 
 #include "bad-elements-sources.wml"