Is using attributes and not extension nodes the right way?
If an extension is not activated by some reason, perhaps by mistake, normalization will not happen, which can lead to extremely hard to find bugs.
If this is to remain a ppx, certainly. The aim here was more to try to imagine what a compiler integration could look like (one can dream).
Sligthly related to #1.
Certainly it should be attributes? I'm afraid I don't follow you here. Why would it not be safer to use extension nodes?
Certainly it should be attributes?
Don't know. Frankly to me the differences between attributes and extension points is not very clear (neither is the manual about that, I remember @gasche having a more clear definition of the distinction between the two but I can't find the quote again). But I have the impression that you wouldn't want extensions points to become part of the language. The syntax is also a little bit heavier in my opinion, though perhaps more clear w.r.t. #1.
Why would it not be safer to use extension nodes?
Didn't pretend that. But if these annotations become part of the language the point is moot.
Oh I see. The difference is that attributes are ignored by the compiler, whereas extension nodes cause a syntax error. So in absence of the corresponding -package, a solution with attributes would silently exhibit wrong behavior, but with extension nodes, it would be a compile error.
Not sure about syntax being heavier: "foo" [@u.nfc] vs [%u.nfc "foo"]. Same number of characters, even.
It's true that, in case this becomes a part of the language, the point about forgetting -package becomes moot, though. You still need to watch out for older OCaml versions, but that's much easier.