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

P0492R2 makes dot and dot-dot no longer grammarterms #1527

Closed
jwakely opened this issue Mar 9, 2017 · 6 comments
Closed

P0492R2 makes dot and dot-dot no longer grammarterms #1527

jwakely opened this issue Mar 9, 2017 · 6 comments
Assignees
Milestone

Comments

@jwakely
Copy link
Member

jwakely commented Mar 9, 2017

Following the changes to the generic path grammar ([path.generic]) the special filenames dot and dot-dot are no longer grammar terms, but are simply defined terms in [fs.def.filename]. (In terms of the grammar they are covered by the filename production.)

Throughout the clause we use \grammarterm{dot} and \grammarterm{dot-dot} to give them a special appearance. Should we use \term instead? Should they only be italicized on their first definition? (IMHO that would make the specification unclear, even though it's consistent with how we present other defined terms).

@zygoloid
Copy link
Member

zygoloid commented Mar 13, 2017

Why do we need these terms at all? Instead of

If the last filename is dot-dot, remove any [...]

we could say

If the last filename is .., remove any [...]

I think that's what we'd do in the core wording in a case where we care about the particular spelling of a terminal. Though we may want some kind of typographical convention to make it more obvious that the comma is not part of the filename.

@jensmaurer
Copy link
Member

@zygoloid: Well, in [expr.ref], we sometimes put "(dot)" after . because it's so easy to confuse the operator with prose-level punctuation. And [expr.comma] only talks about "comma operator", never spelling , in prose text. Using "dot-dot" (as a \grammarterm) seems less susceptible to confusion.

@burblebee
Copy link
Contributor

I also like the abstraction dot and dot-dot provide, in case some other OS had a similar grammar but used different tokens.

@jwakely
Copy link
Member Author

jwakely commented Mar 14, 2017

in case some other OS had a similar grammar but used different tokens.

They are pathnames in the generic pathname format, which is platform-agnostic. An OS can use different things for the same concepts (or have no way to represent them at all), but a pathname in the generic format still has to recognise . and .. with the established meaning.

@jwakely
Copy link
Member Author

jwakely commented Mar 14, 2017

So maybe we should just introduce them with \term and stop italicising them after the first definition.

@jensmaurer
Copy link
Member

@jwakely: Fine with me.

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