In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The content of this article mainly focuses on what the role of GO is. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
The advantages of Go: fast + low resource consumption + random running in any environment, comprehensive consideration is very good in many scenarios.
Go is suitable for making wheels, and you can build any library that is not easy to use.
Go is suitable for writing tools, such as hugo, hub, fzf, and Baidu pan client under linux written by Chinese people are all implemented by go.
Go is suitable for realizing part of the business of CumberCraft + and most of the business of Java.
Go is suitable for the outermost layer of glue, gluing modules of different languages through RPC/REST/CGO, and a variety of business logic can be implemented in this glue layer without many concerns and limitations like shell/py/node.
Go provides fiber, pointer, unsafe, cgo plus Cmax Cure + compatible memory layout and cross-platform assembly, with the upper limit of what you can do is basically very high.
So the question is not what it is suitable for, but what you have the ability to do with it.
In Go to write a renderer, because learning graphics, need an application framework to reproduce all kinds of graphics technology, papers and learning practice PBRT.
Began to write in C++ and Go at the same time, the main implementation is that Clearing MagneGo is only used to explore the architecture and do rapid prototyping.
In the middle, we need to implement an asynchronous message framework, which is responsible for the data communication between key event and window event of GLFW and graphic logic, skeletal computing and camera control, and to ensure that all drawing event do draw call in the main thread. This function uses less than 100 lines of logic implemented in Go, using only three features: chan, init (), and variable length parameters. It only took about 40 minutes to design + check grammar + finish + test, and then use it until now.
In the process of doing, I found that it was too convenient for Go to implement all kinds of logic, and there was basically nothing I couldn't do, so I finally decided to use Go instead of C++.
It was found that the standard library of Go does not support DDS mapping, so I directly signed up a Go version of the DDS library. Roughly look at wiki to understand the DDS format, and then find the key code from nv_dds, line-by-line translation into Go is done, very simple.
Now writing skeletal animation and GUI, GUI is very valuable in referring to a Japanese nanovg and nanogui transplanted to Go. He implemented draw api based on OpenGL with Go and finished drawing true type fonts with Go.
Because of the need to manage the state of a large number of models, I intend to use orm + sqlite. But gorm is not satisfied with a lot of things and is considering doing it himself.
Now the renderer is to this extent:
Java can write about my world, C # can write Unity,Go and game engines, of course, it can also write other simpler systems, such as some so-called "very complex" business systems.
Go is efficient in both writing business and building wheels. It not only has advanced language features, but also can be used as a better C #, and it is easy to build and deploy.
The main thing that the conventional business Go can be crushed by CCompact + is the instantaneous peak memory, which is unsolvable, but it is no problem to grind Java.
At present, I don't think there is anything that Go is particularly unsuitable or unable to do in the back end.
If I didn't use Go, I would probably only use Rust. If I want to write a lot of matrix operations, generics and operator overloading are the only ones I want, but Go doesn't.
In fact, many people who use Go are also good people in many languages, such as junegunn and spf13, all carrying tens of thousands of star projects.
Finally, here are a few more interesting projects:
Hunterloftis/pbr a physical rendering-based light renderer written by Go
Fogleman/pt another light-tracing renderer
Shibukawa/nanovgo Japanese transplanted Go version of nanovg, which implements Go API for frame, line and word drawing based on OpenGL, which is equivalent to Direct Draw on the original Windows.
The author above shibukawa/nanogui-go migrated the Go version of nanogui, based on the GUI library implemented by the nanovgo he transplanted.
Lua 5.2 VM implemented by Shopify/go-lua Go
A very compact ECS implementation of wooga/go-entitas
Finally, there are too many interesting problems and areas in the world worth learning and exploring.
Language is ultimately used to express your thoughts and thoughts, as long as it can help you solve problems quickly and achieve your goals, it is good language for you.
What is gogo is the abbreviation of golang? golang is a static strongly typed, compiled, concurrent and garbage-collected programming language developed by Google. Its syntax is similar to C language, but it does not include functions such as enumeration, exception handling, inheritance, generics, assertions, virtual functions and so on.
Thank you for your reading. I believe you have a certain understanding of the question of "what is the role of GO?" go ahead and practice it. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.