Skip to content

Consider a different syntax for provider and name #4

@cuviper

Description

@cuviper

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions