Demon and Dream of personal language ------- Dialogue on Software Development (3)

zhaozj2021-02-11  238

/// The devil blows the flute: This is a reply to myan, in detail, I have the relationship between GP, ​​OO, development tool, software implementation. In addition, I made a complaint about the current status of C / C , but I said it is just the result. About the discussion of the world 3 will not come, the reason is that this problem is immature, and there is no guiding significance. However, some of them became a little important consensus we have reached, that is, GP should still be in the field of software design, and should strictly limit the application of GP in software design. Dream: For GP's role and status, my view is changing. Sometimes the evaluation is too high, sometimes the evaluation is too low. In fact, for reality, the evaluation is secondary, the key is to use. At this point, the demon brother is a unrelated practicalist. Today, I will discuss the efficiency of Template, I want to have another experience. Hello there. It's been a few days after receiving your letter, I have no words to give you a letter. Because I need more time and

Collect more information to clarify their ideas. Even when I wrote this letter today, I didn't have too much grasp of my own ideas.

The implementation and advantages of GP and Template are described in the last letter. You said that GP is not adding, I think it is incorrect. But I used to say that GP is OO supplement, nor is it. When you discuss GP, mix GP and Template to process the compiler in a piece of discussion, give the compiler programming the advantages of "GP" "Template-based GP is more advanced and superior." I think this kind of thinking Incorrect. You have also said that GP does not necessarily want Template.

I think GP is a design pattern and the OO mode in the same level, and compile processing is a programming implementation.

mode. As we can't calculate the advantages of this GC in Java to the Java OO model. We can only say that Java's GC function will enhance the usability and practicability of the OO model in Java, and cannot be said that since GC is GC, Java's OO is more superior.

You are familiar with Karl.Popper's theory, then I think you should be familiar with Karl.Popper's theory of world 3. I have this way.

A conjecture is: We can also use the model of the world 3 to explain the software design (but my world 3 and Popper world 3 are different).

World 1: Real world needs

World 2: Design model and mode (such as GPD, OOD, Design Patterns, etc.)

World 3: Implement model and mode (for example, OOP, Template, GC, Mixed_in)

For the world 1 we can understand, there is such three types of elements in the world 1

1. A series of basic elements, they are the basic elements that make up the other things in the world, can understand them into objects.

They have independence, independence can describe the difference between a basic element and other basic elements

Is A is not B. Such as a = book, A! = Desk.

They are derivatized and derivatives can regard some of the characteristics of basic elementality as a basic element.

Abstract and classified.

A = History Book -> a = book

2. Interaction relationship between the same elements, they make the interaction between the same basic components abstract,

Another basic element of the component world 1.

They have a wide range of versatility and singleness to the same basic elements, such as BooksortByname, which is suitable for any Book and its derivatives but is not applicable to DESK and DESK derivatives.

3. Interaction between different elements, they are enabled between relatively independent basic elements to form us

Applications needed.

For example, Book on Desk,

World 2 We can understand them like this, they are a series of description tools. We can use them to describe the basic elements of the three in the world 1 for easy understanding of the world 1. You can see the content of the world 2 I didn't say OO or GP but said GPD (Generic Programming Design), OOD (Object Oriented Design). So I have a negative attitude of my last point of view "GP is the supplement of the OO model, especially for multi-inheritance supplements".

GPD, OOD is just the design model and mode of the connotation rather than design mode and model itself.

I want to be more accurate, GPD is a supplement to design patterns and models.

The description tool in World 2 does not necessarily correspond to the elements in World 1. It is only to describe the world 1 using tools we choose the most suitable cost-off description. Only OOD is unable to describe the complete world 1, use him to describe the element 1OOD is uncommonly suitable but use it to achieve unnecessary redundancy, cumbersome. Only GPDs are not able to describe the complete world 1. Because it is used to lack the description capabilities of elements 1, 3 in World 1. Is there a GPD and OOD to completely describe the world 1, I don't know. I just know that as long as GPD and OOD are sufficient to describe the world 1.

