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

Explain the compat workflow for functions #827

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gdalle
Copy link

@gdalle gdalle commented May 4, 2024

It may be silly but I spent quite some time trying to make @compat stack([x, y]) work whereas all I needed was Compat.stack([x, y])

@martinholters
Copy link
Member

I'm a bit confused because after using Compat, all of the following should work:

stack([x, y])
Compat.stack([x, y])
@compat stack([x, y])

That said, it may make sense to clarify that @compat is mostly for syntax changes and new functions/methods are just made available by Compat. However, your addition is inserted right before "wherever you want to use syntax that differs", but it's actually not about syntax. Maybe I'm too picky? Would appreciate others to chime in.

@gdalle
Copy link
Author

gdalle commented May 6, 2024

I'm a bit confused because after using Compat, all of the following should work:

Maybe but the only thing that is mentioned on the README is the macro @compat, and since I qualify all my exports, I only did

using Compat: @compat

That said, it may make sense to clarify that @compat is mostly for syntax changes and new functions/methods are just made available by Compat.

Exactly, that's the part I had not understood.

However, your addition is inserted right before "wherever you want to use syntax that differs", but it's actually not about syntax.

I'll modify the phrasing

Copy link
Member

@martinholters martinholters left a comment

Choose a reason for hiding this comment

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

Ok with me, but I'd really appreciate others' opinions.
(And sorry for the delay.)

@gdalle
Copy link
Author

gdalle commented May 21, 2024

No worries about the delay. As for the PR, I always welcome more opinions but I feel like it is a relatively low-stakes addition to the docs, so perhaps they are not necessary for merging?

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

Successfully merging this pull request may close these issues.

None yet

2 participants