由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - Why C++11 introduce "decltype" and "auto"?
相关主题
type inferience 好处是什么code swarm (video)
c++14出来了,看wiki[合集] 弱问:C++ 里的Vector在Java里用什么替代比较好?
珍惜生命,远离 R 和 Goplease help C++ beginner
What is wrong with the constructor calling?[合集] 请牛人解释为啥C++ has stronger typing than C//bow
怎么才能避免每次都写using namespace std (转载)C++一问
这两个地方是否需要typename?What're the three types of memory allocated for C++ variables?
[C++] 新手报错求助recursive template?
C++中size_type怎么处理?再问C++问题。
相关话题的讨论汇总
话题: java话题: c++话题: auto话题: decltype话题: why
进入Programming版参与讨论
1 (共1页)
o******0
发帖数: 105
1
It is very confusing and error-prone.Even Java does not have those.
f******y
发帖数: 2971
2
auto我认为应该尽量只用于局部变量,就是前后都扩起来一目了然地知道是什么类型的
时候。它的一个用处就是省了一些typing,尤其在namespace层数比较多,或者涉及
iterator的时候。

【在 o******0 的大作中提到】
: It is very confusing and error-prone.Even Java does not have those.
b*******s
发帖数: 5216
3
我的建议是,去学java或者c#,挺好的
f******y
发帖数: 2971
4
C#里有var

【在 b*******s 的大作中提到】
: 我的建议是,去学java或者c#,挺好的
o******0
发帖数: 105
5
It is very confusing and error-prone.Even Java does not have those.
f******y
发帖数: 2971
6
auto我认为应该尽量只用于局部变量,就是前后都扩起来一目了然地知道是什么类型的
时候。它的一个用处就是省了一些typing,尤其在namespace层数比较多,或者涉及
iterator的时候。

【在 o******0 的大作中提到】
: It is very confusing and error-prone.Even Java does not have those.
b*******s
发帖数: 5216
7
我的建议是,去学java或者c#,挺好的
f******y
发帖数: 2971
8
C#里有var

【在 b*******s 的大作中提到】
: 我的建议是,去学java或者c#,挺好的
d****i
发帖数: 4809
9
C++11's auto is fucking ugly IMHO. Static typed language should stick to its
static typed style. Java in this case stick to its static typed style
without any pollution.

【在 o******0 的大作中提到】
: It is very confusing and error-prone.Even Java does not have those.
N******K
发帖数: 10202
10
写template 一个类里面一大堆 typedef 看一会就晕了
用template <>套<>
auto一上 代码清爽
能用auto 我就用auto

its

【在 d****i 的大作中提到】
: C++11's auto is fucking ugly IMHO. Static typed language should stick to its
: static typed style. Java in this case stick to its static typed style
: without any pollution.

N******K
发帖数: 10202
11
将来当全堆程序员 更好

【在 b*******s 的大作中提到】
: 我的建议是,去学java或者c#,挺好的
1 (共1页)
进入Programming版参与讨论
相关主题
再问C++问题。怎么才能避免每次都写using namespace std (转载)
C++ Q12: Reference Types这两个地方是否需要typename?
C到底能走多远。。。。。。[C++] 新手报错求助
stanford 采用 javascript 为入门教学语言C++中size_type怎么处理?
type inferience 好处是什么code swarm (video)
c++14出来了,看wiki[合集] 弱问:C++ 里的Vector在Java里用什么替代比较好?
珍惜生命,远离 R 和 Goplease help C++ beginner
What is wrong with the constructor calling?[合集] 请牛人解释为啥C++ has stronger typing than C//bow
相关话题的讨论汇总
话题: java话题: c++话题: auto话题: decltype话题: why