点到为止 意味深长

最近有幸拜读了Bjarne Stroustrup《C++ programming language》,虽然过程是非常痛苦的,但总算了却了一幢心事,一直以来看过很多的关于C++的书,经amazon 书店上的人的指示,准备好了足够的功课,最后把这个碉堡攻了下来。坦率地讲,Bjarne Stroustrup的书有点难懂,主要原因是Bjarne Stroustrup认为你的数据结构,算法,C++ Template, C++ Primer, 项目经验等等都是非常熟悉的,所以作为C++ 语言的创始人,他老人家就不再相关话题上多费口舌了,基本上,他把你已经掌握了的知识,加上某些藏在阴暗角落里的知识都点到为止了,至于具体细节,你自己看着办! 所以发扬一不怕死二不怕苦的精神,深挖他老人家的话中之话,才能得其真谛。下面把C++的发展历史,设计目标,学习方法归纳了一下,拿出来和各位共同探讨:

 

1. C++  history

Ø     Earlier versions of the language, collectively known as ‘‘C with Classes’’ [Stroustrup,1994],have been in use since 1980

 

Ø     ‘‘C with Classes’’ was used for major projects in which the facilities for writing programs that use minimal time and space were severely tested.

 

Ø     C++ was designed primarily so that soft engineer would not have to program in assembler,C, or various modern high-level languages. Its main purpose was to make writing good programs easier and more pleasant for the individual programmer

 

Question:

 Why it was called C++ ?

  

 

2.  The Design of C++

Ø     Simplicity was an important design criterion: where there was a choice between simplifying thelanguage definition and simplifying the compiler, the former was chosen

 

Ø     great importance was attached to retaining a high degree of compatibility with C

 

Ø     C++ has no built-in high-level data types and no high-level primitive operations

 

Ø     Features that would incur run-time or memory overheads even when not used were avoided in the design of C++

     Ø     C++ was designed to be used in a traditional compilation  

         and      run-time environment, that is, theC programming   

         environment on the UNIX system.

 

     Ø     C++ type-checking and data-hiding features rely on compile-  

         time analysis of programs to prevent  accidental corruption

         of    data.

 

Ø     C++ supports a variety of programming styles.

 

 

Question: Is C++ perfect?

 

3.  Learning C++

 

Ø     The most important thing to do when learning C++ is to focus on concepts and not get lost in

language-technical details.

 

an appreciation of programming and design techniques is far more important than an understanding of details; that understanding comes with time and practice

 

 

Ø     C++ supports a variety of programming styles.

All are based on strong static type checking, and

most aim at achieving a high level of abstraction and a direct representation of the programmer’s

ideas

 

A programmer coming from a different language (say C, Fortran, Smalltalk, Lisp, ML, Ada, Eiffel,

Pascal, or Modula-2) should realize that to gain the benefits of C++, they must spend time learning

and internalizing programming styles and techniques suitable to C++.

 

 

 

 

Ø     C++ supports a gradual approach to learning.

 

This has to be done gradually because acquiring any significant new skill takes time and requires

practice.

 

By supporting several programming paradigms (Chapter 2),C++ supports productive programming at several levels of expertise. Each new style of programming

adds another tool to your toolbox, but each is effective on its own and each adds to your

effectiveness as a programmer.

 

Ø     This is important because it allows you to gain benefits roughly in proportion to the effort expended.

 

Question: whether one needs to learn C before C++?

4.  Philosophical Note

 Ø     close to the  machine and close to the problem to be solved

 Ø     restricting language features with the intent of

     eliminating programmer errors is at best dangerous

Ø     It is only a vehicle

Ø     Object is important, but…

Ø     Grass rooted language

 

 

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值