[OT] Re: Targeting C

Brad Roberts braddr at bellevue.puremagic.com
Fri Oct 23 15:01:54 PDT 2009


On Fri, 23 Oct 2009, Ary Borenszweig wrote:

> Andrei Alexandrescu wrote:
> > Steven Schveighoffer wrote:
> > > On Fri, 23 Oct 2009 12:50:34 -0400, Andrei Alexandrescu
> > > <SeeWebsiteForEmail at erdani.org> wrote:
> > > 
> > > > > What does iota mean?
> > > > 
> > > > http://www.digitalmars.com/d/2.0/phobos/std_range.html#iota
> > > > 
> > > > Irony minded. I'm destroyed.
> > > 
> > > Hm... this is slightly off topic, but that function signature is
> > > absolutely horrendous (in fact, I thought you linked to the wrong place at
> > > first).  Isn't there any way to avoid putting half the type construction
> > > as the return value?  Do all range-creating functions suffer from this
> > > problem?  Maybe it's just a ddoc problem.
> > 
> > I wanted to use auto, but ddoc cannot document functions with auto returns.
> 
> Is it too hard to fix that? I think ddoc works before the semantic pass so the
> return type is null by then, but it isn't very hard to see a "if type.next !=
> null" in the source code...
> 
> I say it because I also find horrendous the signature. And what's more, it's
> hard to find the word "iota" there.
> 
> I also think "iota" is an awful name for that function.

It'd be really sweet if someone stepped up to work on ddoc with the same 
gusto that Don has been on other parts of DMD.

IMHO, without having done enough code study, ddoc should be split off into 
a separate executable that shared the first stages of DMD.  I'm not sure 
that'd help it act different where it needs to act different, but it'd 
certainly be an interesting exercise to get more data about how re-usable 
parts of DMD are.  Alternatively, it'd also be interesting to explore 
making it _really_ separate and use the new -X output and build docs 
completely off that.

Later,
Brad




More information about the Digitalmars-d mailing list