I noticed that the arguments to the lambda are inconsistent with the problem description.
foldr (given a function, a list, and an initial accumulator, fold (reduce) each item into the accumulator from the right using function(item, accumulator));
When I pointed it out in the PR, as an OSS maintainer myself, I could think of 4 possible ways to respond:
Jeez, error indeed. Thanks for the report, we will get it fixed. Do you want to make a PR for it?
Itâs not an error, hereâs why.
Itâs an error but we are only human and donât care. There are possibly other errors too.
Itâs an error but Iâm going to pull out my maintainer hat and lock this thread. Although this is where the error was introduced, Iâm going to claim that this is not the place to discuss it.
@bruce-wayne - Maintainer here. You commented on an already closed and merged PR. Our current policy is to direct all initial contributor issues/discussions to this forum, so that answers like the one @MatthijsBlom wrote above can be provided - not only for you - but for others reading topics.
This policy is stated in our PR/Issue response messaging (see screengrab below) and in the repo README.
And as @MatthijsBlom has said, if there is an inconsistency or error, it is upstream in problem-specifications. The Python exercise syncs instructions and test data from there.
@bruce-wayne Thank you for opening a forum thread. As Iâm sure youâre aware as an OSS maintainer, different projects have different ways of working. Exercism has over 350 OSS repos, dozens of active maintainers and 100 ad hoc ones, and thousands of contributors. Weâve experimented with lots of ways of doing things here over the last decade, and have discovered that the forum works best for us right now.
So while it might feel âincorrectâ or even rude to you, please donât take offence at being redirected to a particular place, and please do respect that the Python maintainer is respecting the rules we have in place org-wide. For more of an understanding of the chaos of our GitHub universe and why we need to do things in certain ways, these are my notifications as of right nowâŚ
On to the issue at hand. @MatthijsBlom@BethanyG (and CC @IsaacG), are we sure that the issue here is in problem-specs?
It seems that the README is fixed (as per the quote from Bruce) but tracks can choose the order of their arguments (they are specified as x/y in problem specs and have the following quote as a comment from Peter Tsengâs:
I understand that some track maintainers may disagree about whether the function argument list should be represented as a string as (acc, el) or (el, acc), but I would like to say to those track maintainers that I think we are just going to have to pick one and run with it. Again, I emphasise that either way there would not be a change to the operation of foldr: The implementing track should be sure to pass the element as el and the accumulator as acc, no matter the string representation here.
I advise implementing tracks to be aware of the conventions common to their language do what makes sense for their language.
So I think two things:
It does seem to be down to the track that implements it to choose the order, and follow the natural conventions of their langauge.
I donât love that the README in problem specs takes an opinion if (1) is to hold true. I feel like the README should be made more agnostic in problem specs.
I agree that either the order should be fixed by the spec or not mentioned in the spec. Based on past discussions, it does seem as though language have a strong preference regarding the argument order. As such, I agree the specs should not mention an explicit order.
Iâm strongly in favor of removing the argument order from the spec (and maybe even going as far as calling out that the the exact argument order needs to be determined by the student or might be called out later in the docs).
in favor of removing the argument order from the spec
As a student who has done this exercise in 3 tracks, I would find this very confusing. Iâll argue that for a language that does have native support for foldr (like Haskell), the arguments must follow the order required by the language. For a language that doesnât have foldr (like Python), why not keep it consistent with the others? The language doesnât care, so, either way is fine, and only one way is consistent.
edit: sorry, wasnât meant as a reply to a specific message.
Please let us stay on-topic. This thread is about documentation and (indirectly) canonical data design, not about foldr.
(Iâm fine with discussing foldr in another thread. (Again.) I have plenty to say on the matter.)
I agree with @IsaacGâs points, and would add (hopefully to @bruce-wayneâs reassurance) that parameter order can be specified in instruction.append.mds, and that we could decide to strongly suggest or even require this.
I agree - problem specs should not mention explicit order in either the cannonical data nor the README, and tracks should implement this exercise based on their language conventions and expectations.
Edited to add
While it is off topic for this thread, I do want to mention here that this exercise on the Python track has flipped back and forth in argument order several times. The last time this happened, there was considerable debate that drained both my time and energy as a maintainer. I donât think there is a ârightâ answer to that debate, and I suspect reverting the current order will simply lead to another debate down the road when the next passionate student finds fault with it.
This exercise has had multiple questions and issues, and is in need of some concentrated TLC. I was irritated enough with the last debate I didnât enforce creating a detailed instruction append. Suffice to say it is now on my to-do list.
FWIW, the issue was only in the description.md. We canonical tests were already edited (I worked on it in the past) to change the commentary to say that the track should use whatever order makes sense for the language.
I think the PR that was (just) merged was the right way forward