Skip to content

heading 'routine' definition 'method' #4560

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

Open
finanalyst opened this issue Mar 1, 2025 · 4 comments
Open

heading 'routine' definition 'method' #4560

finanalyst opened this issue Mar 1, 2025 · 4 comments
Assignees

Comments

@finanalyst
Copy link
Collaborator

finanalyst commented Mar 1, 2025

@coke @lizmat
Using search for 'isa', select in category 'Heading', takes you to class Mu
Note that the heading is 'routine', but the definition in code section is only for 'method'. Using isa(Any) generates Undeclared routine.

After thinking how it could be otherwise, this seems reasonable.

But documentation seems wrong: other headings in Mu are mixed 'method' and 'routine', so suggest changing 'routine' in heading to 'routine'.

Same is true for 'does'.

I've not raised a PR for the changes because

  1. Not sure there was some other documentation intention originally
  2. Perhaps documentation could be added by giving example of &isa with invocant ?
  3. How many more of these mismatches exist

I can make changes to isa and does after feedback about above.

@coke
Copy link
Collaborator

coke commented Mar 1, 2025

As I understand, if there are only methods or only subs, then we use that as the heading as well, and if there are both, we use 'routine'. I think that the signature test (which is mostly disabled at this point) would be the place to verify if we have one or both, and therefore if the heading is correct.

@finanalyst
Copy link
Collaborator Author

@coke In the two examples I cited, there are no sub forms documented, and trying to use one generates an error.

I thought there was a way to turn a method to a sub using an explicit invocant (for option 2). I seem to have misremembered something. So ignore option 2.

@raiph
Copy link
Contributor

raiph commented Mar 2, 2025

Interesting coincidence. I feel I should write a couple comments.

I was just reading https://github.com/Raku/doc/blob/main/writing-docs/INDEXING.md as part of an attempt to do as @tbrowder prompted here.

One of several things that threw me was this sentence:

Other than explicit creation, headers (=head elements of Pod) of certain format get an anchor automatically, say =head routine sin creates an index item categorized as Subroutines automatically.

I thought to myself that "If that's true, it's wrong and should be fixed. If it's false this 'how to contribute to the doc doc' should be fixed."

A few seconds later I saw this issue listed and thought "Hmm. That might be about the very same issue, or a related one, given its title." So I clicked. Now I'm here it really does seem to be related.

That prompted me to write this comment.

@raiph
Copy link
Contributor

raiph commented Mar 2, 2025

@finanalyst

suggest changing 'routine' in heading to 'routine'.

Not sure that'd help. 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants