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
Metaop semantics with QuantHashes #47
Comments
|
FWIW, there is a simple patch to create the However, this results in the following spectest failures: |
|
First of all, sorry for the commit you had to revert. It usually really hard to get somebody to review a PR. Therefore I mostly base my decisions on spectest, docs, and related tickets. From this point of view I found nothing what would tell me not to merge it. With regard to the subject, I would say that the specs are not disabling storing of a I see no reason why say a is totally contr-intuitive and illogical. As to A little bit of related side note. While looking into rakudo/rakudo#1203 I noticed that the way |
Indeed, if I gave the impression that you could have known, I'm sorry: I didn't want to convey that.
The difference comes from
How did you do that? With the diff I posted??
Metaops are currently implemented to work, correctly. I agree there are still some significant gains to be had here. In the past, however, there has been quite a reluctance to add any specific meta-ops to the grammar / core. FWIW, I'm not entirely sure why anymore. |
|
BTW, I think the roast test reversal must not have been made. Fudged, perhaps, until the fix is in place.
No, no! I'm just telling you where the mistake came from. Nothing else. :)
I would disagree up to certain extent. For that matter
Oh, easily! Buy forgetting to I'm finishing with rakudo/rakudo#3012 and gonna give it a try again. Wonder if that's something fixable or not.
I know that BTW, I think the roast test reversal must not have been made. Fudged, perhaps, until the fix is in place. But otherwise I consider it reasonable. |
so Maps are Iterable. Iterable is just a flag that means "iterate over me when this seems appropriate". Such as with a
Well, I reverted to make sure we could get a release fast. But also because they were at the wrong place. We have separate test files for handling stuff for the various aspects of QuantHashes and set operators. And again... we have 6 similar situations, this was only fixing one of them. So if you want to create fudged tests for these, they would have to involve all of these situations. |
And you know what? I looked into why bag.t fails (got no time for others because Theo caught me sitting at airports Starbucks and we spend good time chatting to each other) and it fails because it does the right thing when The line which fails is 'one element'. But it is three now and this is good! Would I need a bag of sets I'd do The serious problem is about Now I wonder if applying
Do you have all cases collected somewhere? I took the path of closing old tickets when I can. This seems like a part of this path. |
|
We have 3 types of QuantHashes in 2 tastes: If only the tests are failing when making |
|
Ok, I misunderstood what you meant by 'cases'. Now it's clear. I investigated it deeper while being on the plane. Here is what I came to. The tests failing because of the wrong number of elements are the easiest part, obviously. Another side of the change is that in many cases multi-dispatch is now choosing Third kind of problem is flattening of a Fixes for these cases are simple but require careful analyzing. I hope that spectests cover enough cases including edge ones to make the transition as clear as possible. Hopefully, I have enough info now to start a branch for this case. |
|
So far, I cannot create As a test I moved For now I'm unsure what happens to |
The first step in implementing Raku/problem-solving#47
|
Closing because, as Jonathan reminded in #104, quant hashes are items by design. |
Basically this situation, expanded to all
QuantHashes:Note that to get this result, you need to bind the result of
(-)to%d. If you however *assign the result, you wind up with aSetHashthat contains aSetHashWhich implies, that if you want to use a metaop for this:
you wind up with a result that people find to be unexpected. But is entirely up to spec, as you should be able to put QuantHashes inside of QuantHashes. And in fact, I've used that approach for a recent Perl Weekly Challenge.
On the other hand, if we just had used hashes:
it does work as some people expect. So I guess there's something to be said for that semantic as well, since we're supposed to assume that QuantHashes are just object Hashes with a limitation on what they can have as a value.
Making metaops special case QuantHashes, feels like a bad idea to me.
Since I fear that there is code out there using QuantHashes with the current semantics, if we should decide to give QuantHashes the same semantics as object Hashes in this situation, I think we will need to make it version dependent.
The text was updated successfully, but these errors were encountered: