Former Deepin CTO Wang Yong “sharply commented” on the programming language- Development details

Former Deepin CTO Wang Yong recently posted on social networking sitesPost recruitment informationmentioned their team’s rich experience in using various programming languages.

Then he himself talked about some insights about various programming languages, including Golang, Rust, Java, Python, and even mentioned the relatively small Vala. Below is a summary of what he posted.

As a former Haskeller, I would like to share my feelings about Rust. The language is very powerful, but the reason why I don’t catch this language:

1. There are many business logics in the world that require creativity and programming flow experience, but the Rust compiler always interrupts your directional thinking, forcing you to pay attention to unimportant details in the design phase, and you lose a lot of programming pleasure.

2. People in the Rust community don’t seem to understand the concept of market economy and cost. A good software is not only memory safety and absolute performance, but also code readability, scene suitability, deep cognition and continuous maintenance. Value, after rewriting a software, it proves that rust is faster and better than other languages, and the software that is abandoned immediately is worthless.

3. The Rust community advocates the fine-grained control of memory, which is sometimes as annoying as C++ developers. They regard pointers or life cycle control capabilities as comparative bragging rights. Rust is more like a tool to prove that they are better than others. I’m not saying that Rust is bad, but I don’t like the idea that Rust is the best in the world, and everything must be rewritten in Rust.

4. Rust’s mandatory memory management, when writing complex logic, the compiler interrupts too bluntly, making it impossible for people to think quietly about the most important architectural design. Rust is very suitable for low-level libraries or real-time scenarios that do not require GC or performance-critical scenarios. For memory safety, it can tolerate the strictness of the compiler. But in most scenarios in reality, memory safety is not the priority, but creativity and logical clarity are the priority.

source:twitter

It seems that everyone is more interested in programming languages. I would like to share some insights into programming languages. Because of Twitter’s word limit, the language is inevitably imprecise. 😉

1. C/C++: My introductory language is full of raw power. In fact, pointers, memory allocation and release can be used proficiently, and it is not difficult. The more troublesome thing is that if the project is not designed by itself, the logic is more complicated, and the problem of memory safety cannot be cured.

2. Java: The language of my first job (J2ME), rigorous, high industrial quality, born for enterprise programming, especially Eclipse created a precedent for IDE intelligent programming. But it is not free, especially when exploring some technical principles under Linux, you must first define the Class, then create the Object, and then design the setter/gettter. When considering the pattern design, it is not in line with the free spirit of hackers.

3. Haskell: When Tang Feng single-handedly wrote the Perl6 compiler, he was shocked by how terrifying a person’s productivity could be (the first one was John Carmark, my idol). Objectively speaking, Haskell is very strong, and its type derivation , beautiful code, high-performance recursion, lock-free programming, etc. have greatly broadened my horizons. Unfortunately, most of the authors of this language are scientists, and the ecology is average, so it is difficult to find a job.

4. Elisp: I wrote Elisp code for 18 years, and brushed 400+ Emacs plug-ins. In the words of the Chinese, there is no trick to win, no pattern design, no data structure, there is no such thing. Code is data, and data is code. What makes Elisp most exciting to me is that your thoughts flow to the keyboard like water, thinking about where to write, plus Emacs real-time hot replacement, this is the flow feeling of hacker programming. So cool.

5. Python: I wrote a lot of Python codes in the early stage of creating deepin. You only need to read a book “Python Core Programming” to achieve mastery. Python tells me that all data in the world can be combined with string, bool, list, and tuple. It has never preached religious ideas and tricks like other programming languages. There are so many core things, you can always rely on it, a perfect prototyping language, simple and practical.

6. Ruby: I like to read the blog of David, the author of Rails. Life should be as exciting as David, instead of hiding behind the keyboard to attack others and show off. The Ruby language is flexible and full of human touch, which can inspire the fun of “forging swords”. However, as I grow older, the Ruby tricks that I used to find in backpacks all over the world can’t fight against memory decline. I respect Ruby’s little sentiment, but now I prefer memory burden Little Python.

7: Vala: A language that many people have never heard of, the language of the first version of Deepin Terminal, the syntactic sugar of a C compiler, the feel of C#, the compilation and running speed of C, the first version of Deepin Terminal can be started within 50ms Finished, the GObject library is automatically connected through GIR, no manual binding is required, Deepin Terminal has thousands of lines of code, Github actually counts that I am the person who writes the most Vala code in China (囧)

8. Golang: The main language of the company, Python feels good enough, and the performance is good enough. Proper GC is more suitable for writing business logic. It will not rewrite the memory explosion like Ruby, and the performance is much faster than Python. Unfortunately, the error handling is really ugly. Ah, the advantage of a big company is that it has strong endorsements and resources. The disadvantage is that it does not listen to the feedback of the community for some small details, and the development of a language ecology with perfect grammar lacks money.

