tyxml
tyxml copied to clipboard
Ppx ideas
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.
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.
Yes, that was exactly my plan.
Quoting/unquoting regularly is quite painful imho and reduces readability a lot.