Stream: git-cranelift

Topic: cranelift / Issue #471 Use `//` for line comments?


view this post on Zulip GitHub (Feb 28 2020 at 23:24):

alexcrichton transferred Issue #471:

Cranelift's clif files (example here) currently use ; for line comments. This is somewhat common in assembler languages, and LLVM IR, but it's not always immediately obvious for people from other backgrounds.

Using // would follow Cranelift's syntax for types v0: i32, -> i32, and so on in taking syntactic queues from Rust where it makes sense to do so. (Related: should we change function to fn? That doesn't feel as important because function is more self-explanatory there, but it's worth considering.)

// is two characters rather than ;'s one, but my intuition is that little things we can do to make IR dumps easier to approach for people not already familiar with them will end up being valuable in a variety of contexts, more so than absolute conciseness.


Last updated: Nov 22 2024 at 16:03 UTC