zoukankan      html  css  js  c++  java
  • Wiki上的C++哲学

    Philosophy[edit]

    Throughout C++'s life, its development and evolution has been informally governed by a set of rules that its evolution should follow:[9]

    • It must be driven by actual problems and its features should be useful immediately in real world programs. 由现实问题驱动而产生的语言
    • Every feature should be implementable (with a reasonably obvious way to do so). 每种特性都是可以实现的
    • Programmers should be free to pick their own programming style, and that style should be fully supported by C++. 程序员应该自由的使用自己的方式来编程
    • Allowing a useful feature is more important than preventing every possible misuse of C++. 允许使用一个特性比滥用特性更重要
    • It should provide facilities for organising programs into well-defined separate parts, and provide facilities for combining separately developed parts. 可以很好的组织和分发任务进行团队编程
    • No implicit violations of the type system (but allow explicit violations; that is, those explicitly requested by the programmer). 没有隐含的违反系统的类型
    • User-created types need to have the same support and performance as built-in types. 用户创建的类型可以与内建类型有同样等级的支持和性能
    • Unused features should not negatively impact created executables (e.g. in lower performance). 未使用的功能不应对创建的可执行文件产生负面影响
    • There should be no language beneath C++ (except assembly language). There should be no language beneath C++已经是终极语言了,而不是还有语言去扩展它
    • C++ should work alongside other existing programming languages, rather than fostering its own separate and incompatible programming environment. C++应该与其他现有的编程语言一起工作,而不是建立自己独立且不兼容的编程环境
    • If the programmer's intent is unknown, allow the programmer to specify it by providing manual control. 如果程序员的意图未知,则允许程序员通过提供手动控制来指定程序员的意图。

    https://en.wikipedia.org/wiki/C%2B%2B

    我认为总结为两句话:1. C++来自于现实世界的实际需求,是实践派而不是理论派 2. 允许程序员自由的使用自己的方式编程,而且允许内建各种类型,总之就是很自由、很强大。

  • 相关阅读:
    开源牛人 zcbenz
    分享一个快速的Json(反)序列化开源项目 Jil
    影响当今世界发展的重要技术难题
    余额表的处理方法
    使用TypeScript开发程序
    docker 和 nginx 配合的一个坑
    Excel 的一些使用记录
    mysql 用户授权相关
    容器数量增加导致 fs.inotify.max_user_instances 超过限制
    在 EF Core 中如何输出 linq 转换后的 sql 语句
  • 原文地址:https://www.cnblogs.com/findumars/p/5440116.html
Copyright © 2011-2022 走看看