-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fwd: problem pushing pairs onto an array of pairs #4319
Comments
From @lizmatI’m sending this in as a rakudo bug because I think it is. We have confusion about what is a Pair and what is a named parameter. I see just about everybody fall into this trap. The only way I see around this, is to separate the meaning of Pair and named parameter visually as well: a => 42 # a Pair I could also see going as far as making a named parameter an Enum, or a(nother) subclass of it. Liz
|
From 1parrota@gmail.comLiz is right. If a construct causes a significant number of people to On 6/13/15, Elizabeth Mattijsen <perl6-bugs-followup@perl.org> wrote:
|
The RT System itself - Status changed from 'new' to 'open' |
From @MARTIMMOn 06/13/2015 04:06 PM, Elizabeth Mattijsen (via RT) wrote: Hi,
|
From @jnthnOn Mon Jun 15 06:12:13 2015, mt1957@gmail.com wrote:
Methods ignoring unknown named parameters has been discussed many times over the years. The reason they do so is to properly support deferral to base classes, which may not know how to handle options that subclasses add. We've seen practical use of this, and I believe there's even an outstanding ticket that's a result of NQP's methods failing to do this (when we delegate to an NQP method from a Perl 6 one in Grammar.parse, if I recall correctly). In general, methods are late bound and flexible, subs are compile-time-bound and more restricted. So methods being more forgiving over unknown named parameters fits the pattern. More notably, nobody in the years of discussion on the topic has proposed a viable alternative that keeps deferral working. You can't do it with a static analysis because the place you need the ignoring to happen it is in the target of a deferral, and that could be any method. There's no sensible way I can see to track usage of the nameds down the call stack (defining "usage" is hard enough, and even then I suspect the performance implications would not be pretty). In summary, there's a design trade-off here, and we've come down on the side of "let's make inheritance useful". Thus, ticket rejected. /jnthn |
@jnthn - Status changed from 'open' to 'rejected' |
Migrated from rt.perl.org#125400 (status was 'rejected')
Searchable as RT125400$
The text was updated successfully, but these errors were encountered: