zoukankan      html  css  js  c++  java
  • note for Bjarne

    source

    The key questions are always: "What do I want to do?" and "How do I know that I have done it?".


    Strategies for testing enters into my concerns from well before I write the first line of code, ...

    ... often we do not know exactly how we did it: a system just "sort of evolved" into something minimally acceptable.

    The purpose of a progamming language is to help build good systems, where "good" can be defined in many ways. My brief definition is, correct, maintainable, and adequately fast. Aesthetics matters, but first and foremost a language must be useful; it must allow real-world programmers to express real-world ideas succinctly and affordably.

    Also, complainers are always louder an more certain than proponents - reasonable people acknowledge flaws. I think I know more about the problems with C++ than just about anyone, but I also know how to avoid them and how to use C++'s strengths.

    We need relatively complex language to deal with absolutely complex problems. I note that English is arguably the largest and most complex language in the world(measured in number of words and idioms), but also one of the most successful.

    This leads to a constant pressure on users not to use the most powerful C++ features and to myths about why they should be used "carefully", "infrequently", or "by experts only". That, combined with backwards-looking teaching of C++, has led to many failures to reap the potential benefits of C++ as a high-level language with powerful abstraction mechanisms.

    "class-oriented programming"

    Reasoning about the behavior of a program has to be rooted in the (static) structure of the source code. The focus should be on guarantees, invariant, etc. which are closely tied to that static structure. This is the only way I know to effectively deal with correctness.

    Testing is essential but cannot be systematic and complete without a good internal program structure - simple-minded blackbox testing of any significant system is infeasible because of the exponential explosion of states.

    So, I recommend people to think in terms of class invariants, exception handling guarantees, highly structured resource management, etc. I should add that I intensely dislike debugging (as ad hoc and unsystematic ) and strongly prefer reasoning about source code and systematic testing.

    Pros: flexibility, generality, performance, portability, good tool support, available on more platforms than any competitor except C, access to hardware and system resource, good availability of programmers and designers.

    Cons: complexity, sub-optimal use caused by poor teaching and myths.

    Done is better than perfect.
  • 相关阅读:
    angular1.5 组件学习 -- 4.2、组件的其他属性 transclude
    angular1.5 组件学习 -- 4.1、组件的其他属性 require
    angular1.5 组件学习 -- 3、组件的生命周期钩子
    angular1.5 组件学习 -- 2.2、组件间的交互:子向父
    angular1.5 组件学习 -- 2.1、组件间的交互:父向子
    angular1.5 组件学习 -- 1、组件的基本结构
    android内存优化相关1
    Android快速开发系列 10个常用工具类
    android Activity的启动模式
    [转载]Android系统开机画面的实现
  • 原文地址:https://www.cnblogs.com/zhaorui/p/20080106_note_for_Bjarne.html
Copyright © 2011-2022 走看看