template statistics

Stanislav Blinov stanislav.blinov at gmail.com
Fri Jun 5 09:17:28 UTC 2020


On Thursday, 4 June 2020 at 09:10:06 UTC, Jacob Carlborg wrote:
> On Wednesday, 3 June 2020 at 14:58:59 UTC, Stanislav Blinov 
> wrote:
>
>> A good `writeln` would not call into C  at all.
>
> What would it do then? Call syscalls in the kernel directly? 
> That's more or less only supported on Linux. It's definitely 
> not supported on macOS. You can do it, but it's not supported 
> and make break at any time. Go used to do that, something broke 
> for them and now they're going through the C wrappers.

Going through the system's library to *make syscalls*, yes. 
Obviously I'm presenting an idealized case. If you can't sustain 
direct interop with the OS to maintain compatibility, then yes, 
while unfortunate, you'd use what you have to. But that is a far 
cry from unconditionally routing your stdout through FILE*.
The situation with Mac only highlights how infectuous C actually 
is. And Linux is only slightly better, to be honest.


More information about the Digitalmars-d mailing list