tyxml icon indicating copy to clipboard operation
tyxml copied to clipboard

Ppx ideas

Open Drup opened this issue 8 years ago • 3 comments

I'm not sure those are good ideas, but we can at least think about them. :)

  • Allow to write [%html "<foo>" bar ; baz "</foo>"] instead of [%html "<foo>" [bar ; baz] "</foo>"] It's probably far too clever and irregular for its own good.
  • Allow slicing directly inside the text with some %bar syntax. [%html "<foo>%bar</foo>"] instead of [%html "<foo>"bar"</foo>"] Would be convenient to avoid constant quoting-unquoting.

Drup avatar Apr 11 '16 15:04 Drup

I think it's best to wait until people use the PPX, and complain about its syntax. Then, we can know if special-casing would be beneficial anywhere. Without user feedback, these kinds of special features only make me worried due to increased maintenance and complications to the documentation.

aantron avatar Apr 19 '16 18:04 aantron

Yes, that was exactly my plan.

Drup avatar Apr 19 '16 18:04 Drup

Quoting/unquoting regularly is quite painful imho and reduces readability a lot.

adrien-n avatar Jul 23 '19 12:07 adrien-n