Implicit enum conversions are a stupid PITA
Nick Sabalausky
a at a.a
Thu Mar 25 12:52:56 PDT 2010
"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message
news:hogdpf$2te7$1 at digitalmars.com...
> On 03/25/2010 02:28 PM, Nick Sabalausky wrote:
>> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org> wrote in message
>> news:hogc1o$2pm8$1 at digitalmars.com...
>>> On 03/25/2010 01:33 PM, bearophile wrote:
>>>> Andrei Alexandrescu:
>>>>
>>>>> I encourage you to code that up and see how it swims.<
>>>>
>>>> The idea of using that syntax gives me nausea, I can't use that even
>>>> if I implement that myself.
>>>
>>> I believe you're exaggerating.
>>>
>>
>> Of course he is. But using mixins to "solve" every need that comes up is
>> a
>> bit like saying "LISP does everything!" even though LISP gets that
>> flexibity
>> by imposing a butt-ugly syntax ("Lost In Stupid Parenthesis", anyone?) on
>> pretty much everything.
>
> I'm not saying to use mixins to solve every need that comes up. I'm saying
> it's worth trying them to solve a few obscure needs.
>
I can agree mixins are a perfectly fine interim solution for anything not
already in the language, and for truly obscure needs (I use them all the
time for both situations myself). But I'd still hardly consider flags and
bitfields (to be clear, I'm talking about the abstract concept of a bitfield
in general, not necessarily the C-style
struct-with-sub-byte-member-alignment bitfield syntax/semantics) to be an
"obscure" need in something that's supposed to be a systems language. I
guess we just have a fundamental disagreement on that.
More information about the Digitalmars-d
mailing list