[SAOC 25] improve importC weekly update 11
Emmanuel
emmankoko519 at gmail.com
Mon Dec 1 18:03:51 UTC 2025
Hi everyone,
This week, I tackled typedef little issues with type ids that are
D keywords.
I saw an issue opened
typedef unsigned int uint; After being aliased into D, it becomes
alias uint = uint;
That’s an invalid alias as uint is a D keyword. So initially I
had designed a little fix to handle it for typedefs. But I have
also noted that this issue goes beyond typedefs and must be
handled for all other identifiers that are D keywords. If you
want to use them from D, you’ll have to use them with _ appended.
So a typical one with alias becomes
alias uint_ = uint;
This will be loudly announced in docs and mentioned to the whole
D community!
More information about the Digitalmars-d
mailing list