Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Conversation

@lygstate
Copy link
Contributor

Maybe open_flags and resolve_flags are better?

The comment have not mention about at, but resolved

Maybe open_flags and resolve_flags are better?
@sunfishcode
Copy link
Member

I'm not strongly attached to it, but I picked at to more closely resemble POSIX, where similar flags are called AT_*, such as AT_SYMLINK_FOLLOW. It also reflects the "at" naming of the functions that use these flags; that's something that could be mentioned in the comment. Could you say more about the relationship to oflags here?

@lygstate
Copy link
Contributor Author

I'm not strongly attached to it, but I picked at to more closely resemble POSIX, where similar flags are called AT_*, such as AT_SYMLINK_FOLLOW. It also reflects the "at" naming of the functions that use these flags; that's something that could be mentioned in the comment. Could you say more about the relationship to oflags here?

Just about the name, oflags o is shortcut for open, but atflags, at is not a shortcut, so that's not consistence

@sunfishcode
Copy link
Member

It's subjective, but to my eyes, oflags at atflags resembling O_* and AT_* flags in POSIX is more useful than being consistent about whether things are abbreviations.

Would it clarify things to rename it to at_flags, with an underscore? That would emphasize the relationship to the _at functions.

@lygstate
Copy link
Contributor Author

It's subjective, but to my eyes, oflags at atflags resembling O_* and AT_* flags in POSIX is more useful than being consistent about whether things are abbreviations.

Would it clarify things to rename it to at_flags, with an underscore? That would emphasize the relationship to the _at functions.

Oh, it's comes from posix, how about o_flags at_flags for consistence, as it's comes from resembling O_* and AT_* flags in POSIX

@sunfishcode
Copy link
Member

Oh, it's comes from posix, how about o_flags at_flags for consistence, as it's comes from resembling O_* and AT_* flags in POSIX

This looks good to me. And it happens that as part of the update to kabob case for wit-bindgen, these names are now named at-flags and o-flags, with a dash where we discussed an underscore above, but I believe preserve the spirit here.

@sunfishcode sunfishcode closed this Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants