Skip to content
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

type-graph.txt: what is it good for? #2584

Open
JJ opened this issue Jan 20, 2019 · 6 comments
Open

type-graph.txt: what is it good for? #2584

JJ opened this issue Jan 20, 2019 · 6 comments
Labels
big Issue consisting of many subissues meta RFCs, general discussion, writing style, repository organization, etc.

Comments

@JJ
Copy link
Contributor

JJ commented Jan 20, 2019

The problem

type-graph.txt was created 7 years ago as a

human- and computer-parseable map of Perl6's type graph

From them on, it's outdated both ways and I don't really see the need for it, since there's introspection both into the classes and into the roles (although there might be some problem with NQP roles, it's not unsurmountable, I think).

Suggestions

As part of the redesign of the documentation system #2542 (see also this), we should consider getting rid of it and populate Perl6::Type (#2573) by using the metamodel entirely.

@JJ JJ added big Issue consisting of many subissues meta RFCs, general discussion, writing style, repository organization, etc. labels Jan 20, 2019
@finanalyst
Copy link
Collaborator

Whilst I find the Type Graphs in the documentation to be pretty, I have never found them useful. I could not work out what to do with them. However, I could see a use for them.

If I could trace in which class some function come, eg. is lc defined in Str or Cool or Mu (I am not trying to be correct here, just illustrative. If this could be done by hovering the mouse over a Type diagram, it would be useful.

Also I have found that some graphs are so small as to be almost meaningless, whilst others are so large that it is difficult to read everything.

My suggestion is to eliminate the TypeGraphs from the documentation system until a better way of achieving the aim of increasing clarity has been demonstrated.

@AlexDaniel
Copy link
Member

I use them.

For example: “uhhh, what was that role related to numbers?”. Boom:

image

OK, Real and Numeric. Very clear.

@JJ
Copy link
Contributor Author

JJ commented Jan 23, 2019 via email

@moritz
Copy link
Collaborator

moritz commented May 3, 2019

I think one of the original reasons not to use introspection was that we might want to hide some details from the users, like for example NQPMatchRole that is mixed into Match.

If we switch to introspection, we need at least some form of customization for it. If we have that, I have no problem with getting rid of it.

@moritz moritz changed the title Type Graph: what is it good for? type-graph.txt: what is it good for? May 3, 2019
@JJ
Copy link
Contributor Author

JJ commented May 4, 2019

@moritz we could achieve that with on-line blacklists instead of an off-line whitelist; that is, customization as you say.

@JJ
Copy link
Contributor Author

JJ commented May 4, 2019

This is included now in the document metadata proposal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
big Issue consisting of many subissues meta RFCs, general discussion, writing style, repository organization, etc.
Projects
None yet
Development

No branches or pull requests

6 participants