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

Make third argument of DeclareRepresentation and NewRepresentation optional, and document that it and the fourth argument are (and always were) unused #4519

Merged

Conversation

fingolfin
Copy link
Member

@fingolfin fingolfin commented May 27, 2021

See the commit messages for details.

See also issues #4409 and #1042

@fingolfin fingolfin force-pushed the mh/DeclareRepresentation-args branch 3 times, most recently from be720cb to 8bff08d Compare May 31, 2021 15:50
@fingolfin fingolfin marked this pull request as ready for review May 31, 2021 15:52
Copy link
Contributor

@ThomasBreuer ThomasBreuer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the changes, and have made just one comment concerning a formulation.
Concerning the newly inserted # TODO comments:
I think they might be confusing for readers in the future.
The filters in question have not been used before, in particular they were not intended to be automatically implied by the newly created filters.

lib/type.g Outdated
## The admissible positions resp. component names of <A>super</A> need not
## be listed in <A>slots</A>.
## The optional third and fourth arguments <A>slots</A> and <A>req</A>
## are unused (and never were) only provided for backwards compatibility.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps "are (and always were) unused and only provided for backwards compatibility"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, that's much better. Fixed now

@fingolfin fingolfin force-pushed the mh/DeclareRepresentation-args branch from 8bff08d to 8a5297d Compare June 1, 2021 10:06
@fingolfin fingolfin changed the title Make 3rd argument of DeclareRepresentation and NewRepresentation optional, and other changes to those two Make the third argument of DeclareRepresentation and NewRepresentation optional, and document that it and the fourth argument are (and always were) unused Jun 1, 2021
@fingolfin fingolfin added the release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes label Jun 1, 2021
@fingolfin fingolfin changed the title Make the third argument of DeclareRepresentation and NewRepresentation optional, and document that it and the fourth argument are (and always were) unused Make third argument of DeclareRepresentation and NewRepresentation optional, and document that it and the fourth argument are (and always were) unused Jun 1, 2021
@fingolfin fingolfin force-pushed the mh/DeclareRepresentation-args branch from 8a5297d to d18d279 Compare June 1, 2021 12:09
@fingolfin
Copy link
Member Author

The reason I added those TODO comments is because without them, it feels as if some information is lost... and yeah, I know these were not implied, but I still wonder why? I guess this is the same underlying issue as in PR #4499: Why doesn't IsBlockMatrixRep not imply IsMatrix? It is genuinely unclear to me. Is it really just "purity", or a deeper thing? The argument that one might want to use IsBlockMatrixRep for something that is not a matrix doesn't strike me as convincing -- I mean, it is in the name that this is for matrices. One argument of course is that nowadays, perhaps it should be IsMatrixOrMatrixObj. But other than that?

On the other hand, we have had plenty of ranking issues (esp. with "hidden implications" disabled) because people used (and use) representations in method argument filters, unaware that these filters lack many seemingly "obvious" implications.

Anyway, I don't think this particular instance is worth arguing about a lot, so I just dropped these comments now shrug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: removal or deprecation A feature was removed or deprecated / made obsolete release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants