🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by batch Sun, 29 Jul 2007 08:31
��ά��ٿ��Ͽ���������һ�λ�����C99��C++
#19
Author: batch
Date: Sun, 29 Jul 2007 08:31
21 lines
2840 bytes
(英语版本可以直接访问,但中文不行)

在C++条目下,关于C++和C99:

Some incompatibilities have been removed by the latest (C99) C standard, which now supports C++ features such as // comments and mixed declarations and code. However, C99 introduced a number of new features that C++ does not support (such as variable-length arrays, native complex-number types, and compound literals), so the languages may be diverging more than they are converging. (However, at least some of the new C99 features will likely be included in the next version of the C++ standard, C++0x.)

非常期待,C++兼容C,可是里面也有一些C++比较难支持的项目。
正如从K&R C到ANSI C的转变,有人愿意,也有人反对。
K&R C的时候可以这样,而ANSI C89不允许:
for (int i = 0;……;……)
{
    …………
}

printf ("%d", i);

C89严格很多,有人认为自由度减少了不少(自由度大是C/C++的一大特性)。C++又放宽限制。
谁知道C99的时候放宽的限制更多,宽字节支持、变长数组、long long类型、内建的复数支持(C++是通过类来支持的,不与C兼容)、指定初始化项目……
当然会有人认为这些特性是不必要的(Google搜索的时候甚至有人说它艰涩难懂,怎么又不说C90限制过多呢,要自由就要有一定的代价)。正如K%R C时代的人认为void类型没必要使用,而事实上呢?
Re: ��ά��ٿ��Ͽ���������һ�λ�����C99��C++
#20
Author: ChiLL
Date: Sun, 29 Jul 2007 13:22
29 lines
3408 bytes
����Ľ���, �����ڿ�ʼc++��Ҫ�ٹ��Ŀ��Ǽ���c��,
���ԭ����Ҫ����c���������ƹ�c++�Ļ�,
������ȫ�Ѿ���ʱ�����߿��Էֵ�������.
"batch" <chinaonhb@hotmail.com> д����Ϣ����:f8hj8o$p89$1@news.yaako.com...
> (Ӣ��汾����ֱ�ӷ��ʣ������IJ���)
>
> ��C++��Ŀ�£�����C++��C99��
>
> Some incompatibilities have been removed by the latest (C99) C standard, 
> which now supports C++ features such as // comments and mixed declarations 
> and code. However, C99 introduced a number of new features that C++ does 
> not support (such as variable-length arrays, native complex-number types, 
> and compound literals), so the languages may be diverging more than they 
> are converging. (However, at least some of the new C99 features will 
> likely be included in the next version of the C++ standard, C++0x.)
>
> �dz��ڴ�C++����C����������Ҳ��һЩC++�Ƚ���֧�ֵ���Ŀ��
> �����K&R C��ANSI C��ת�䣬����Ը�⣬Ҳ���˷��ԡ�
> K&R C��ʱ����������ANSI C89�����?
> for (int i = 0;����;����)
> {
>    ��������
> }
>
> printf ("%d", i);
>
> C89�ϸ�ܶ࣬������Ϊ���ɶȼ����˲���(���ɶȴ���C/C++��һ������)��C++�ַſ����ơ�
> ˭֪��C99��ʱ��ſ�����Ƹ�࣬���ֽ�֧�֡��䳤���顢long long���͡��ڽ��ĸ���֧��(C++��ͨ������֧�ֵģ�����C����)��ָ����ʼ����Ŀ����
> ��Ȼ��������Ϊ��Щ�����Dz���Ҫ��(Google������ʱ����������˵���ɬ�Ѷ�����ô�ֲ�˵C90���ƹ���أ�Ҫ���ɾ�Ҫ��һ���Ĵ��)������K%R Cʱ�������Ϊvoid����û��Ҫʹ�ã�����ʵ���أ� 
Re: ��ά��ٿ��Ͽ���������һ�λ�����C99��C++
#21
Author: batch
Date: Sun, 29 Jul 2007 14:20
29 lines
3506 bytes
我会第一个反对。好在标准化组织一直以来都坚持兼容C。

"ChiLL" <arthur.ping.foo@gmail.com> 写入消息 news:f8i4ae$kgf$1@news.yaako.com...
> 我真的建议, 从现在开始c++不要再过多的考虑兼容c了,
> 如果原来需要借助c的流行来推广c++的话,
> 现在完全已经到时候两者可以分道扬镳了.
> "batch" <chinaonhb@hotmail.com> 写入消息新闻:f8hj8o$p89$1@news.yaako.com...
>> (英语版本可以直接访问,但中文不行)
>>
>> 在C++条目下,关于C++和C99:
>>
>> Some incompatibilities have been removed by the latest (C99) C standard, 
>> which now supports C++ features such as // comments and mixed declarations 
>> and code. However, C99 introduced a number of new features that C++ does 
>> not support (such as variable-length arrays, native complex-number types, 
>> and compound literals), so the languages may be diverging more than they 
>> are converging. (However, at least some of the new C99 features will 
>> likely be included in the next version of the C++ standard, C++0x.)
>>
>> 非常期待,C++兼容C,可是里面也有一些C++比较难支持的项目。
>> 正如从K&R C到ANSI C的转变,有人愿意,也有人反对。
>> K&R C的时候可以这样,而ANSI C89不允许:
>> for (int i = 0;……;……)
>> {
>>    …………
>> }
>>
>> printf ("%d", i);
>>
>> C89严格很多,有人认为自由度减少了不少(自由度大是C/C++的一大特性)。C++又放宽限制。
>> 谁知道C99的时候放宽的限制更多,宽字节支持、变长数组、long long类型、内建的复数支持(C++是通过类来支持的,不与C兼容)、指定初始化项目……
>> 当然会有人认为这些特性是不必要的(Google搜索的时候甚至有人说它艰涩难懂,怎么又不说C90限制过多呢,要自由就要有一定的代价)。正如K%R C时代的人认为void类型没必要使用,而事实上呢? 
> 
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads