Should I stop using the term C/C++? -
i understand c , c++ different languages when learning c++ told c subset of c++ or c++ c classes. , quiet true until appearance of c++x0, c++11 (or modern c++ 11/14/17 in general). in fact (specially when working on embedded systems) it's find code written in c++ lot of parts written entirely in pure c language. here have several questions:
- should stop using term c/c++?
- if answer #1 yes, how call program use mix of c , c++?
- given both of them 'different' languages @ point c++ compilers stop supporting code written in c language (since modern c++ diverging c mentality basic stuff pointers, dynamic memory handling, etc)
- is there right collaboration between people makes standards of c/c++ keep compatibility
- if #4 yes, such collaboration end in near future appearance of modern c++ (11/14/17)
i know there similar questions, i'm sure lot of people share these doubts i'm interested answers specially points have c++ tendency in near future.
i told c subset of c++ or c++ c classes. , quiet true until appearance of c++x0, c++11 (or modern c++ 11/14/17 in general).
c has never been subset of c++. example c89 not subset of c++98.
a few examples:
- the c89 identifier-list form function parameter declaration not supported in c++
- c89 , c++98 have different types characters constants
- c89 , c++98 have different types string literals
- logical operators yield different types in c89 , c++98 (
intvsbool)
- should stop using term c/c++?
yes.
- if answer #1 yes, how call program use mix of c , c++?
a program either c or c++ (if basic program can compiled either c or c++ compiler). compiler using compile it? should answer question. harbison & steele coined term clean c designate common subset of c , c++ think bad idea.
edit: admit technically can link c , c++ objects files in single program oth there many languages allowed mixed in single program example java , c++. think using term c/c++ program adds confusion written in single language called c/c++.
- given both of them 'different' languages @ point c++ compilers stop supporting code written in c language (since modern c++ diverging c mentality basic stuff pointers, dynamic memory handling, etc)
there many features (example: variable length array, flexible array member, _generic, ...) of c99 or c11 not supported c++ version.
Comments
Post a Comment