lann / wasm-wave

Web Assembly Value Encoding
Apache License 2.0
38 stars 6 forks source link

Feature idea: sub-tree comments #25

Open sunfishcode opened 10 months ago

sunfishcode commented 10 months ago

kdl has a comment syntax /- ("slashdash") which comment out a whole subtree. Translated into Wave, this might look like:

[
   this-is-here,

   // commented-out,

   /- also(
      "commented out!"
   ),
]

These make it easy to comment out a record field or list element or similar with a simple one-line edit.

lann commented 10 months ago

It is an interesting feature but I think it may be too unfamiliar to the (potentially) broad audience of Wasm tooling. It seems particularly odd to me that you must have (mostly-)valid syntax within a comment, making it more of a "recursive node mask" than a comment per se.