Hitchikers Guide to Porting Phobos / D Runtime to other architectures

Sean Kelly sean at invisibleduck.org
Fri Jan 10 10:35:21 PST 2014


On Friday, 10 January 2014 at 07:32:49 UTC, Jacob Carlborg wrote:
> On 2014-01-10 01:02, Sean Kelly wrote:
>
>> Because of this clause from the Boost license page:
>>
>> "The conceptual interface to a library isn't covered. The
>> particular representation expressed in the header is covered, 
>> as
>> is the documentation, examples, test programs, and all the 
>> other
>> material that goes with the library. A different implementation
>> is free to use the same logical interface, however. Interface
>> issues have been fought out in court several times; ask a 
>> lawyer
>> for details."
>>
>> I suspect that an automatic translation might be subject to the
>> "representation" issue, while a manual rewrite should not.
>
> I see, that sucks :(. I guess this is a fine line since you 
> very well could en up with the same result of a manual and 
> automatic translation.

Yeah, this is also one reason why I chose the header format I
did.  It works directly from the spec and so imposes a structure
of its own rather than inviting direct ports of existing headers.
   But I'm really just guessing here, since I don't have any legal
background.

One issue I'm not sure about regarding automatic translation
(assuming this is deemed acceptable).  Say you're trying to
translate pthread.h on a Posix system.  The declarations for that
file might be required to live in sys/types.h, but in actuality
live in a smattering of files in other locations (usually
bits/whatever) all selected by a pretty complex chain of
preprocessor conditions.  If we were to do an automatic
translation, how would this all work?  One thing I like about the
current approach is that the result is succinct and legible,
despite requiring more work to generate.


More information about the Digitalmars-d mailing list