13 in the first half contact Golang, very fond of Golang. It is 2015, a few days away from the Spring Festival, from start learning to year and a half now, the back and Nike Free 3.0 V4 Men forth with Golang also write some code, including your spare time, there are products in the project. The idea has been to write a summary of the relevant Golang or feelings, I decided years ago summarized under the bar. Under state: I just Golang preference, not a brain residual powder, and has no intention to provoke what the language dispute. Nike Free 3.0 V4 Women Characteristics of small, simple grammar. GO is advocating minimalist, promote less is more. This Air Jordan Outlet point in particular on its Spec highlights, one afternoon can definitely read. Characteristics GO little, a lot of users have feedback GO, GO keywords can remember at least in the brain. While its syntax is extremely simple, and semantic clarity. Ease of deployment. GO is a strongly typed static language, code can be compiled to native machine instructions. It RUNTIME will link together at compile time to execute a file, which means that we do not need to install a JVM like JAVA. And compile the executable file itself is not dependent on other DLL can be done easily released. Of course, if you Mens Nike Free Run 3 Shoes Blue 3 use the GO written call some dynamic library interface code, you still need to deploy the dynamic library according to the actual situation. This is in many from python / java to go my friends, very much. There are better and more robust standard library. GO with standard library itself Nike Lunareclipse is more comprehensive, from document archiving, compression, encryption, database data serialization, character formatting, checksum and network libraries, synchronization library everything. Basically able to meet many basic needs. Even better, the quality of these standard library are very high, very strong. Interface is relatively simple, there is clear documentation. Meanwhile, with two years of development, GO third-party libraries are also more up, although it may not like python so much, but compared with its development time, it is still very good. Integration testing framework. When writing code before using C ++, write unit tests is not an easy task. It requires some skill and effort before they can do it. But the integrated unit testing framework in GO, as long as the source file to _test.go end, you can directly go test execution unit tested. It also offers code coverage testing tool, you can easily implement automated testing. In addition, it incorporates benchmarking framework function, you can easily write their own operating efficiency measurement function. In addition, performance profiler, you can run, test analysis bottleneck point in the program, in turn, can be optimized. Improve code style checking tools. GO had to learn, a lot of articles and books will be referred to go fmt this command, unified code style. I felt this really solve the style of the other. The impact of the code is written by someone else to write their own feeling is the same. There golint, go team can follow the style and requirements to write code. There go vet can be used to check some very subtle GO pit. Simple but powerful package management. GO package management package management may be many other languages seem weak, but in my opinion, it solves two problems I need, one is circular dependency issue, GO is rejected there is a circular dependency of the package; Second, the initialization packet, each packet can achieve a file init function to perform when importing. This is very useful when the division of labor. Easy to write cross-platform code. If you use pure GO, do not involve the CGO, you can be very easy to do cross-platform. Just before the file suffix .go, introduced _linux, _windows, _x86, _x64 characters such as the end of the file name prefix can be done only in the corresponding compiler platform. GO also build constraints under what conditions the control code compilation. If you use the CGO, it involves a cross-platform C, and so are some little trouble, but the problem is not too large. recycle. GC presence greatly reduces the writing concurrent code, but also provides a robust program. ++ From the start as a C / C, had a driver development experience programmers, GC this thing that I have not covered before. For me GC is equivalent to a nightmare. But when I began to try to find acceptable GC, GC really solve the programmer productivity, greatly improving efficiency. Although it has the 1.4 version of GO, but still can not be on GC outstanding, according to GO roadmap, later there will be better GC achieve added. Interface and struct. In the first study 2015 Nike Free 5.0 of the interface when the GO, my first reaction is that this is what I want. Although many people are saying this interface GO bad, and said makes sense, such as Zhao's 'Why I do not like GO language style interface.' interface can be expanded through a combination of the new interface, struct can also Nike Air Max be expanded through a combination of new struct. Not inherited, only the combination. You can achieve a similar effect by anonymous inherited portfolio. Interface can be queried, somewhat similar to the COM taste, but more simple grammar levels. struct to interface mappings are implicit, no need to declare a struct implements an interface. While the name may appear on the conflict, but it can be resolved through the wrapper. Another advantage of this interface is very easy to implement MOCK unit testing, it is very fond of. You can also see the article 'Go interfaces make test stubbing easy' unified work layout. GO defines the directory structure of the project, such as bin directory, pkg directory and src directory. This and my daily project layout is the same. Before using C ++ development when we are so arranged layout, so on this point, I felt easy transition. Built-in concurrency primitives. GO mentioned have to mention goroutine and channel. Cheap and cheerful goroutine allows us to handle asynchronous tasks, channel can be used to exchange data. With the goroutine, you can easily achieve high-performance server. goroutine and scheduler can be easily and EPOLL, IOCP mechanism combined with other systems, and through Half Sync / Half Async mode, it is easy to synchronize the form on the grammatical level, but without losing performance. In early 2013, when still doing a client, then use the C ++ 0x, which impressed me most things lambad, std :: function / bind, combined with the thread + queue, it can be very easy to achieve similar Chromuim The threading model. In dealing with UI and slow task such as reading documents, and request data and other interactive network, in order to ensure the UI experience, enabling asynchronous tasks is the very necessary. If you have to Golang understanding or familiar friends will understand that this is similar to the Golang of goroutine + channel. However, when using this model, still felt a bit cumbersome, I want to pay attention to 579765-300 2013 Nike Air Max Lebron 10 Low Easter Outlet the object of the life cycle, this in C ++, although there are a variety of smart pointers Mens Nike Free 3.0 Wool Skin Shoes Grey Navy help, but inevitably will be exhaustive. And slightly more complex problems encountered, such as a slow task followed by a slow task, it will involve a task chain, (Facebook folly open source library has a good realization futures in no future / promise, and later also found WINDOWS There is a library based on the actor model of concurrency Asynchronous Agents Library is very good, but unfortunately currently used only on WINDOWS.) assistance under the mechanism Air Max 2011 Womens Grey Purple easy access Callback Hell. This will lead to code is relatively difficult to maintain, and easy to breed BUG. Fortunately, this part of the code was Mens Nike Free Run 3 Shoes Grey 3 not too much, and is not too complicated, it is easy to pass the self-test stabilize. Although the above mentioned future / promise, AAL Callback Hell can solve part of the problem, but still like the future to use callback. So I was wondering if you can do it is on the code level, synchronous, asynchronous behind it is just cool. GO would meet my needs. GO standard library also provides a sync package, including basic mutex he said, there RMutex this read-write lock, as well as Once, WaiterGroup other things. Basically meet the everyday needs of the lock up. GO To help programmers solve problems when concurrency race condition often encountered, but also provides the appropriate tools to race condition. There are corresponding deadlock detection tool. While GO community has a slogan: 'do not communicate by sharing memory; instead, share memory by communicating.', But between each goroutine not fully independent, the same can be done through shared memory data. This time can only rely on themselves to abide by the programmer. And because goroutine not fully independent, panic kind of thing could lead to the entire program hang. This point and really not very good compared to Erlang. Egg pain defer. Habit of using C ++ RAII after disgusted defer GO mechanism, but sometimes they have to use. The reason is that this is not defer block level, but a function of the level, you need only to be implemented before the function returns. So this will lead in dealing with some similar file open, when the operation was shut down logic is very boring, back to the era of 554988 105 Black Red Nike Zoom KD V 5 Online C, Air Max 2011 Womens Blue Black you must manually go Close. Egg pain of panic. Although I do not use exceptions, but for the panic that I was very dissatisfied with the design in C ++ ah. Because it will affect the overall situation. And to capture the panic on the need defer. If you panic just let the current goroutine hang on Hi skin I felt bad. No generic. GO egg pain caused no generic Mens Nike Free 3.0 Wool Skin Shoes Grey Navy place, or to use interface {} do runtime generics, either on his own to manually write code generator. For example, I own a network protocol in order to generate serialization code on line and a generator. And because there is no generic, I would like to achieve a similar C ++ STL containers and algorithms basically not too likely, of course, the method is still there, continue to use the code generator. And the introduction of a call altogether GO1.4 go generate commands. Summarize GO inside some other built-in data structures, such as slice, map, etc., but these are also criticized because it was not any give programmers can enjoy benefits range keyword. In all features of GO, the favorite is the GC, goroutine, channel and interface. The rest of the features (such as many of the features Nike Jordan Hydro 2 I listed above) I felt not too important, many of which are in engineering practice, and not so much the language itself. To conclude, this thing is an engineering tool, all kinds of easy to use, but speak from the perspective of a variety of rough design, no need overvalued. Engineering practice it counted a good friend. When writing the service side, it is the weapon, at least when writing server-side program, I feel so. A friend said that a language is good to see that there is no open up your horizons, give you new ideas, I think at this point at least GO satisfied. Recommended article 'Less is exponentially more' 'Go in Google: software engineering for the purpose of language design' 'Why Go is not Good' 'Why GO so not to be seen' 'Go the strengths and weaknesses' 'Go at Cloudflare' ' Go at Soundcloud 'talk Golang of Reviews