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
Many methods in Any docs are wrong #1731
Comments
|
If I can be of help, do assign me some issue. Are you working on this? |
Not me, no. |
|
OK, I'll try to have a look at it then. |
This addresses @zoffixznet first concern in #1731
|
However, there is still a problem, and that is my usual concern with examples, in that they do not reflect a real use case. Using a class name like |
Now that I've read item 2 of @zoffixznet's list, I see that what I've said for the first item is wrong. Hope it's OK now. Refs #1731
Removes the related TODO item. Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
Documentation comes from the source of Any shipped with Rakudo version 2017.11 built on MoarVM version 2017.11 See issue #1731
Apparently there is no method reduce in Any:
Any.reduce;
Cannot resolve caller reduce(Any: ); none of these signatures match:
($: &with, *%_)
This should not hurt, since reduce was marked as a TODO item.
Documentation comes from the source of Any shipped with
Rakudo version 2017.11 built on MoarVM version 2017.11
See issue #1731
Apparently there's no any method produce:
> Any.produce
Cannot resolve caller produce(Any: ); none of these signatures match:
($: &with, *%_)
This should not hurt, since the method was marked as a TODO item.
Documentation comes from the source of Any shipped with
Rakudo version 2017.11 built on MoarVM version 2017.11
See issue #1731
|
Great work, @fluca1978 |
As of moar source code 2017-12. See issue #1731
See issue #1731. Documentation as of source moar-2017-.12.
See issue #1731. As of source code in moar-2017.12.
See issue #1731. As of source code from moar-2017.12.
|
Reopening this, since many examples still document what happens if you call the method on |
|
In some cases, those methods are described again where they make sense (in |
Eliminates the class example, and adds pointers. Refs #1731
Eliminates the class example, and adds pointers. Refs #1731
Eliminates the class example too; refs #1731
|
Reopen to address #2675 |
Many, if not most, methods in
Anydocs are either slightly wrong or are outright completely invalid.Briefly scanning the docs I see these issues:
"Treats the Any as a 1-item list"— many methods mention this, however the actual behaviour is theAnygets coerced to a list using.listmethod, which is a 1-item list ifAny.listis used, but some types implement their own.list. For example^10 .combinationswould treat thatRangeas a list, but the docs suggest theRangewould become a single item"Coerce the invocant first to a List"— the actual coercion for many methods is to a "list" (lowercase), using.listmethod which can give anyPositional"Returns an empty List."/"Returns Any."/ etc. — this is the "completely invalid" category. Some methods like.pairs,.antipairs, and.kvseem to document observed behaviour for anAnytypeobject rather than what the methods actually do. Yes,Any.pairsreturns an empty list, but the behaviour forAny:Dis to coerce to.listand then call.pairson the result.values.There may be more issues and my suggestion would be to look through all the methods to ensure they contain valid information.
The text was updated successfully, but these errors were encountered: