Of course there are some differences,
but  dealing with those  is not a major issue...

And they lead C programs to be more clear, with stronger type management,
more clear function prototypes...

Nothing impossible to manage,
and that is worth managing.

not talking about much better rules and tools to cast pointers.

And I maintain that with modern compilers, and the help of syntax checking by the compiler,
most C to C++ translation issues can be solved quickly.

By the way, it is a fact that people are already mixing C or C++ programs with C libs, or C++ ones, and at a time, something impossible in C is possible in C++, like namespaces. So that C programmers would not be frustrated by switching to cpp compilation.

For example, anything you do with pointers in C is possible the same way in C++. and you can still program without using any class nor any object if you are refractory to object programming.

Relying on implicit numerical promotion is always a bad idea, whatever the language is.

Le 10/09/2014 14:29, Michael Wojcik a écrit :
"Not so bad idea considering that any C program, with modern compilers, can be 
compiled as cpp with no problem."

That is wildly incorrect. C and C++ (which is what I assume "cpp" means) are 
different languages.

Here's a C program that conforms to ISO 9899-1999. Try compiling it as C++.

-----
#include <stdlib.h>
char *new(void) {return malloc(1);}
int main(void) {new(); return EXIT_SUCCESS;}
-----

C++ has additional keywords, which invade the C application identifier 
namespace. It has different syntax and semantics for the void keyword, 
particularly in the case of function declarations. It has different semantics 
for void* pointers. It has different rules for numeric-parameter promotions. 
And so on.

People who think C++ is a superset of C are sadly mistaken, and programmers who 
act on that assumption are dangerous.

Michael Wojcik
Technology Specialist, Micro Focus



This message has been scanned for malware by Websense. www.websense.com
:��I"Ϯ��r�m����
(���Z+�K�+����1���x��h���[�z�(���Z+���f�y������f���h��)z{,��

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to