Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.

From: Pierre Habouzit <[email-masked]>
Date: Fri, 07 Sep 2007 22:56:04 +0200

On Fri, Sep 07, 2007 at 08:40:56PM +0000, Walter Bright wrote:
> Pierre Habouzit wrote:
> >And for that bit-fields are
> >a really really fast and simple way to describe things.
>
> I should point out that inline functions are inlined, and there is no 
> speed difference in the result.

  I know that, and that's why I said I was totally fine with the
bitfield notation to be only syntactic sugar on a template thingy if
that's the simplest way to have that it's OKay.

> >  Not to mention that the usual C idiom:
> >  union {
> >    unsigned flags;
> >    struct {
> >      // many bitfields
> >    };
> >  };
> >  Would need an explicit copy_flags(const my_struct foo) function to
> >work. Not pretty, not straightforward.
> 
> I'm not following this. To copy a union, you just copy it with the 
> assignment operator:
> 
> 	U a, b;
> 	a = b;		// copies all the bit fields, too!

  That was the point indeed. But if you don't have bitfields, you can't
do the union. And if the bitfield is just syntactic sugar, it may be
unpossible to have such a union. But I may be wrong.

> >Right now, for D, only
> >gdc exists, it lags behind dmd quite a lot afaict, and there is no other
> >toolchain helpers yet.
> 
> GDC was just released for D 1.020, which is behind D 1.021, but 1.021 was 
> released just a couple days ago <g>.

  Sure, but it does not works on amd64 properly (and it's the
architecture I care about) and is not ready for the current gcc (4.2,
only 4.1 builds) and so on. It's not as stable as DMD is. It does not
lags too much version-wise, it lags in maturity. But well, youth has a
cure: time :)

-- 
·O·  Pierre Habouzit
··O                                                [email-masked]
OOO                                                http://www.madism.org