Add package.d files under core#23116
Conversation
|
Why this |
|
Ping. |
|
IIRC Walter was against doing this, I'll ask him again. Either way this needs a good justification. What real world code would benefit from this?
|
|
Just a way for people to more easily make use of all C library standard functions like |
|
Thanks @nordlow for taking the time to do this. But I have to say, this encourages sloppy programming, and just rubs me the wrong way. In my code, anyway, both C and D, I have no need for most of stdc. |
How is this sloppier than already allowed
The most important addition here
in BetterC is IMO a very useful thing. |
|
Ping. |
I don't understand this statement. The whole purpose of this PR is to have people skilled in C just be able to use most of the common C functions without having to care about in which include/import they reside. |
You said:
ImportC is dmd's C compiler. Try creating a .c file with that line in it and compile it with dmd. You will get a syntax error.
Walter has been against that as well.
Anyone can write their own utility module which publicly imports all their favorite (C) functions. But for adding features upstream, there's a high bar. You need to show that this feature is pulling its weight, "it might be useful" is not strong enough. |
|
Ahh, sorry. I meant BetterC usage. |
Even then, it's very easy to translate #include <stdio.h>
#include <stdlib.h>To import core.stdc.stdio;
import core.stdc.stdlib; |
For the sake of being able to do, for instance,
import core.stdc;in ImportC.
Shall I go forward with
core.sysaswell?