Chapter 1 How to learn a language deeply and efficiently 1 1.1 Learning in comparison 2 Different languages, different rules 2 True and false values in C and Ruby languages 3 True and false values in Java 3 1.2 Learning from History 4 Understand the intent of the language designer 4 We don't know which language to learn 4 Learn what works in a variety of languages 5 1.3 Summary 6 Chapter 2 The history of the birth of programming languages 7 2.1 The History of the Birth of Programming Languages 8 Connecting Cable 8 Program built-in 9 The fortran language came out 10 2.2 Reasons for the emergence of programming languages 11 Laziness: One of the Three Virtues of a Programmer 11 Languages have their own conveniences 12 2.3 Summary 13 Chapter 3 The Birth of Grammar 15 3.1 What is Syntax 16 Operator priority 16 Syntax is a rule set by language designers.17 3.2 Stack Machine and Forth Language 17 Process of Calculation 18 How to express the calculation order 18 Stack Machine 19 is still in use now 3.3 Syntax Tree and Lisp Language 20 Compute flow 20 How to express the order of calculations 20 Syntax tree 21 is still in use Column To confirm whether the understanding is correct, you must first express it 23 3.4 Suffix notation 24 Grammar Analyzer 24 Competition of Rules 25 Column When You Don't Know What to Study 25 3.5 Summary 26 Chapter 4 Process control of the program 27 4.1 The Birth of Structured Programming 28 4.2 Before the birth of the if statement 28 Why is there an if statement 28? Why is there if... else statement 30 4.3 While statement - make repeatedly executed if statements more concise 33 Expressions using while statements 33 Expressions without using while statements 34 4.4 For statement - make the while statement with increasing value more concise 35 Expressions using for statements 35 Expressions that do not use for statements 35 foreach - controls loop operations based on the object being processed 36 4.5 Summary 37 Chapter 5 Function 39 5.1 The Role of Functions 40 Easy to understand—like an organization 40 Easy to reuse – just like parts 41 Characteristics of reuse in the program 41 5.2 Return Command 42 The Birth of Functions 43 Dedicated memory 44 for recording jump destinations Column Function Naming 45 Stack 45 5.3 Recursive Calls 47 Efficient Handling of Nested Structs 48 Handling of nested structs 48 5.4 Summary 52 Chapter 6 Error handling 53 6.1 Programs also have errors 54 6.2 How to Communicate Error 55 Communicate error information via return value 55 Jump to 58 if you make an error 6.3 Statement structure 61 enclosing code that may be wrong John Goodenough's Opinion 61 Introduced CLU language 62 Introduction of C++ Language 62 Introducing Windows NT 3.1 63 6.4 Exit only requires one 64 Why finally 64 was introduced Pairwise operation without omissions 64 6.5 When to throw an exception 68 Insufficient parameters when a function is called 68 Array outbounds 69 Throw an exception 70 immediately after an error 6.6 Exception Passing 71 Problem 71 with exception delivery Inspection exceptions for Java language 71 Reasons why examination abnormalities are not widely used 73 Column Concrete Knowledge and Abstract Knowledge 73 Column Learning emphasizes chewing and swallowing slowly 74 6.7 Summary 74 Column Start where you need to read 75 Chapter 7 Name and scope 77 7.1 Why the name 78 How to choose a name 79 Name Conflict 80 How to avoid conflict 80 7.2 Evolution of Scopes 81 Dynamic Scope 82 Static Scope 84 7.3 Is Static Scope Perfect 88? Scope in Other Languages 88 Problem 89 with nested functions Rebinding of external scopes 91 7.4 Summary 93 Chapter 8 Type 95 8.1 What is Type 96? 8.2 Expressions of on and off of values 97 The invention of digital digits 97 Seven-segment digital tube display 98 Abacus 99 8.3 How many light bulbs are needed on a digital digit 100 From decimal to binary 100 Octal vs. Hex 102 8.4 How to Express Real Numbers 103 Number of fixed points - the decimal point position is determined by 103 Floating-point number – The value itself contains information about where the decimal part begins 104 8.5 Why Type 107 Occurs No genre troubles 107 Type 108 in the early Fortran language Tell the processor variable type 108 Implicit Type Conversion 109 8.6 Various Unfolding of Types 111 User-defined and object-oriented 112 Type 112 as a feature Generic types, generics, and templates 113 Dynamic Type 116 Type Inference 118 8.7 Summary 122 Column Master the outline before reading the details 122 Chapter 9 Containers and Strings 125 9.1 Variety of containers 126 9.2 Why Different Kinds of Containers Exist 127 Array vs. Linked List 127 Strengths and weaknesses of linked lists 130 Column Big O Notation – Concise Expression of the Relationship Between Computational Time and Data Volume 131 Differences in language 132 9.3 Dictionaries, Hashes, and Associative Arrays 132 Hash list 133 Tree 134 element read time 136 There is no one-size-fits-all container 138 9.4 What is Character 139? Character sets and how characters are encoded 139 Coding 140 before the birth of computers EDSAC's character encoding is 142 ASCII era and EBCDIC era 142 Japanese code 144 shift_jis coding breaks the program 145 Magic Annotator 147 Unicode brings unified 148 9.5 What is String 150? Pascal strings with length information and C strings without this information 150 1 character is 16 bits of Java language string 153 Design change introduced in python 3 153 Challenge 154 for Ruby 1.9 9.6 Summary 155 Chapter 10 Parallel processing 157 10.1 What is Parallel Processing 158 10.2 Subdivision before 158 10.3 Alternating two methods 159 Collaborative multitasking mode – alternate 159 at the appropriate node Preemptive multitasking mode - alternate 160 after a certain amount of time 10.4 How to Avoid Race Condition 160 Three conditions for the establishment of race conditions 161 No sharing - process and actor model 162 No modifications - const, val, immutable 164 No intervention 164 10.5 Problems and Countermeasures of Locks 166 Problem with locks 166 Resolve 167 with the help of transactional memory History of Transactional Memory 168 Transaction memory succeeds 169 10.6 Summary 170 Chapter 11 Objects vs. Classes 171 11.1 What is Object-Oriented 172 Object-oriented connotations vary by language 172 The object is a real-world model 174 What is Class 175? 11.2 Methods for Modeling Aggregation Variables and Functions 175 11.3 Method 1: Module, Package 176 What is a module, package 176 Package design object 177 in Perl Modules alone are not enough 178 Save data separately 179 Pass a different hash 179 to the parameter Put the initialization process in the package 180 as well Binding hashes and packages together 181 11.4 Method 2: Put the function into the hash as well 183 first class 183 Put the function in the hash 184 Create multiple counters 185 Put shared attributes into the prototype 186 Is this object-oriented 189? 11.5 Method 3: Closure 190 What is closure 190? Why is it called closure 191? 11.6 Method 4: Class 191 Class 192 envisioned by Hall Class 192 in the C++ language The Role of Function Descriptions 193 The three major functions of classes 193 11.7 Summary 194 Chapter 12 Inheritance and Code Reuse 195 12.1 What is Inheritance 196? Inheriting Different Implementation Strategies 197 Inheritance is a double-edged sword 199 Richter Subsistence Principle 199 12.2 Multiple Succession 201 A thing is in multiple classifications 201 Multiple inheritance is very convenient for implementing mode reuse 202 12.3 The Problem of Multiple Inheritance - There Is Still Conflict 203 Workaround 1: Disable multiple inheritance 205 Workaround 2: Search 207 sequentially Workaround 3: Mixed processing 211 Workaround 4: trait 213 12.4 Summary 216 Column Chapter by chapter from scratch 217
Links:https://pan.baidu.com/s/1PN5Kicx4DdUgFOYQfr1yzQ&shfl=sharesetExtraction code:Tourists, if you want to see the hidden content of this post, please Reply
|