9. OCamel: Functional programming, but not as ‘pure’ as Haskell. It also provides OOP things. It’s fun to study and play by yourself, but what I want to share is that functional programming is very concise and beautiful when processing lists. But we can’t take the hammer of a functional language and go around looking for nails in a functional scene. It’s fine to wear nice clothes, but sometimes we have to go to the fields to do some dirty work.

10: JavaScript: It may be the language with the largest number of programmers in the world. Objectively speaking, this language has no norms or the norms are changing all the time. The changes are all boring things like grammar. After V8 and npm came out, don’t tell me, the language that many programmers despise, the dirty, messy and lively ecology is much better than the boring world with good mountains, rivers and rivers. Sometimes I sigh, code elegance is not as good as people How powerful it is.

11. CoffeeScript: In 2013, a group of low-level C++ programmers magically changed the browser engine, and used CoffeeScript to write the Linux desktop front-end. The syntax is beautiful, and the F12 debugging interface CSS is so cool. But after the Microsoft bigwigs worked hard to create TypeScript, the language CoffeeScript faded out of people’s vision.

12: TypeScript: If you envy the JavaScript wheel ecology and productivity, but despise the confusing syntax and standards of JavaScript, you must try TypeScript, which is basically the standard configuration of the big front end. Wild programmers like me don’t have to be too biased towards language factions The pure concept between, a good structure is really good, most of the code will be refactored and deleted, because your cognition is constantly improving.

13: Lua: I have used a Mac for a year, and wrote some configurations for Hammerspoon. Lua is really fast, the language is super simple, there are few machine code instructions, the efficiency is very high, and the performance is so fast. Why is Emacs not as good as it is? On Neovim, the speed of Lua is much higher than that of Elisp, but this language does not support Native Thread, so the general-purpose talent is limited, and no matter how strong IPC data transmission is, it cannot match the speed of thread access to memory.

14: Swift: The dream language, which takes into account simplicity, performance and beautiful language, the design is very good, but for an Emacs programmer like me, writing code must be keyboard flow, but Mac must use its graphical IDE to write code. I can’t take it, what a pity. It is said that the language author of Swift is also the author of Rust, so some aesthetic details of Rust are still acceptable.

15: Rust: This language is very good, and its comprehensive strength is very strong. I thank God every day. These two tools rg/fd have saved me too much time. Rust performance and GC-free design are really nothing to say, it is most suitable for commands Running tools and low-level libraries can reduce how many memory security vulnerabilities in the world. I don’t like it. The compiler talks too much, forcing me to care about memory safety, because I don’t need to care about memory safety at the prototyping stage, and I don’t want to write when I’m not in the mood.

16: Common Lisp: Emacs fans, after researching for a while, it still tastes like Lisp, full of brackets and free flavors, and its performance and library ecology are much better than Elisp. But there is no opportunity to practice in daily work and study, so I returned to Elisp. Although no one wants to be proficient in Elisp, at least Elisp can write some Emacs plug-ins after get off work to improve my work efficiency. I don’t know what Common Lisp can do.

17: Shell: I use it a lot when building deepin. Although it is not as beautiful as Python, it is the best glue language. Why? Because when you build the operating system, it is possible that the Python interpreter and many libraries have not been ported to the new chip, so you can only use Shell scripts at this time. Objectively speaking, I don’t use Shell very well, and I admire those masters of system architecture who write shell code screen by screen and get it right once.

18: QML: After writing Qt applications for a while, the structured writing interface is much faster than Qt Layout/Gtk Box. But it is not optimistic, because the real interface structure programming is the best JavaScript/CSS, and the bottom layer of QML is forced rendering by OpenGL. If the hardware is not made by itself (such as embedded), the performance of QML is very poor, because the quality of the graphics card driver of Linux is too poor. , no, bad is an insult to the word ‘bad’.

19: CSS: Actually, it is not a language, but as the most important front-end technology, I have insisted on handwriting CSS for many years. Many low-level developers despise those who do front-end interfaces. But objectively speaking, CSS proficiency is really very difficult. The code is well written, the user experience is better, and the control performance is even better. Without the ability to intersect art and computer, it is really difficult to do this thing well.

20: Scheme: Like Common Lisp, it is a more perfect Lisp language than Elisp. The core is very small and well designed. It is the best Lisp teaching language. It’s a pity that it is even less popular than Common Lisp and Elisp. It is recommended that everyone learn Lisp ideas for the purpose of learning, and forget about other things. It is not used for work and hobbies.

The last thing I want to share is, why do you need to learn many languages?

Because we can learn the design ideas and perspectives of various languages, we will improve our cognition because of “Wow, it can still be like this”, which is the value.

It’s not that I have learned the best language in the world, you are all xxx, the world is chaotic, language is just a tool, we can’t go around with a hammer to attack others to show off, that’s actually stupid.

source:twitter



#Deepin #CTO #Wang #Yong #sharply #commented #programming #language #Development details

Leave a Reply

Your email address will not be published. Required fields are marked *