C++的价值

In May 2010, the GCC steering committee decided to allow use of a C++ compiler to compile GCC. The compiler was intended to be written in C plus a subset of features from C++. In particular, this was decided so that GCC's developers could use the destructors and generics features of C++

从GCC的观点来看,C++最有价值的部分,是析构函数和泛型。

析构函数是最直接的资源管理方法,也是最直接的scope工具;基于析构函数可以做出很多有价值的设计。

泛型是大型编程语言的必需品;虽然泛型的使用非常复杂而且易出错,但是目前来看泛型仍然是实现容器的最佳办法。业务开发要避开泛型,但是基础类库却又需要泛型。


Bionic lacks many features found in full libc implementations, such as wide character and C++ exception handling support.


从bionic的观点来看,C++的宽字节和异常都是毒药。

宽字节并不能解决unicode的问题,但是带来了一堆麻烦,去掉最好。C++的异常,带来的问题比它解决的问题还多,去掉最好。


转载于:https://www.cnblogs.com/hehe520/p/6330350.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值