|
 |
In article <qqm### [at] schlatt fmi uni-konstanz de>, Thomas
Willhalm <tho### [at] willhalm de> writes
>
>That's good. So, you won't object my propositions. :-)
>
>You really don't know what you're missing. In C++ you have a lot of
>features that aren't available in C. You have references, in particular
>as parameters. You can protect yourself (and others) from modifying
>locally constant variables. You can declare variables where you really
>need them and not only at the beginning of a function. You have object
>orientation to encapsulate your modules. You can really define your own
>types and use them just like built-in types. Think of integers with
>arbitrary precision, dates, times, colors, vectors,... etc. With C++
>you can add, multiply or print them like integers or doubles -- and
>you can (to some extent) use the compiler to check, whether it makes sense.
>You can encapsulate your memory management and avoid memory leaks or
>using freed memory.
>As the most important feature I consider generic programming. This leads
>to generic lists, sizable arrays, or trees -- with type safety.
>Finally it's possible to make faster code with expression templates.
>(By "faster" I mean "faster than C or fortran".)
>
>Thomas
OK, after reading that I like practically everything that I see except
one thing. I do not like this declare variables anywhere business. I
feel that this would lead to scrappy and difficult to follow code, when
declared at the beginning of a block you can see which variables are
declared easily. I feel that a code block is then easier to follow.
--
David Parrott E-mail: xam### [at] quayles1 demon co uk
ICQ: 13313977
Website: On it's way
Post a reply to this message
|
 |