Migrating dmd to D?

Iain Buclaw ibuclaw at ubuntu.com
Sat Mar 2 11:37:28 PST 2013


On Mar 2, 2013 5:31 PM, "js.mdnq" <js_adddot+mdng at gmail.com> wrote:
>
> On Saturday, 2 March 2013 at 15:12:40 UTC, Iain Buclaw wrote:
>>
>> On Mar 2, 2013 3:01 PM, "SomeDude" <lovelydear at mailmetrash.com> wrote:
>>>
>>>
>>> On Saturday, 2 March 2013 at 14:47:55 UTC, David Nadlinger wrote:
>>>>
>>>>
>>>> On Saturday, 2 March 2013 at 07:16:04 UTC, SomeDude wrote:
>>>>>
>>>>>
>>>>> On Saturday, 2 March 2013 at 06:50:32 UTC, SomeDude wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Exactly. This fixed subset would be very limited in comparison to the
>>
>> full language (I can imagine something looking a bit like a smaller Go,
>> there would probably be no templates at all, no CTFE, maybe even no
>> exceptions, for instance), but would be orthogonal, completely stable in
>> terms of spec, and known to work. It could be defined for other real
world
>> usages as well, like embedding in small appliances.
>>>>>
>>>>>
>>>>>
>>>>> It would also make it easy to bootstrap the compiler on new platforms.
>>>>
>>>>
>>>>
>>>> I don't see how this would help with proting to different platofrms at
>>
>> all if you have a cross-compiler.
>>>>
>>>>
>>>> Yes, the DMD frontend currently isn't really built with
>>
>> cross-compilation in mind (e.g. using the host's floating point
arithmetic
>> for constant folding/CTFE), but once this has been changed, I don't see
how
>> the language used would make any difference in re-targetting at all.
>>>>
>>>>
>>>> You simply use another host system (e.g. Windows/Linux x86) until the
>>
>> new backend/runtime is stable enough for the compiler to self-host.
>>>>
>>>>
>>>> David
>>>
>>>
>>>
>>> And what if you *don't* have a cross compiler ? You compile the D subset
>>
>> (bootstrapper) in C and off you go (provided you have a reasonable C
>> compiler on that platform).
>>
>> I don't see how using only a subset of the language would have an effect
on
>> cross compiling or porting of a compiler self hosted in D.  Your argument
>> is lost on me some dude...
>>
>> Regards
>
>
>
>
> For the same reason that most embedded languages use C and not C++.

These aren't self hosting if they are written in another language.

Regards
-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130302/d90daf15/attachment.html>


More information about the Digitalmars-d mailing list