The current syntax is:
probe!(provider, name)
probe!(provider, name, arg1, ...)
A few people in the Rust PR and on Reddit mentioned that the provider and name are a little confusing. They both need to follow identifier rules, but they don't actually relate to any value in the surrounding code. Compare that to the arguments which do have to be valid expressions.
It's pretty trivial to tweak this, but I want to be sure I'm actually making it better first. The best option I've thought of so far, with some similarity to how tools use them, is to separate provider and name with a colon, like:
probe!(provider : name)
probe!(provider : name, arg1, ...)
This way they still look like bare identifiers, but there's a visual cue that something unusual is going on.
The current syntax is:
A few people in the Rust PR and on Reddit mentioned that the provider and name are a little confusing. They both need to follow identifier rules, but they don't actually relate to any value in the surrounding code. Compare that to the arguments which do have to be valid expressions.
It's pretty trivial to tweak this, but I want to be sure I'm actually making it better first. The best option I've thought of so far, with some similarity to how tools use them, is to separate provider and name with a colon, like:
This way they still look like bare identifiers, but there's a visual cue that something unusual is going on.