Larry Wall skribis 2005-10-26  6:44 (-0700):
> I should point out that one of the major changes in the most recent
> S6 is that named arguments are now marked by : rather than +, with
> :foo($bar) being the way to declare parameter $bar but give it the
> external name of "foo".  A + is now reserved to mark mandatory
> parameters, though it's redundant on positionals.  A mandatory
> named parameter is now marked +:$nonoptionaloption.

If optional parameters get "?", then why don't give mandatory parameters

Or, if you wish: if mandatory parameters get "+", then why do optional
parameters not get "-"?

# The mandatory/optional thing could even be postfix, which results in
# clearer code than the stacked "+:$":
#     sub foo ($this!, $is!, :$mandatory!, $optional?, $really?)

I do like the s/+/:/ change, though!


Reply via email to