Closed ghost closed 8 months ago
It would be nice to have, but only really the int types have an equivalent. For the PRI and SCN macros there is no equivalent way since they use raw text substitution and side-by-side string concatenation, although maybe they could be translated as c-string literals or something
@IsaacShelton Rust have macros, as powerful as the C/C++ ones! Text substitution is not something that bad. It helps generating of code at compile time and thus we can do automated code generation in some extent. Why are you so against it?
This is how they do it in Vala:
stdout.printf ("%" + uint64.FORMAT + "\n", my_uint64_var);
Correct me if I'm wrong, but Rust only has lexical macros.
Ideally we wouldn't have to rely on macros for format strings though. Also it changes based on what you link against, which Adept does not control if you link manually.
It will help translating C headers easier.