Skip to content

C API: EvalState -> nix_eval_state? #10434

@roberth

Description

@roberth

Is your feature request related to a problem? Please describe.

After using the bindings a bit, I've noticed that we currently have a mix of CPlusPlusLike identifiers and nix_c_api_identifiers for types.

Maybe the rule is that types with a direct C++ equivalent reuse that name? Even then it's probably not consistent now, and too arbitrary, as the C++ code can change over time.

My apologies if this has already been discussed.

Describe the solution you'd like

Switch to snake case for all types? E.g. nix_eval_state, nix_store_path, ...

We could add deprecated typedefs to help the existing bindings switch without breaking them.

Describe alternatives you've considered

  • Leave as is -> confusing

  • Change to CamelCase like the C++ code -> iirc we decided against this, so that it's obvious which API is used

Additional context

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c apiNix as a C library with a stable interfacefeatureFeature request or proposalquestion

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions