当前位置:网站首页>Rust, the best choice for programmers to start a business?
Rust, the best choice for programmers to start a business?
2022-06-25 13:23:00 【CSDN information】

【CSDN Editor's note 】 Startups are often under pressure to choose programming languages , Especially when considering choosing a relatively small number of new languages . You need to consider not only the syntax of the programming language itself 、 performance , We also need to pay attention to its attraction to talents . However , The ultimate choice of this startup company is Rust. Let's take a look at their experience !
Link to the original text :https://dailyedit.com/blog/why-rust-is-a-great-choice-for-startups/
Statement : This paper is about CSDN translate , Please quote source for reprint .
translator | Meniscus Coordinating editor | Phoebe
Produce | CSDN(ID:CSDNnews)
We are a short and vigorous team , New things are released every week . Although there are many reasons why we are so efficient , But one of them is that our choice of technology has helped a lot . We will use as much as possible Rust, Because this programming language enables us to accomplish the mission of the company quickly and confidently .
Think of the original , When the project started , We have only three members . I am the only engineer in the team , So I am free to choose languages and tools . Although it sounds good , But I'm under a lot of pressure . In addition to machine learning, it is obvious that Python outside , Everything else is up in the air . We should choose mediocre Java? Or should choose to have a strong community Python? Or should we use JavaScript, Because this language can write almost all software ?
Each alternative has its pros and cons , So I've been spinning around . Breaking the infinite loop is a simple problem : Choosing which programming language will attract talented people , Let's be more confident 、 Release products more frequently ?
therefore , We chose Rust, Now, although our project has matured , but Rust It is still the driving force for our growth and success .

Background introduction
In the course of career development , I have dabbled in many programming languages 、 Editor 、 Tools and methodology .1994 year , I started trying QBasic and MS-DOS Bring your own game Gorillas. I soon came into contact with C, And start at Unix Working on the platform . Later, I learned C++、Python、PHP、Ruby, Of course, JavaScript. Some of them are just for fun , Especially when you're young , Like to try various programming languages .
2015 year , I heard that Rust, Then start trying . Friends keep saying Rust Your grammar is excellent , But I doubt , Because I am like many others , Think C Is the best system language , Because it is so simple and easy to reason .
Until I started using it Rust.
Soon my suspicions disappeared , Actually I'm using C I made a lot of mistakes in language , For example, memory leaks 、 Use the memory after it is released , When used C When you build a small program using the , Don't feel too big a problem , But when you start using libraries , When passing a pointer to another black box , Everything will become chaotic .Rust Let me realize , My programming level is not as high as I thought . The compiler is like a stubborn simulator coach , No matter how well you do , Can not get its recognition . I am here “borrow checker” The stage of is in a bitter struggle , It's like kicking your toe into a corner , The pain pierced my heart and lungs .
But the feeling soon passed .
It took me about 3 A month ago , And I got used to it Rust. later , I started using Rust Writing more complex systems , For example, distributed job queues with asynchronous behavior , And FPGA Interface embedded system , Gradually I began to feel Rust The power of . Use Rust It's like fitness , You must work hard to feel the effect . After these projects , I haven't encountered many annoying compilers , And the organization of the code can be clearly seen early in any project . This is it. Rust, Although a little unpleasant , But it does help you build a good architecture .
but Rust The biggest advantage is not that .
The biggest advantage is , Building large and complex systems , At the same time, after successfully passing the compiler , The resulting binary file will work properly , And it can ensure that it is always normal .Rust The amount of debugging required for the project is one order of magnitude less than I have seen anywhere else . You can use a marked Union (Rust Enumeration ) Something like that , Write clear code . This has greatly increased my confidence in deployment . secondly , Any project has regular changes and maintenance . Usually , New engineers in the company need to spend a lot of time , Delve into code . However , be familiar with Rust The code is very easy , If the new engineer changes the existing code in a strange way , The compiler will point out .

Attract talents
Now Rust The development of has entered its heyday , Many blog posts praise you by name , Of course, there are many blog posts that expose its shortcomings . It's a good phenomenon , That means using Rust A lot of people . Although I like Rust, But other engineers ? We choose Rust Such a relatively small number of languages , The biggest worry is that the talent pool may be too small . What do they think of the world's top talents Rust, What tools will they choose ?
This problem is like a pony crossing a river , It takes hands-on practice . therefore , We contacted Rust News email , And issued a recruitment notice . We are a telecommuting company , We don't care where the engineers choose to live . Fortunately, ,Jack Dorsey On twitter :“Rust Is a perfect programming language ”.
For the next eight weeks , I received emails from nearly 4000 Applicants . Four thousand ! Actually , Many people don't Rust Experience , But they are all right Rust Interested in . All of a sudden , I feel like I have a world-class engineering team .
It seems that we are right Rust The fear of the talent pool is unnecessary . This is a very attractive programming language for programmers .

The actual use Rust
We decided to use it wherever possible Rust. Now our Web The backend is used. Rust Built , The background task processor also uses Rust Compiling , Even the scheduler of the analysis engine is Rust. But some places do not use Rust, Because there are many great libraries in these fields , but Rust Ecosystems do not yet exist . And mobile apps , We use Flutter.
People often say that ,Rust One of the disadvantages of is that the grammar is too verbose , It takes a long time to read and write . This is true , But some are just exaggerations . for example , In our entire code base , There are only a dozen times when you write comments manually . This is not common in application code .
Use Rust, More preparatory work in the early stage . You need to overcome a bunch of compiler constraints . However , Although the experience increases , Writing code will get faster and faster . In just a few weeks , Has made great progress , The speed of work is getting faster and faster . Our team agreed to understand Rust Code is much less difficult than many other languages .Rust There is little confusion and ambiguity in the code , Just read the code , You know exactly what the program is going to do .
Our team of engineers is very awesome , Code iterations are very fast . We decided to use Rust The code rewrites a complete and complex module , And we are sure that it will work properly after compilation . Sometimes our logic goes wrong , Or our understanding of the problem is not completely correct , But these are the problems you will encounter no matter what language you use , But if it is a task that needs to be put into production , Then use Rust It allows us to finish the work faster .
Use Rust Write code , Not only do we need fewer Engineers , And more long-term development .

performance
Rust Very fast , Even better than Python、Ruby、JavaScript and Java A few orders of magnitude .
For startups , High performance means fewer servers are required , The corresponding operating expenses are also lower . As a startup , If you need to spend money to build one that can only support hundreds of requests per second Web The server , Then soon your money will dry up .
Someone might retort that ,“ Engineer time is more precious than computer time ”, That's right , But use Rust It can also save engineers' time , Kill two birds with one stone .

Should startups all use Rust?
I'm not a consultant for a startup .
As the introduction at the beginning of this article , There is a lot of pressure to choose programming languages for startups , In particular, choose a relatively small number of new languages , I'm scared too . however , According to the use so far Rust From the experience of , We don't want to try any other language . although Rust It's a little difficult to get started , But the rewards are also very generous .
In the hands of experienced teams ,Rust It will become a kind of super power .
— Recommended reading —
《 New programmers 001-004》 Fully listed
Welcome to scan the QR code below or click to subscribe now
You can enjoy e-books and exquisite paper books .
* Wei Lai responded that the test car fell off a building : It is preliminarily confirmed as an accident ; First apple M2, new MacBook Pro 13 Inch is officially on sale :9999 Yuan Qi | Geek headlines
*Linux super macOS、 Most annoying Angular.js frame , A survey of 7 The latest discovery of 10000 developers !
*“ Write once , Operating each end ”, Qualcomm heavyweight releases AI Software stack !One key, three links 「 Share 」「 give the thumbs-up 」「 Looking at 」
100 million technical people
边栏推荐
- Sword finger offer II 025 Adding two numbers in a linked list
- Cesium model Daquan glb/glft format
- golang键盘输入语句scanln scanf代码示例
- 关于猜数字游戏的实现
- AGCO AI frontier promotion (6.25)
- API in Nova
- Fedora 35 deploys DNS master-slave and separation resolution -- the way to build a dream
- Openstack learning notes (II)
- Openstack learning notes -nova component insight
- [data visualization] antv L7 realizes map visualization, drilldownlayer drill asynchronously obtains data, and suspends the warning box
猜你喜欢

关于三子棋游戏的简易实现与N子棋胜利判断方法

Django framework - caching, signaling, cross site request forgery, cross domain issues, cookie session token

1251- client does not support authentication protocol MySQL error resolution

关于数据在内存中的存储下

Solve the problem that yarn cannot load files in vs Code

How to determine if a web worker has been created or closed

An article clearly explains MySQL's clustering / Federation / coverage index, back to table, and index push down
![Leetcode: Sword finger offer II 091 Painting house [2D DP]](/img/d7/dc8a3522dbd58b4573cfd75497460c.png)
Leetcode: Sword finger offer II 091 Painting house [2D DP]

leetcode:456. 132 模式【单调栈】

Scope of ES6 variable
随机推荐
How unity makes the UI intercept click events
揭秘GaussDB(for Redis):全面对比Codis
Cesium learning notes
Germany holds global food security Solidarity Conference
On the realization of guessing numbers game
AGCO AI frontier promotion (6.25)
Sword finger offer II 032 Effective anagrams
[turn] starting from the end, analyze in detail how to fill in the college entrance examination volunteer
Unity 2D游戏中的抛物运动
J2EE from entry to earth 01 MySQL installation
leetcode:剑指 Offer II 091. 粉刷房子【二维dp】
Conway's law can not be flexibly applied as an architect?
On the simple realization of Sanzi chess game and the method of judging the victory of n-zi chess
删库跑路、“投毒”、改协议,开源有哪几大红线千万不能踩?
药物设计新福音:腾讯联合中科大、浙大开发自适应图学习方法,预测分子相互作用及分子性质
Configuring pytorch in win10 environment
《MongoDB入门教程》第01篇 MongoDB简介
Scope of ES6 variable
Accidentally modify or delete the system variable path to restore
關於一道教材題的講解