Re: Why C/C++ errors are SO obscure/devious??
- From: "Malcolm" <regniztar@xxxxxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 19:26:51 +0000 (UTC)
"Massimo Soricetti" <massimo_main@xxxxxxxxxxx> wrote
>
> Why can't a compiler give more accurate informations about errors?
> Shouldn't this save time, stress and money?
>
Try to write a front end to a C compiler that checks the source for
correctness (but doesn't actually produce any executable).
You'll soon find that there are many difficulties. However it is certainly
possible to do a better job than most compliers in catching errors.
Maybe you could design a language with a syntax that is easier to parse,
given that the human programmer will probably have made human-type errors. I
don't think anyone has considered this issue seriously in language design.
>
> This is "interactive compiling", isn't it? Why not? Why the compiler can't
> simply ask us, in doubt, and on response modify sources accordingly on its
> own, in this case and in other similar? This would ease the programming
> effort a lot.
>
That's a nightmare. Like the Microsoft car that turns the steering wheel for
you every time you put the indicators on and apply the brake. It tests it's
really fun, until you try to overtake someone on the motorway. You put on
the indicator, and press the accelerator. At the that point a child playing
chicken runs across the road, and you have to brake sharply.
>
> What are your opinions on this matter?
>
.
- References:
- Why C/C++ errors are SO obscure/devious??
- From: Massimo Soricetti
- Why C/C++ errors are SO obscure/devious??
- Prev by Date: Re: compare a large number of variables
- Next by Date: Re: while (1) vs. for ( ;; )
- Previous by thread: Re: Why C/C++ errors are SO obscure/devious??
- Next by thread: Re: Why C/C++ errors are SO obscure/devious??
- Index(es):
Relevant Pages
|