World 3, they are some columns of implementation tools. We can use these tools to be more similar to the description of the world 2.

The situation in the world. Also in World 3, implementation tools do not necessarily correspond to the description tool in World 2. For example, we can use OOD to describe the world 1, but in World 3 I don't have to use OOP to implement I can use the process-oriented approach to implement only the way the way I want to define more data and structures. What kind of tool selection is only based on the cost of achieving costs itself.

GPDs in World 2 can also be implemented in many tools, such as Template, OOP, MIXED_IN, and more.

I think that C Template and Python's Mixed_in is more preferable or not.

Template, can provide independent algorithm models than OOP Dynamic Type Identification and more efficient code. Mixed_in

Decrease the class hierarchical structure and independent algorithm model from the inheritance tree of dynamic change classes. Any object can be applied with template vector without having to establish a Vector algorithm for each object. With Mixed_in we can inherit the vector class for any object at any time or delete the Vector class. These two technologies have the same intention. Only one can program to C compiler, and the other is the interpreter programming for Python. But in efficiency Mixed_in is still a little bit.

From an economical perspective or from a affordable perspective, I still think that Template is not a good product. He is impossible to win. I am withdrawn, ... (here I deleted 200 words mainly telling some problems with path dependence. First, it is too far to read, and other readers may not accept these views)

When I say it back from the affordable perspective, I think the Template and Beta tape are the same technique.

The primary goal of Template is the efficiency second is GP programming. But efficiency is just one aspect for a technique.

He is not worth a decision. The disadvantage of TemPalte is the complexity of the syntax. Most users do not necessarily have performance requirements.

High, they are not academic research, they need to measure the silver and performance of the pockets.

Improve performance must improve costs. This is inevitable. For most performance requirements, it is not too high application, such as Desktop Applications, there are two options that use C / C languages ​​when encoding, Template but paying is extension of expensive artificial development cycle, The result is that the actual performance is better than the user's feeling, the second solution is to reduce the development cycle and artificial cost, but it is necessary to save the cost of saving costs Optimize the program to the user acceptable level. In the end, both performance optimization has improved costs, and the results have effects no difference between users, it seems that there is no difference. But the highly artificial developer can not afford, too long's waiting for the waiting cycle users. Successful performance is worth it in terms of two aspects of supply. Most applications on the market, for example, MIS systems, and even large commercial applications use Java, and PERL has more and more. Another high-end application should be the field of C / C but now more and more use is not a C / C solution. Such as the telecommunications industry. Our company is currently dealing with telecommunications. Our solution we give telecommunications is 100% Pure Java. We understand that the main reason is that the competition in the telecom industry is increasingly fierce, and if the telecom provider will be lost if it is missing a business The big market share. The development of Java applications is more than 40% of C / C , and 30% of their telecom operators are willing to use these efforts to buy high-grade servers and do not want to wait for 5-6 months. Not only do this, even IBM, Lucent Call Center, or telecommunications platform, is based on Java. Another high-end area: Web service sector C / C market is rapidly shrinking and lowest performance ASP, Perl, JSP ruled 90% of the market. Why do you prefer to abandon high performance C / C in the past years, and a large number of programming is convenient but inefficient solutions. I think this is the problem that C designers should be urgently considered. So from my point of view, Template is a kind of technique from a technical point of technology, but it is indeed a secondary technology from an affordable perspective.

Thank you

Ian.king

/// Demon blows the flute: Dream is very hot in this letter. Of course not rushing me, but rushed on C current status. Dreams seem to be a person who dares to do things instead of holding a complaint. At the same time, he is also a person who likes to go deep into the problem, and for me, I am a person who likes to know, I just want my own head to get a happy person. In addition, I still reserve a point of view: It is not C education problem that leads to the current C community's monster, but the problem of C / C itself. The most important thing is that C continues the characteristics of C, making many users stay in the design mode of C for a long time. Of course, from this letter we see that the C community has been trying to get rid of C, which has formed its own set of systems. Of course, C 's education will have a big crisis on this issue. Snowfalcon brother:

