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

Consider renaming Html.pcdata to something less scary #209

Closed
loxs opened this issue Aug 16, 2018 · 6 comments
Closed

Consider renaming Html.pcdata to something less scary #209

loxs opened this issue Aug 16, 2018 · 6 comments

Comments

@loxs
Copy link

loxs commented Aug 16, 2018

We already talked with @Drup on discord. When learning tyxml, the function pcdata is quite scary, as the name implies that it is "more than just text". @Drup said that it can't be changed to text, because it clashes with a function in Svg.
Can we maybe have something like txt or content?

@vasilisp
Copy link
Contributor

The issue has come up quite a few times (#168); nobody really likes pcdata :).

content being too vague, I would go for txt or something involving text. To align ourselves with the the DOM API we should go for text_node, but we mostly use the term element (elt), so text_elt?

@Drup
Copy link
Member

Drup commented Aug 16, 2018

text_elt is a bit too long. I'm a bit annoyed by the fact that txt is so close to text.

@bobbypriam
Copy link

In ReasonReact, the function to output "just text" is called string. Is that possible with Tyxml?

@Drup
Copy link
Member

Drup commented Aug 16, 2018

@bobbypriambodo I'm a bit afraid people will think it means html_of_string and write things like string "This is <u>potato</u>".

@bluddy
Copy link

bluddy commented Aug 16, 2018

If 'text' is unavailable, my next choice would be 'txt'.

@Drup
Copy link
Member

Drup commented Oct 3, 2018

I think it's time to solve this once and for all, so let's do a emojipoll. Pick the right reaction emoji on the top right to vote.

  • 👍 txt
  • 👎 text_elt
  • 😄 string
  • 🎉 str
  • other ?

@Drup Drup mentioned this issue Oct 28, 2018
@Drup Drup closed this as completed Oct 29, 2018
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

5 participants