Tango 0.96 beta2 released
Sean Kelly
sean at f4.ca
Tue Mar 20 12:01:07 PDT 2007
Frits van Bommel wrote:
> Sean Kelly wrote:
> [talking about std/c/stdarg.di]
>> I'd considered moving it somewhere else entirely (gcc, perhaps) and
>> just naming the module std.c.stdarg internally, but I have no idea if
>> that would work with the way intrinsics are handled in GDC. If you're
>> inclined to try this and it works, however, please let me know. If
>> this becomes a long-term fix I may also look into having GDC install
>> them as you suggest. I'll admit I'm still secretly hoping to not have
>> to maintain 'std' to support intrinsics forever.
>
> Doesn't seem to work. Apparently it needs to be imported as std.c.stdarg
> for it to work...
>
> Maybe you guys should talk to the compiler developers and suggest a more
> movable way to mark special modules.
> Perhaps a pragma:
> ---
> version(CompilerSource) pragma(magic_module, c_stdarg);
> ---
> (with CompilerSource in [GNU, DigitalMars])
>
> That sort of thing is what pragmas were intended to do, wasn't it?
> (From http://www.digitalmars.com/d/pragma.html: "Pragmas are a way to
> pass special information to the compiler and to add vendor specific
> extensions to D.")
A pragma is a good idea. That seems like it might allow for a clean
separation between library design and compiler implementation, whether
the library is Phobos, Tango, or something else entirely. In fact,
there are some intrinsics Tango isn't taking advantage of simply because
the hardcoded module names are too much of a bother in some cases. For
example, DMD provides intrinsics for some of the functions in std.math.
Sean
More information about the Digitalmars-d-announce
mailing list