I don't talk about the problem of philosophy, I think you are unilaterally think that Template has high development cost, which is not tested. Template itself is designed to avoid duplication development, its starting point is to reduce the writing of duplicate code and improve development efficiency. Using Template designed libraries, such as STL, Boost, can greatly reduce duplicate labor in the development. As for complexity, this is more a human habit. There are many c enthusiasts around me, they can use the template syntax. On the contrary, if I let me write Python's GP, I started very embarrassed feet.

C development efficiency is relatively low, this is a fact. But you blame this with the template syntax, this is the sky. In fact, if more people use Template, some reputation may be kept in C . Why do you get the development efficiency of C ? Of course, it is impressed from the examples of the side. Why is most C projects look low in development efficiency? There are many reasons, the lack of tools is one, and the projects that usually do with C itself will be relatively large. But these are not what I care, I think that the C community must be solved, mainly two points, one is C education, one is the lack of C class library. A few years ago, C was the darling of the entire industry, and now, it has become a major counterpart role. What damages the vitality of C ? All reasons are in the first place, and it is an unfavorable education for C . Almost all C teaching, all of the C as an extension, let's talk about those low-level knowledge, this trader, even if you understand the full capacity of C , hover all the day in his mind, or Pointer, dynamic memory these low-level things. How often does the Python programmer need to consider the memory release problem? Considering the programmer who will not be lost all day, how can his efficiency can catch Java / VB / Python? Said here, you may refute: "But C itself does need to consider memory recycling problems!". In fact, NO! With STL and Boost libraries, I can really don't have to use Delete, and one byte does not leak. And it is clear that the code is clear. Unfortunately, the entire C education community thinks this is a high-grade C technique, and there has never been in the beginning, telling beginners "you can do this." Including me, many C users are trying to think about it all day: "This function should return a string copy, or it is faster?" More, C programmers Some colleges The day is still quarreling with many clock cycles that occupy more Shared_Ptr! When did you be? ! That Kung Fu, Java programmers completed a project!

C has developed 21 years, from the beginning, it is hoped that it will avoid the low-level operations in C, the same

At the time, it is obtained with C very close to C. However, when we finally have this ability, those bad teachers

And books are still teaching what Malloc and Free! No, a few people pay attention to how to develop C years from the initiator.

Results, how to use C as a high-level language similar to Python, Java.

Now you understand why our C programmer is inefficient, we haven't thought about the Python / Java programmer all day! And these issues are also available, and it should not be considered. This situation has seriously threatened C survival. If the education of C does not improve, I am very pessimistic about it.

In order to explain you, I can simply list some of the capabilities of some modern C libraries:

※ You can eliminate the resource (not only memory) leakage by using Auto_PTR, Smart Pointer.

※ You can generate an array of fixed-size, dynamic arrays, stacks, queues, double queues, priority queues, stacks, collections, ordered mapping tables, disseminated mapping tables, and diagrams.

※ You can use the same code to access a variety of different containers.

※ There is a very well-designed String, and it can easily support internationalization.

※ C IO stream library can abstract all data input output models, and its design is extremely delicate, as long as

Write a stream_buf class yourself, you can use the same code to implement transparent access to various data streams.

The same function, you have to remember the interrelationship between more than a dozen classes in Java.

※ Use BLITZ , C high-speed numerical computing power has surpassed Fortran.

※ Parallel value calculation has no doubt, which is reflected in Pooma, Blitz and MTL libraries.

※ The C network layer based on TAO / ACE provides a very good network computing environment and CORBA implementation.

※ There is a Template-based portable high-efficiency thread library (just appearing, it also needs to be improved).

※ There is a powerful regular expression function, which is very easy to use, and is very efficient.

※ The memory can be used completely and easily, and easily establish its own memory pool.

※ CRC redundant check

※ Data compression access

※ Several heterogeneous objects are viewed as a value (similar to python in python)

Is it surprised that it is actually as long as you use a few lines of code, you can get more east than Python in C .

WEAT. And the efficiency is very high. But have you seen programmers who are skilled in using these facilities? At least I am not

Have seen it. why? Because we spend time how to operate 100 CPU clock cycles!

This is just the beginning, in the next few years, C will increase the coverage of standard libraries and quasi-standard libraries, including database, network, and CGI, including database, network, and CGI. If our education can follow, C can be close to Java in development efficiency. But if our education can't keep up, then the end will only fail.

Just say so much. About FP, you can check the FC library information on the Internet, I believe you will get satisfactory results.

/// The devil blows the flute: For the following two letters, I think I don't have much to say too much. You can understand them from different angles. I am just from the perspective of my habits - economics to discuss issues. It may not be very much as readers who may be programmers. But there is a little MYAN to be more familiar to the C community. His view may have a bigger benefit for most programmer readers /// Dream:

Hello, read your letter. I believe that your fire is relatively large. As you have a few questions about your letter, I look close carefully.

. The letter is mentioned in the letter:

Lack of tools

2. The project itself is difficult

3. C education

4. Scarce of C class library

I said, although after a few days of thinking but my reply is not very big. It seems that my estimate is correct. I shot an arrow to C , although this arrow is not powerful, but I believe that I still shoot a bullsey - If you come from affordable perspectives, at least C is a secondary product. Although you can't blame the syntax of Template, your 4-point question is given me four more powerful arrows (and I still believe that complex grammar and too high learning curve is the root cause of this four issues). These four powerful arrows are enough to give C to exit most of the current market. I don't have any resentment for C , but the market and customer choice is we can't. The products on the market are all decided by customers. Only customers vote in their own pockets. Guest Harmony Java

Tickets that do not cast C will indicate that C itself is quite serious. Perhaps from the perspective of technology: a lot of rich class library, friendly memory management, etc. is advanced, but as long as the customer feels that it is not good to say

Ming they are imperfect, not easy, do not meet the needs of the market, do not meet the needs of customers.

You mentioned the education of C . You said, "In fact, if more people use template, they may recover some reputation for C ." I think your idea may be just a story of a fairy tale. I want to ask why so many people don't need TemPalte? You blame the education of C . So, do you have educated education and a customer vote. C , Java is invented by Americans, then the issue of technical language communication should be quite. There is no more information on Java, and the information of C is scarce. Java is Sun, IBM, WebLogic, etc., the promotion of Sun, IBM, WebLogic, etc., and C will not be poor Borland, Microsoft, IBM, even Sun itself also puts huge sums of money (recent MS, also invited Stanley B.LIPPMAN to develop C tool development) to promote even because Microsoft's boycott of Java is not as C . So why is C education so unfavorable? I think or not affordable, education is also a market. Learning is cost-effective, and the same cost return is naturally in the popular education system.

You said, "Although C has a better memory management method than delete but C teachers and students are entangled in memory release." I have to ask why. Is it just a habit? The answer is negative, habits may have a small number of impacts. The key is that these things are too high. You have to understand these things. You said: "As for complexity, this is more a human habits. I have a lot of C enthusiasts around me, they can use the template syntax in the eyes." We can't read beginners in the eyes of professionals. " People even if they are not learning C but they have paid a lot of Sink Cost for the computer theoretical knowledge and practical experience, there are fewer learning costs to C them to pay. I was a 4-year cost that I had a 4-year-old for learning pinyin. I am using pinyin now, although the efficiency is low, but there is no need to re-learn. Although the five typing is highly efficient, it must be held in two weeks. I can't spend so long. So until now, I still use the low-efficiency pinyin input method, I feel this more economical. From a non-computer professional beginner, you must be familiar with C / C pointers, and the use of OO models is not imagined in the actual use of half a year to 1 year. They learned a year of C / C elective class, I chatted with them C / C , in addition to Printf, scanf is a full understanding. Java's GC has almost no need to spend the cost of practicers. Just just know that Java will be recycled. This temptation is not low-grade, which is C can't match although from my technical perspective, it seems to be a Java GC is a stupid idea.

