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

Text formats are for people #505

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Text formats are for people #505

wants to merge 7 commits into from

Conversation

martinthomson
Copy link
Contributor

@martinthomson martinthomson commented Jul 16, 2024

Draft

Closes #453.


Preview | Diff

Copy link
Contributor

@hober hober left a comment

Choose a reason for hiding this comment

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

Looks good to me.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved

People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
Copy link
Member

Choose a reason for hiding this comment

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

This is not about comprehensibility, but ease of editing / error prevention.

Might be good to link to the robustness principle somewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I literally wrote an RFC that says that the robustness principle harms interoperability: https://www.rfc-editor.org/rfc/rfc9413.html

I have friends who like to troll me with the phrase "Postel was wrong", but I'm guessing that didn't know :)

Either way, I think that this would be a mistake for the reasons stated in that document (see this bit). I think that your point about this being an example is a good one though. I've suggested something below.

Comment on lines +600 to +602
People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
Syntactic [robustness](https://en.wikipedia.org/wiki/Robustness_principle)
typically improves the usability of textual formats.
If user intent is unambiguous, flexibility in whitespace, quoting, delimiters, and other syntactic elements
makes the syntax less error-prone and creates a more pleasant editing experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
People expect some amount of flexibility in terms of how their edits are processed.
Clearly defining syntactic flexibility--
such as in white space, quoting, or delimiters--
could ensure that content is both easy to edit and produces consistent results.

index.bs Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
@hober
Copy link
Contributor

hober commented Jul 19, 2024

I think it might be worth adding a sentence linking this principle to EWP §2.10 The web is transparent. Something along the lines of this old blog post from Edd Dumbill:

This is one reason that people prefer RELAX NG over XML Schema, for instance. Where markup is concerned, it turns out that the excuse "only computers will read it, and we'll provide tools to generate it" doesn't cut it. The web's had a view-source mentality since it started, and the aesthetics of markup matter a great deal.

That is to say, we operationalize 2.10's We will always make sure it is possible to determine how a web application was built and how the code works by making textual formats easy for humans to read and write.

@LeaVerou
Copy link
Member

LeaVerou commented Aug 2, 2024

I was just reminded of this PR after reading this comment in the csswg repo.

I think we should actually remove the specific guidance this currently has like:

Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures that content is still comprehensible.

Adding specific guidance in there muddles the core point of the principle, which is to consider human users and not design syntaxes that you expect to be consumed entirely by tooling. WRT what to do to make the syntax easier for humans, that is literally what the whole Design Principles document is for!

Specific guidance implies scope, it implies that if you do these things mentioned here, you've complied with the principle. This is a higher level principle, we can't possibly list all the ways that a syntax is human-unfriendly in there.

That said, we could perhaps list syntax flexibility as an example. But it's far from the only one, or even a core one. E.g. the SVG path syntax is actually quite flexible syntactically, but is dreadful for humans.

Co-authored-by: Lea Verou <[email protected]>
index.bs Outdated Show resolved Hide resolved

People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I literally wrote an RFC that says that the robustness principle harms interoperability: https://www.rfc-editor.org/rfc/rfc9413.html

I have friends who like to troll me with the phrase "Postel was wrong", but I'm guessing that didn't know :)

Either way, I think that this would be a mistake for the reasons stated in that document (see this bit). I think that your point about this being an example is a good one though. I've suggested something below.

index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved
index.bs Show resolved Hide resolved
Comment on lines +600 to +602
People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
People expect some amount of flexibility in terms of how their edits are processed.
Allowing flexibility in whitespace, quoting, delimiters, and other syntactic elements ensures
that content is still comprehensible.
People expect some amount of flexibility in terms of how their edits are processed.
Clearly defining syntactic flexibility--
such as in white space, quoting, or delimiters--
could ensure that content is both easy to edit and produces consistent results.

index.bs Show resolved Hide resolved
Co-authored-by: Martin Thomson <[email protected]>
index.bs Outdated Show resolved Hide resolved
LeaVerou and others added 2 commits August 2, 2024 16:35
Co-authored-by: Martin Thomson <[email protected]>
Co-authored-by: Martin Thomson <[email protected]>
<h3 id=text-formats>Design textual formats for people</h3>

Design textual formats that can be easily produced and consumed by people.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
Textual formats also improve [transparency](https://www.w3.org/TR/ethical-web-principles/#transparent).

Co-authored-by: Lea Verou <[email protected]>
Copy link
Contributor

@hober hober left a comment

Choose a reason for hiding this comment

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

👍

@hober
Copy link
Contributor

hober commented Aug 20, 2024

👍

whoops, this was just a review of a one-line change mt proposed.

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.

New principle: Text-based syntaxes should be designed to be usable by humans
4 participants