On Fri, Jan 13, 2017 at 10:32 PM, ToddAndMargo <toddandma...@zoho.com>
wrote:

> I almost understand what you said.  What do you/they mean by
> "positional parameters"?
>

foo(1, 5, :bar)

1 and 5 are positional: what they represent can only be determined by
knowing their position in the parameter list. Which is why they're required
by default; if they could be optional, how would it know whether foo(5)
represented a missing first vs. missing second parameter?

:bar is a named parameter: it can occur anywhere, and can be meaningfully
optional because you have to name it to use it; whereas the positional
parameters can only be recognized by their position with respect to other
positional parameters.


-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to