You said: "A few years ago, C was the darling of the entire industry. Now, it is almost a reputable role of everyone." If you start from the perspective of the demand. The larger the demand for software developers, the price of software personnel is getting lower and lower. If a software personnel need to invest in 1 to six months to learn C but come out, they have only 3,000-4000 pieces, they must feel it is not cost-effective. Therefore, learning C will inevitably open the salary of 6000-7000. However, software companies, especially small and medium-sized software companies, can't afford such high salary. Just like Indian's large software company is no longer a software, which is no longer a software vendor that is more and more professional to form a software factory. They are designed to develop products for fast companies but low salary. So Java VB, Delphi is big. C 's cold and Java VB Delphi's rise of C programmers is a sorrow but from the perspective of market demand, it is a good phenomenon that he reduces the cost of software development, making software more cheaper easier to develop as a society. More wealth. You said: "Why do you get the development efficiency of C ? Of course, it is impressive from the examples around you." I will tell you a little story: We can learn from Physicist Fermi, directly Feeling, it is comparable to the precision measurement. In 1945, the first atomic bomb exploded. When the shock wave came to the masking office of Fermi, Fermi sat down to the ground, and he quickly said that the intensity of the atomic bomb was quickly said according to the distance of the paper. The result is very close to the results of precision instrument measurement. We may wish to examine our real life, you may see the high-end sedan of the airborne glass but you will never see the tractor of the equipment, you will definitely see 34-inch color TV but you will never look To a 34-inch black and white TV, you can also see the covered Java certification but you can't see the C certification exam is so thriving. I am still that technique is not a decisive market demand. The direction of technology must be based on the choice of the market. Now that the C designer and even the entire C community should examine the serious problem of C . I hope that C does not fall like ADA, it is a predetermined study of other language designs but is a secondary product from affordable perspective.

Python's question is actually as serious as C , and I am now worried about the future of Python. In addition, you have listed a lot of high-efficiency class libraries "" Is it surprising that you can get more things in C in C . "You seem to be biased, in fact, Python The function library is far more than the current C multi-slave database, Web / CGI, 3D graphics, numerical calculations, and even artificial intelligent parallel processing. Similarly, as long as you write a row statement, you can realize the features you said. However, Python these things are to be attributed to C / C to write so many rich class libraries, CPYTHON's development is closely related to C .

Thank you.

Ian.king

Dark brother:

Do you have a bow? Why do you get the things you can be as a arrow? :-)

When I wrote a letter, I did some fire, but I was not rushing at you. Instead, for the current domestic C learner status. I originally wanted to write an article, criticizing some bad phenomena in the C community, just right, I will reveal your thoughts to you. But now I have already dismissed the idea of ​​publishing this article, because I have a job now, I can only say, I can't do it, there is nothing practical.

In fact, I'm talking about, I really not only fade, but the reason is very simple, C and C are the foundation of the entire industry. Almost all civil software we can use now, from the operating system to the database, from the TCP / IP protocol to the COM / CORBA component model, from the compiler to the browser, from the office application software to high-speed scientific calculations, everywhere is C And C . At present, they do not occupy the status, only three areas, one is the web, one is a military high reliability software, and one is scientific calculation. Military software, naturally ADA supports, it seems to have ZTE, but I think it will make a practical threat to C for a long time. In the field of scientific calculations, Fortran has been shakes and descending, and Fortran has been close to stagnation (although a recently introduced an Object-Oriented Fortran, but the respondent is embarrassed), and the scientific calculation of American universities and research institutes recently, C It is a strong trend. The only C feels more forceful, it is web. Just Web is now the most red thing, so many people you have can't have C can't be conclusively, and it is too limited. If you come back, WEB C is not necessarily. In this regard, we are trying to walk. My time is really not much, so I can only give you a simple answer to a few questions.

