#1033: no args checking for a sub without params
--------------------+-------------------------------------------------------
Reporter: coke | Owner:
Type: RFC | Status: new
Priority: normal | Milestone:
Component: none | Version: trunk
Severity: medium | Keywords:
Lang: | Patch:
Platform: |
--------------------+-------------------------------------------------------
Comment(by wagle):
I was trying to distinguish between a getter (0 args) and a setter (1
arg), and the getter was grabbing things with 1 arg, which I think is a
total error.
I understand that its a (sloppy) unix idiom to often pretend that :main
receives 1,2, or 3 args, so I could see :main setting up a complex :multi
(and/or implied .param's) for that.
Everything else is an error. Squash it now, it ain't going to get better
with time. Add a catch-all dummy .param option if you must.
By the way, my zero-arity getter was marked :multi(), making it twice the
error (?) for it to accept arity-1 calls, ESPECIALLY since there was a
arity-1 acceptor (ie, the setter) sitting there, ready.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1033#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets