Re: survival of c++

From: fabio de francesco (fmdf_at_tiscali.it)
Date: 07/21/04


Date: 21 Jul 2004 14:11:16 -0700

JKop <NULL@NULL.NULL> wrote in message news:<3NMJc.4688$Z14.5807@news.indigo.ie>...
> fabio de francesco posted:
>
>
> > I'm still learning C++ and I like it very much, but the
> > above-mentioned thoughts are some of the main reasons I
> sometimes
> > would prefer some other language where, for example
> (Ada95) you can't
> > either add an integer and/to a float or move a value too
> big/little to
> > a variable with range constraints because the compiler
> stops you
> > before it is too late.
>
>
> int main()
> {
> float cat = 45.6;
>
> int dog = 72;
>
> int blah = cat + dog;
> }
>
>
> All compilers I know of give a warning.

A warning about an action doesn't mean that you can't do it and often
it passes unnoticed. Anyway that was just an example of many different
problems that can be caught while compiling, like the range checking
and some more features that make you to avoid problems.

I don't want to make any comparison between these ( C++ and Ada95 )
languages, because many professionals have already written about this
issue, and as far as I am concerned I like both them.

Fabio De Francesco



Relevant Pages

  • Re: "STL from the Ground Up"
    ... high-level intermediate language than can interoperate with many other ... If your language lacks expressive features then you cannot write code ... memory management in comparison. ... Mostly because type errors mean that the programmer and compiler disagree ...
    (comp.programming)
  • Re: A note on computing thugs and coding bums
    ... It would handle international characters if the execution character ... method I used in "Build Your Own .Net Language and Compiler". ... work areas and counting on Nul is an illusion. ...
    (comp.programming)
  • Re: WaitForSingleObject() will not deadlock
    ... represent an incorrect implementation of the language. ... the *compiler* does not guarantee this. ... but to state it in terms of the execution instead of the formal semantics of the language ... as long as the optimizations do not change the semantics of the language). ...
    (microsoft.public.vc.mfc)
  • Re: "STL from the Ground Up"
    ... are not features of a language. ... To support reflection you make a compiler embbed type and functional information in the compiled program. ... When the OCaml compiler is given a complicated nested pattern match it ... virtual const Base *clone= 0; ...
    (comp.programming)
  • Re: "STL from the Ground Up"
    ... If your language lacks expressive features then you cannot write code well ... Same program is 5x faster in OCaml than C++. ... The compiler infers the types of all subexpressions for you and makes them ... virtual const Base *clone= 0; ...
    (comp.programming)