dmd 1.041 and 2.026 releases
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Mar 7 11:18:40 PST 2009
Walter Bright wrote:
> Daniel Keep wrote:
>>
>> Walter Bright wrote:
>>> Leandro Lucarella wrote:
>>>> Walter Bright, el 5 de marzo a las 11:37 me escribiste:
>>>>> Tomas Lindquist Olsen wrote:
>>>>>> Compiling on linux from source is broken! Looks like you forgot to
>>>>>> include the total.h file!
>>>>> You don't need it, I'll fix the makefile. total.h is for precompiled
>>>>> headers, which don't even exist on gcc.
>>>> I don't know exactly what you mean, but:
>>>> http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html
>>>>
>>> I suppose it's been added since the last time I looked. gcc has
>>> thousands of switches.
>>
>> There are days when I can get upset at you for not implementing feature
>> X. I really need X, damnit. Do you have any idea how badly I want X?!
>>
>> ...
>>
>> And then I do something that requires me to look at the man page for
>> gcc. And then I die a little inside.
>
> Every command line switch that a compiler has is a failure of design. It
> reminds me of early jet engine controls for aircraft. There were all
> kinds of tweaks for it, and the pilot often got it wrong. The thing was
> eventually boiled down to a fantastically complicated mechanical box,
> that had one lever on it - "gimme more power".
I wish somehow all this nice philosophy about aircraft would somehow
found its way in the compiler implementation. Or perhaps it *is* the
main cause of the problems with the compielr implementation. I finally
found out why dmd was crashing on my program with nothing but
"Segmentation fault":
assert(puu.is_empty());
was used in my old code instead of:
assert(puu.empty());
This was inside a template class and was enough to have the compiler
segfault leaving me with no line and not even file information. Combine
that with templates and multiple files and -lib compiling, and you'll
see just how pernicious that is. (If you answer and the answer contains
"binary search", I'll drop to the ground and start kicking it with my
arms and legs. Binary search for where compilation fails DOES NOT WORK!
It is search but NOWHERE NEAR binary.)
If you allow me a little criticism, I did notice different pattern which
may also be derived from a systematic mechanical engineering approach:
there generality could be improved. From the hail of bugs that hit my
face on a daily basis, I notice that stuff that works works only for the
situations it was tested, and subsequently bug fixes only fix one
particular situation, not an entire class of problems. That's why
reenactments of bugs are not infrequent. Without having looked at the
dmd source, I'd conjecture that it contains in many places a hodge-podge
of particular cases instead of consistently looking to nail the general
problem. I guess this would be the way to go in mechanical engineering,
where restrictions of the natural world make the by-case analysis easier
to carry exhaustively.
Andrei
More information about the Digitalmars-d-announce
mailing list