1. You think C is not affordable, I agree. If you can realize this in 1980 and persuaded the entire world based on the ADA or PASCAL, we will be much better. Unfortunately, there is C and C where there is a computer. You want to overthrow, it is impossible, because it is the biggest farewell.

2. C is not destined to learn. I think so too. I have paid four years of hard sweat and I feel entry. But now I think, a person who has not learned any programming language, as long as the intelligence is normal, in the half-year to one year, through the correct education, it is entirely more than me. Although it may not be very clear about many language details, they can write efficient, clear, safe code, constructive powerful applications. This Point Babara Moo and Andy Koenig has proven that their Accelerated C is changing C teaching ideas and face. I am also intended to do some work for this. You will see some practical actions.

Incidentally, the technique to prevent resource leakage does not need to pay a high learning price, easy to learn. Just remember when you want to use a pointer,

Tsometype * P (New Tsometype ());

Rewrite

Shared_ptr P (New Tsometype ());

After learning a few related provisions, it will be. You may feel that users have to learn templates before they are annoyed. But I want to tell you that the correct C education should teach the template the next day. So when he learned a pointer, the template was in my heart. I used to introduce the idea of ​​algorithms and templates for a person who couldn't understand, so that he felt that the template's idea was very nature, and it was very strange why the computer industry regards this as an advanced thing. As for the grammar, I also want to simplify, but I also believe that even if it is not simplified, ordinary people can easily learn the basic grammar - as long as the method is correct.

3. Do customers do not invest C tickets? That is just your world. I have C and C here. Don't forget that this world is not only web, let alone the Web is standing on the shoulders of C and C . 4. About Java. I like Java very much, it is more familiar with it. I like Java because it is better than C in OO, is a serious programming language. Including Python, C #, I have a very strong interest, because I believe they are both rigorous design. But it seems that you like their reasons, you feel that they can develop fast food, so they are very good. This is, but I am very worried about their prospects. I know that you want the software development cost to decrease, but if you don't take care of the quality, I am afraid that I will not do it in any of an economical theory. I have a bit feeling now, and it seems that the programming language market is also a bit like a general commodity market, and it is necessary to divide high files and low files. Like ADA and C , it is possible to have the highest share in any of the future, but its brand has long been shakes long. And if Java is unfortunately returned to the low-end language, no matter how scenario is, no matter how scenario is thrown, it will be quickly hit by others. The low-file market is not changed! You, C # has come. Don't worry, there will be later people.

5. You seem to be an advocacy of the Indian software model. I don't want to go to talk about this problem, but the success of India model is definitely not the success of fast food software. I don't think you think so. The promotion of the Indian model is based on the software leaders and managers' colored glasses, and there is a choice of selection and comments, which is not the whole picture of the Indian model. As a small rebutt, I will give you an example. The recent Herb Sutter has high-grade C courses online, cost is expensive, but India is outside the country in addition to the United States, the most participated in the area. Therefore, in order to take care of the time difference of India, it is also necessary to adjust the time of the course. It can be seen that people don't think we think so.

6. Finally, you said that Python's resources are rich in C . I don't know if you have been investigating, there is no statistics. From Bjarne Stroustrup's homepage you can find a lot of links, some of which are the link library itself, if you are interested in sitting a survey, you can start here. Www.research.att.com/~bs Regarding the relationship between market and technology, I certainly don't think technology determine the market, this is not too ridiculous. But saying that the relationship between them is the market decision technology, I am afraid that it is too simplistic and arbitrary.

As for the world 3 theory, I will consider it again. However, I have no too much thing for this level.

Interest. The last time I talked to you, the more it is close to the truth, the more you use it.

/ Demon blows the flute: I have deleted a number of letters here because I can't find it. In addition, I think this kind of letter is basically around the positioning and future of C , but the above two letters I think it will basically explain the problem, and the discussion below is basically not much change. So in order not to affect the reader, I think it is still deleted as good. ///. . . . . . . . . .

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

New Post(0)