C99是最终的C吗? [英] Is C99 the final C?
问题描述
我只是在考虑这个问题,特别想知道C规范目前缺少的是否有任何
功能,以及未来可能包含的b
标准化。
当然,我只讲C语言中的特征;像
这样的东西,虽然是一个不错的功能,但不属于C.
能够#define #define的东西会非常方便,
但是,例如:
#define DECLARE_FOO(bar)#define FOO_bar_SOMETHING \
#define FOO_bar_SOMETHING_ELSE
我不确定cpp的功能是否甚至包含在C
标准中(并且GCC肯定采取了相当不规范的方法
关于某些令牌扩展和诸如此类的东西),但这是我看到的一个区域
的改进。
我也希望看到一些东西沿着C ++模板的行,
,除非没有C ++人员决定转到(并且没有OOP)的真正的kludgy实现。
....迈克暂停了一千个声音*
模板在常用数据方面节省了大量时间>
st因为它们完全是在编译时实现的,所以根据他们的定义,不包括
包括OOP(尽管它们非常适合于它们) ,我认为他们将是一个很好的补充和C的精神。
你的想法?我肯定会有一些闷闷不乐,但我已经准备好了
准备了8)
-
迈克的专利阻止名单;用gcc编译:
i = 0; o(a){printf("%u",i>> 8 * a& 255); if(a){printf( "。"); o( - a);}}
main(){do {o(3); puts("");} while(++ i) ;}
I was just thinking about this, specifically wondering if there''s any
features that the C specification currently lacks, and which may be
included in some future standardization.
Of course, I speak only of features in the spirit of C; something like
object-orientation, though a nice feature, does not belong in C.
Something like being able to #define a #define would be very handy,
though, e.g:
#define DECLARE_FOO(bar) #define FOO_bar_SOMETHING \
#define FOO_bar_SOMETHING_ELSE
I''m not sure whether the features of cpp are even included in the C
standard though (and GCC has definitely taken quite a nonstandard approach
with regards to certain token expansions and whatnot), but that''s one area
of improvement I see.
I would also like to see something along the lines of C++ templating,
except without the really kludgy implementation that the C++ folks decided
to go to ( and without the OOP ).
.... Mike pauses for the sound of a thousand *plonks*
Templates save a lot of time when it comes to commonly-used data
structures, and as they are entirely implemented at compile-time and don''t
include, by their definition, OOP (although they can be well suited to
it), I think they would be a nice addition and in the spirit of C.
Your thoughts? I''m sure there''s some vitriol coming my way but I''m
prepared 8)
--
Mike''s Patented Blocklist; compile with gcc:
i=0;o(a){printf("%u",i>>8*a&255);if(a){printf(".") ;o(--a);}}
main(){do{o(3);puts("");}while(++i);}
推荐答案
Michael B.写道:
Michael B. wrote:
我只是想着这个,特别想知道C规范目前缺少哪些功能,以及未来某些标准化中可能包含的功能。
I was just thinking about this, specifically wondering if there''s any
features that the C specification currently lacks, and which may be
included in some future standardization.
当然有。你能想象人们会/永远/停止
修理东西只是因为它们没有破坏吗?
-
Morris Dovey
美国爱荷华州西得梅因
C链接 http://www.iedu.com/c
读我的嘴唇:苹果离树不远。
Of course there are. Can you imagine that people will /ever/ stop
fixing things just because they ain''t broke?
--
Morris Dovey
West Des Moines, Iowa USA
C links at http://www.iedu.com/c
Read my lips: The apple doesn''t fall far from the tree.
Morris Dovey写道:
Morris Dovey wrote:
Michael B.写道:
Michael B. wrote:
我只是考虑到这一点,特别想知道C规范目前缺少哪些功能,哪些可能包含在未来的标准化中。
I was just thinking about this, specifically wondering if there''s any
features that the C specification currently lacks, and which may be
included in some future standardization.
当然有。你能想象人们会因为他们没有破坏而/永远/停止修理东西吗?
Of course there are. Can you imagine that people will /ever/ stop fixing
things just because they ain''t broke?
几年前有一句话,我相信由
原始Fortran编译器的作者之一,虽然很难验证来源。
类似于:
我不知道2000年的语言会是什么样子,但它将被称为Fortran。
将被称为Fortran。 (这是来自记忆,希望它很接近。)
现在,我相信,现在有一个Fortran 2003,它几乎没有什么共同点。
1954年的Fortran左右。当它是50岁时,C会是什么样子?
我可能更喜欢新语言而不是现有语言的扩展。
- glen
There was a quote some years ago, I believe by one of the authors of the
original Fortran compiler, though it is hard to verify the source.
Something like:
"I don''t know what the language of the year 2000 will look like, but it
will be called Fortran." (That is from memory, hopefully it is close.)
There is now, I believe, a Fortran 2003 that has very little in common
with the Fortran of 1954 or so. What will C look like when it is 50
years old?
I might prefer a new language rather than an extension of an existing one.
-- glen
在comp.lang.ci中的
读取:
Michael B.写道:
Michael B. wrote:
我只是想着这个,特别想知道C规范是否有任何
功能目前缺乏,可能会在未来的某些标准化中包含。
I was just thinking about this, specifically wondering if there''s any
features that the C specification currently lacks, and which may be
included in some future standardization.
当然有。你能想象人们会因为他们没有破坏而/永远/停止修理东西吗?
Of course there are. Can you imagine that people will /ever/ stop
fixing things just because they ain''t broke?
是的。 (比照pl / i标准)
-
签名
yes. (cf the pl/i standard)
--
a signature
这篇关于C99是最终的C吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!