You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zoffixznet opened this issue
May 9, 2018
· 3 comments
Labels
bigIssue consisting of many subissuesdocsDocumentation issue (primary issue type)RFERequest for enhancement. Try to use alternative wording that explain the concept more clearly
Roughly the second half of the section is probably not clear enough for the average reader. The section even introduces the term "stored *" only to backtrack on it and try to explain that curry already happened before it.
The information doesn't give all the details when curry happens. Especially when it comes to chained Whatever stars, such as * ≥ * ≥ *, *.uc ~~ *, *.uc xx *.abs etc. In code form (and should already be fairly covered by spec) the list of what decisions are made is encoded here. I think this full information can replace the current second portion of the description.
The section should probably mention that HyperWhatever exists, considering how close the two constructs are.
00:54 | Zoffix | vrurg: it's a hardcoded list of things: https://github.com/rakudo/rakudo/blob/da646aa2ee6e3064bdef905f5c0b54b4bd0b2797/src/Perl6/Actions.nqp#L9634-L9665 there's a yet-to-be-fixed docs Issues on the topic D#2017
00:54 | synopsebot | D#2017 [open] : https://github.com/perl6/doc/issues/2017 [docs] Docs on Whatever curry could be clearer / don't cover everything
00:58 | Zoffix | `*` is "Whatever" in those comments, and an already-closurised thing is a "WhateverCode". So, for example in `*.uc.lc` => `*` Whatever => the `.uc` is a `callmethod` op, and so we make a WhateverCode => we now get to `.lc`, since `callmethod` op is level `3` in that list, we continue closing over it and make `{.uc.lc}`-equivalent closure (without the new scope). But `&infix:<~~>` is level 1, so with `*.all ~~
00:58 | Zoffix | Blah` => `.all` is callmethod op, we curry it => we get to `~~` op with WhateverCode in hands, and since `~~` is level 1, we don't curry anymore. But with `* ~~ Blah` we have a Whatever, not WhateverCode, on LHS, so we do curry the level 1 `~~` op
The text was updated successfully, but these errors were encountered:
JJ
changed the title
Docs on Whatever curry are muddy / don't cover everything
Docs on Whatever curry could be clearer / don't cover everything
May 9, 2018
JJ
added
RFE
Request for enhancement. Try to use alternative wording that explain the concept more clearly
big
Issue consisting of many subissues
labels
Jan 27, 2019
I'm trying to solve this issue, and the main problem I'm finding is that I'm not sure currying is used properly here. In general, it translates the evaluation of a function with multiple arguments to the evaluation of a sequence of functions with single arguments. That's the general idea.
In this case, I can't even see where are the placeholders for "functions" and "arguments". Whatever is a class, it it's used as a term it might make the whole construct a WhateverCode; WhateverCode is actually a functor. Functors are effectively curried when they receive arguments.
So I guess we're talking about two different processes here: when and how Whatever (or HyperWhatever) are functorized (not curried, they are not functions) and when WhateverCode is curried. Am I too far off mark?
bigIssue consisting of many subissuesdocsDocumentation issue (primary issue type)RFERequest for enhancement. Try to use alternative wording that explain the concept more clearly
Glancing at the intro section on https://docs.perl6.org/type/Whatever I notice a couple of problems.
"stored *"only to backtrack on it and try to explain that curry already happened before it.* ≥ * ≥ *,*.uc ~~ *,*.uc xx *.absetc. In code form (and should already be fairly covered by spec) the list of what decisions are made is encoded here. I think this full information can replace the current second portion of the description.Update with a couple more comments on the subject: http://colabti.org/irclogger/irclogger_log/perl6?date=2018-09-26
The text was updated successfully, but these errors were encountered: