C ++ FAQ Lite [6] - Summary (new)

zhaozj2021-02-08  244

[6] Summary (Part of C FAQ Lite, Copyright © 1991-2001, Marshall Cline, Cline@parashift.com)

体,, nicrosoft @ sunistudio.com (East day production room, East day document)

FAQS in section [6]:

[6.1] Is C Is it a practical language? [6.2] Is C Is it a perfect language? [6.3] What is the use of object-oriented (oo)? [6.4] C better than ADA? (Or Visual Basic, C, Fortran, Pascal, Smalltalk, or other languages?) [6.5] How long does it take to learn OO / C with C ? [6.6]? [6.7] What are the characteristics of C from a business perspective? [6.8] Is the virtual function (dynamic binding) mainly? [6.9] I am from Missouri. Can you give me a reason, why is the virtual function (dynamic binding) caused great difference? [6.10] Does C are compatible with ANSI / ISO C? [6.11] Is C standardized? [6.12] Can you get a copy of the ANSI / ISO C standard?

[6.1] Is C Is it a practical language?

Yes.

C is a practical tool. It is not perfect

But useful.

In the world of the software industry, C is seen as a reliable, mature, mainstream tool. It gets a general industrial support, so it is "excellent" from a comprehensive business point of view.

[TOP | BOTTOM | Previous Section | Next Section]

[6.2] Is C Is it a perfect language?

Not.

The design of C is not a demonstration as a perfect language-oriented language. It is designed as a practical tool to solve the problem of the real world. It has a little flaw, but it is useless to use pure theory before perfect. And that is not a C goal.

[TOP | BOTTOM | Previous Section | Next Section]

[6.3] What is the use of object-oriented (oo)?

Object-oriented technology is the best way to develop large, complex software applications and systems we know.

OO: When dealing with large, complex software systems, the software industry is "failed". But this "failure" is actually attributed to our success: our success makes the user want more. Unfortunately, we have created the hunger of the market, and "structured" analysis, design and programming technology cannot meet this hunger. Therefore, we need us to create a better model.

C is an object-oriented (OO) programming language. C can also be used as a conventional programming language (as a "a better C"). But if you "as a better C", you don't expect to get the benefits of object-oriented objects.

[TOP | BOTTOM | Previous Section | Next Section]

[6.4] C better than ADA? (Or Visual Basic, C, Fortran, Pascal, Smalltalk, or other languages?) There is no meaning. Read below before publishing a different opinion on this issue.

In 99%, the selection of programming languages ​​is for commercial considerations, not technical considerations. Truely important is a programming environment, configuring machine runtime environment, runtime, and / or development environments, business culture / policies, these business considerations, and corporate culture / policies. The role played is generally more important than compile performance, runtime performance, static or dynamic type, static or binding.

From a pure technical perspective, a language than another better person (that is, ignoring the business arguments of the dominant position), is except that they have a lack of their own technology, don't listen to them.

[TOP | BOTTOM | Previous Section | Next Section]

[6.5] Who is using C ?

[Recently ReWrote (on 7/00). Click Here to Go To The Next Faq in The "Chain" of Recent Changes

]

Many companies and government departments, very much.

There is a large number of developers (and therefore have a large number of underlying effective support, including sellers, tool developers, training, etc.) are one of the characteristics of C .

[TOP | BOTTOM | Previous Section | Next Section]

[6.6] How long does it take to learn OO / C ?

Some companies successfully taught the "Short-term Course" of the standard industry, compressed the course of the university in a week to 40 hours. But no matter where you get training, you must know that the course is handed over to you, most people will be "condensed" after picking up the project. Even if you get the best training, it is not ready.

It takes 6-12 months to master OO / C . If there is an expert around, it will be less. If there is no "good" universal C class library, there will be more. It takes 3 years to be guided by experts who can guide others.

Some people will never do this, unless you are a "Confucian" and there is a personal driving force. The minimum requirement that can be taught is that it must be confirmed when you are wrong. The lowest requirements of the driving force is that you must be willing to invest some extra time (learning some new things than changing your model (PARADIGM) [that is, change your thinking method, change your good concept, change you in technology world Thinking mode] Easy to easily).

You should do two things:

Find a "master" to see two types of books: a category of C legal guidance

Another category is the guidance of C morality

You should not do two things:

Should not learn C as a step for learning OO / C

Shouldn't learn SMALLTALK as a step of learning OO / C

[TOP | BOTTOM | Previous Section | Next Section]

[6.7] What are the characteristics of C from a business perspective?

Look at OO / C from a business perspective:

C has a huge placement foundation, which means that you will have a lot of manufacturers to support tools, environment, consulting services, etc., and you can add a very valuable one in your resume. C allows developers to provide a simplified interface for software blocks to improve the error rate when these software blocks are used (reuse). C reloads you to discover the motivation of developers, reducing users' learning curves. C will locate the access to the software block and reduce the cost of change. C to reduce security and availability

To improve the cost of using (reuse) software blocks. C reduces security and speed trade-off, improve the error rate without loss of performance. C gives you inheritance and dynamic binding

So old code call new code

Make quick expansion / adjust your software for the market.

[TOP | BOTTOM | Previous Section | Next Section]

[6.8] Is the virtual function (dynamic binding) mainly for OO / C ?

[Recently INSERTED "The" Before "Difference" Thanks to Stan Brown and Reacted References To STL (on 7/00). Click Here to Go To The Next FAQ in The "Chain" of Recent Changes

]

Yes!

No virtual function

, C is not object-oriented. Operator overload

And the non-virtual member function is very good, but after all, they are just more typical C concepts to deliver a struct's pointer to the syntactic decoration of the function. Although standard library

Many templates are included to achieve equally very good "generic programming (translation: also known as universal programming," generic programming "technology, but virtual functions are still using C cores.

From a business perspective, if there is no virtual function, then there is no reason to transfer from the traditional C to C . (We will ignore generic programming and standard libraries in this FAQ). Those skilled articles generally believe that there is a big difference between C and non-surface-oriented C , but if there is no object oriented, this difference is not enough to prove that the cost of training developers, new tools, etc. is worth it. In other words, if I have been inquiring opinions by a manager, whether it is from C (that is, the conversion language without conversion), then I may discourage him, unless I have a forced The reason for the tool. From a business perspective, object-oriented can make the system with scalability and adaptability, but only C class syntax without object-oriented, it will not reduce maintenance costs, and actually increase training costs.

Bottom line: C without virtual functions is not object-oriented. Use class programming without dynamic binding, called "object-based" instead of "object-oriented". Kick out the virtual function and kick out the OO (translation: ie, object-oriented) is a matter. The rest is based on object programming, similar to the initial ADA language (by way, new ADA language supports OO rather than object programming).

[TOP | BOTTOM | Previous Section | Next Section]

[6.9] I am from Missouri. Can you give me a reason, why is the virtual function (dynamic binding) caused great difference? Overall: Dynamic Binding can improve reuse by calling new code to call old code.

Before the OO (translation: ie, object-oriented), the reuse is done by calling the new code to call the old code. For example, programmers can write some code to call some reused code, such as Printf ().

In OO, reuse can be done by calling new code to call old code. For example, a programmer can write some code to be called by a very very ancestor framework. Do not need to modify the code of the ancestor. In fact, there is no need to be recompiled. Even if the source code has lost 25 years, you only have the target file, the original target file will call the new extension code without missing.

This is scalability, this is OO.

[TOP | BOTTOM | Previous Section | Next Section]

[6.10] Does C are compatible with ANSI / ISO C?

almost.

C is as compatible with C, but not complete. In practice, the main difference is that C requires prototype, f () declares a function that does not have parameters (in C, F () and f (...) are the same).

There are still some very little differences, like SizeOf ('x') in C is equal to SIZEOF (int) in C. Similarly, C places the structure "tags" in the same namespace as other names, and in C, the explicit structure requires explicit struct (for example, TypeDef struct fred fred; skills can also work, but there is more than C ) of).

[TOP | BOTTOM | Previous Section | Next Section]

[6.11] Is C standardized?

[Recently Changed "HAS Been Finalized" to "Was Finalized" THANKS to Stan Brown (on 7/00). Click Here to Go To The Next FAQ in The "Chain" of Recent Changes

]

Yes.

C standards were determined by ISO (International Standardization Organization) and some national standards, such as the ANSI US National Standards Association, BSI (British Standards Association), DIN (German National Standards Organization). The ISO Standard was consistently submitted and used by voting on November 14, 1997.

The ANSI C committee is called "x3j16". ISO C Standard Team is called "WG21". The main participants of the ANSI / ISO C standard include each person: there is a representative from Australia, Canada, Denmark, France, Germany, Ireland, Japan, Netherlands, New Zealand, Sweden, UK and the United States, together with about more than 100 companies. Representatives and individuals of interest. The main participants include AT & T, Ericsson, Digital, Borland, HP, IBM, Mentor Graphics, Microsoft, Silicon Graphics, Sun Microsystems and Siemens. After approximately 8 years, the standard is completed. On November 14, 1997, the delegates attended the vote in Morrison, and the standard was unanimously recognized. [TOP | BOTTOM | Previous Section | Next Section]

[6.12] Can you get a copy of the ANSI / ISO C standard?

[Recently Added Urls to Free Copies Of CD2 (ON 7/00) And Total Rewrite; Changed Several Urls Thanks to Brian K. Hamon and Garen Parham (on 4/01). Click Here To Go To The next FAQ in The "Chain "of recent changes

]

At least three methods get the soft copy of this document:

$ 18 [ANSI Publishing]: Go to this page, pull down "PDF file" and click "Place this in your shopping basket". $ 18 [ANSI Publishing]: Go to this page and click "Add to Basket". $ 245 [ISO Publishing]: Go to this page and click "Add to Basket".

Note: ISO documents are more than ten times more than ANSI, but the technical content is the same. The title page of the ISO document is different, but the technical materials and ANSI documents are the same. Please don't email asked me why ISO is so much for basic things, it is ISO's business decision; you must subscribe to ISO's publishing / sales department.

There are at least two ways to get the hard copy of this document:

$ 175 [ANSI Publishing]: Go to this page, pull down "HARDCopy" and click "Place this in your shopping basket". Unknown prices [ANSI Publishing]: Call NCITS (National CommTee for Information Technology Standards; National Information Technology Commission; this is a new name called "X3"). The contact is Monica VEGA, 202-626-5739 or 202-626-5738. Seeking FDC 14882 documentation. Ready to pay some money - the document is of course not free.

There are two potentially interesting (and free) documents you might want to see:

$ 0: If you are willing to endure a (free) unauthorized, expiration, and some wrong documents, you can get from the "Draft" Bill # 2 "here and / or here. $ 0: Press Release of the ISO Committee (not a copy of the ANSI or ISO standard!) Here. This press release is easy to read for non-programmers. [TOP | BOTTOM | Previous Section | Next Section]

E-mail the author [C FAQ Lite | Table of Contents | Subject Index | About The Author | © | Download Your Own Copy] Revised Apr 8, 2001

转载请注明原文地址:https://www.9cbs.com/read-2047.html

New Post(0)