On Monday, 25 October 2021 at 07:49:44 UTC, user1234 wrote:
in addition to the other answers, there's also the parameters
of main:
Also, all programs running under the D runtime have special
command line arguments(`--DRT` arguments). The Runtime needs to
be able to parse those arguments at
On Monday, 25 October 2021 at 07:49:44 UTC, user1234 wrote:
so with the D main you're directly in the the D "domain". In
theory from that point, you don't need to ever use `strlen` for
example.
Not just that, but you shouldn't use it at all, rather you can't
use it!
You might be able to
On Friday, 22 October 2021 at 05:54:21 UTC, Kirill wrote:
I am not a compiler expert, but I genuinely would like to know
why we have Dmain.
I've been looking at the generated assembly code recently and
noticed the _Dmain function. I didn't notice it before. Then
there is main, where Dmain is
On Friday, 22 October 2021 at 09:01:53 UTC, Kagamin wrote:
Actually C runtime is many megabytes in size.
A couple of samples:
$ wc -c /usr/lib/libc-2.33.so
2150424 /usr/lib/libc-2.33.so
% wc -c /lib/libc.so.7
1981952 /lib/libc.so.7
I would hardly call two megabytes 'many'.
Actually C runtime is many megabytes in size.
On Friday, 22 October 2021 at 07:00:25 UTC, Mike Parker wrote:
The entry point for your program is a function `_start`. That's
implemented in the C runtime, which all D programs depend on.
It in turn calls `main`, as it does for C and C++ programs.
It is possible, in both C and D, to write
On Friday, 22 October 2021 at 07:00:25 UTC, Mike Parker wrote:
[...]
Thank you for such a clear explanation Mike and for a quick reply!
On Friday, 22 October 2021 at 05:54:21 UTC, Kirill wrote:
I am not a compiler expert, but I genuinely would like to know
why we have Dmain.
I've been looking at the generated assembly code recently and
noticed the _Dmain function. I didn't notice it before. Then
there is main, where Dmain is