[Issue 11149] Runtime.args no longer available in static constructors.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Oct 17 22:07:33 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11149



--- Comment #10 from Martin Nowak <code at dawg.eu> 2013-10-17 22:07:20 PDT ---
(In reply to comment #9)
> > The arguments are not copied.
> 
> I'm not seeing that:
> 
Yes, the C args are copied to the D args.
But the C args themselves are not copied.
If you run a custom C main this might cause problems but
that is a programming error we don't need to fix.

Another problem is when you have a C program that links against
a D library, we don't have access to main's arguments here.

Same issue for shared libraries where providing access to main
arguments hardly makes sense.

I'm a bit annoyed by this issue because it's so obviously wrong to
provide global access to main's arguments before main gets called.
If someone wanted global access they could just copy the arguments
into a global variable.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list