Thread overview
Re: D Cross Compiler
Apr 13, 2011
Iain Buclaw
Apr 13, 2011
Iain Buclaw
April 13, 2011
On 14/04/11 5:00 AM, d.gnu-request@puremagic.com wrote:
> Date: Wed, 13 Apr 2011 16:12:13 +0000 (UTC) From: Iain Buclaw
> <ibuclaw@ubuntu.com> == Quote from Brendan Simon (eTRIX)
> (brendan.simon@etrix.com.au)'s article
>> > Can D be used in low-level drivers for Linux or other RTOS (e.g.
>> > freertos) ??
> D is not really suitable for a freestanding environment. Especially if you intend to use any non-POD features of the language (C++ has the same problem too).
POD ??  Not sure what you mean here.  I searched wikipedia.  Is it "Plain Old Data" as in standard C data types and structures ??

So is it possible to use D in a limited capacity for a bare-metal, or low-level (rtos/kernel, driver) environment ??

Is D suitable for developing code for high speed Network Routers, Robot Controllers, etc ??

If not, it sounds like it is more suitable for host applications (guis, web/network service apps, etc).

Thanks, Brendan.

April 13, 2011
== Quote from Brendan Simon (eTRIX) (brendan.simon@etrix.com.au)'s article
> On 14/04/11 5:00 AM, d.gnu-request@puremagic.com wrote:
> > Date: Wed, 13 Apr 2011 16:12:13 +0000 (UTC) From: Iain Buclaw
> > <ibuclaw@ubuntu.com> == Quote from Brendan Simon (eTRIX)
> > (brendan.simon@etrix.com.au)'s article
> >> > Can D be used in low-level drivers for Linux or other RTOS (e.g.
> >> > freertos) ??
> > D is not really suitable for a freestanding environment. Especially if you intend to use any non-POD features of the language (C++ has the same problem too).
> POD ??  Not sure what you mean here.  I searched wikipedia.  Is it
> "Plain Old Data" as in standard C data types and structures ??
> So is it possible to use D in a limited capacity for a bare-metal, or
> low-level (rtos/kernel, driver) environment ??

Yes an no for the same reasons C++ is suitable for such a task.

It probably *could* be done (see the XOMB exo-kernel project), but requires you implement a bespoke runtime, not use the one that comes bundled with DMD/GDC.
April 13, 2011
== Quote from Iain Buclaw (ibuclaw@ubuntu.com)'s article
> == Quote from Brendan Simon (eTRIX) (brendan.simon@etrix.com.au)'s article
> > On 14/04/11 5:00 AM, d.gnu-request@puremagic.com wrote:
> > > Date: Wed, 13 Apr 2011 16:12:13 +0000 (UTC) From: Iain Buclaw
> > > <ibuclaw@ubuntu.com> == Quote from Brendan Simon (eTRIX)
> > > (brendan.simon@etrix.com.au)'s article
> > >> > Can D be used in low-level drivers for Linux or other RTOS (e.g.
> > >> > freertos) ??
> > > D is not really suitable for a freestanding environment. Especially if you
intend
> > > to use any non-POD features of the language (C++ has the same problem too).
> > POD ??  Not sure what you mean here.  I searched wikipedia.  Is it
> > "Plain Old Data" as in standard C data types and structures ??
> > So is it possible to use D in a limited capacity for a bare-metal, or
> > low-level (rtos/kernel, driver) environment ??
> Yes an no for the same reasons C++ is suitable for such a task.

s/suitable/unsuitable/  :)