Re: Why C/C++ errors are SO obscure/devious??



"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?
>


.



Relevant Pages

  • Re: Breaking Delphi
    ... There is always the word compability. ... - We wanted to be a compiler for production use, ... language design discussions. ... for a good pretty-printer and you might get fewer complaints;-) ...
    (borland.public.delphi.non-technical)
  • Re: function : question on argument for output
    ... That would deviate from the standard's definition of "execution ... The only reason the compiler is allowed to skip the ... It isn't good language design to say that something is allowed in the ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: Multiple assignment
    ... >> on language design from someone else who understands it to this ... >> compiler can achieve the same quality of generated code without ... > functionality out of every line of code, ... In these newsgroups, I often see programmers ...
    (microsoft.public.vb.syntax)
  • Re: features request ;)
    ... a newbie to language design. ... what are those problems (different from usual subrange ones)? ... any sophisticated program (and a compiler certainly is) is an implementation horror. ...
    (borland.public.delphi.non-technical)
  • Re: Java is slow!
    ... dumber than a human programmer. ... A native compiler is an expert system for translating source code into ... Given the complexity of modern CPUs, ... In Objective-C, there's no special keyword, but the syntactical ...
    (comp.lang.java.advocacy)