Optional parameters: Difference between revisions

Content added Content deleted
(Slate implementation)
(Explained Slate's implementation)
Line 354:
 
=={{header|Slate}}==
In Slate, named optional parameters may be specified in the method signature, but not defaults, so there is a macro <tt>defaultsTo:</tt> for specifying that within the method body at run-time.
<lang slate>
s@(Sequence traits) tableSort &column: column &sortBy: sortBlock &reverse: reverse