No header files?
BCS
none at anon.com
Wed Oct 21 15:57:44 PDT 2009
Hello Yigal,
> On 22/10/2009 00:14, BCS wrote:
>
>> Hello Yigal,
>>
>>> On 21/10/2009 23:59, AJ wrote:
>>>
>>>> Since D has no header files, how does one create "a library" that
>>>> another developer can use without exposing the implementation?
>>>>
>>> D does have header files with the extension .di which can be either
>>> auto generated and/or manually edited. IMO this is a design mistake
>>> carried over from c/c++.
>>>
>> What would you prefer?
>>
>> Aside from a better library format you need something to give DMD the
>> information. Switching to a better library format has several issues
>> including requiring more tools to make them and view them as well as
>> it doesn't solve the problem of linking with C libs that don't and
>> never will use this new format. Not fatal issues I'll grant, but what
>> we have works NOW.
>>
> As you said, what is needed is a better lib format. we already have
> DDL NOW which already has most of what you described above. D can also
> take advantage of the LLVM framework.
Does DDL or LLVM work to generate monolithic executable that use all of D's
features and do so for both Win32 and *nux?
Also, can I use notepad to view either of those file types?
>
> why do you need to choose between the two options anyway? dmd can
> support c header files combined with c libs and use a better D lib
> format for D code. Another option would be to have a simple tool to
> convert a bunch of c header files and a C lib to a D lib.
Option 1 is a no starter (Walter has said NO the that exact option based
on it needing in effect a full C frontend to work) Option 2 in interesting
but, it runs flat into to "needs more tools" issue.
> The C/C++ way of headers + lib has problems which D inherited as part
> of the same (broken) design.
More information about the Digitalmars-d
mailing list