xdc: A hypothetical D cross-compiler and AST manipulation tool.
Chad Joan
chadjoan at gmail.com
Tue Nov 12 06:14:17 PST 2013
On Tuesday, 12 November 2013 at 05:49:23 UTC, Andrei Alexandrescu
wrote:
> On 11/11/13 5:53 PM, Chad Joan wrote:
>>
>> What would you suggest as an alternative for targeting
>> disparate
>> hardware like microcontrollers (ALL of them), newly released
>> game
>> consoles, and legacy platforms that could use D for migration
>> tools
>> (like OpenVMS on IA64)?
>>
>> Oh, and I want instantaneous release times. I need to be able
>> to stick
>> the compiler on a machine it has NEVER seen and say, "Use POSIX
>> libraries to fulfill Phobos' deps. Use reference counting.
>> DO WORK!".
>> Or maybe I would say, "Ditch Phobos, we in da sticks. Use
>> reference
>> counting. GOGOGO!" And I want to be running my D program 5
>> minutes later.
>>
>> Let me initially dismiss these:
>> LLVM: not /everywhere/ yet, and missing on many of the targets
>> I mentioned.
>> C--: also not everywhere; this is the first I've heard of it.
>> Java/Javascript/.NET: Actually also good backends, but a
>> different
>> ecosystems.
>>
>> Thus, I suggest that C is an AWESOME backend (with C++ for
>> exceptions,
>> but ONLY if it's available). Destroy :)
>
> Fine with me. I have no stake in this. I don't see how you
> reach the conclusion that C is "awesome" given it makes
> exceptions tenuous to implement. It does have the advantage of
> being universally available. If that's everything you need,
> sure.
>
> Andrei
I call it "awesome" because you seem to have objections to the
whole notion, and your objections are usually very interesting.
So I'm just pulling your chain in the hopes that you bestow
insights on me :)
Honestly, I look forward to being able to implement exception
handling in C! It sounds like a fun couple coding sessions
waiting to happen. I already did it with C macros, so giving me
an entire code generator to work with might make it /too/ easy.
And it scratches an itch that current compiler's can't (well,
maybe LDC is catching up).
Perhaps this is just the difference between choosing a good IR
(which C is not) and choosing a good compilation target (where C
is needed).
More information about the Digitalmars-d
mailing list