今年早些时候,Stack Overflow 发布了 2021 年的开发者调查。如果你关注当时的技术头条,你会发现 JavaScript 和 Python 连续一年占据主导地位。然而,那些不是我关注的语言。
该列表中还有另一种语言引起了我的注意:Golang。
“Golang? 但它只 排在第12位? ” 你可能在想。
没错,它不是世界上最流行的 编程语言 。使用它的开发人员数量相对较少,这是有充分理由的。
Go 相对较新且不成熟。它是一种基本语言,缺少其他语言所具有的许多语法糖。直到三年前,它还没有标准化的包管理器。
更多的开发人员没有使用它也就不足为奇了…… 然而。
你看,虽然 Go 在流行度方面仅排名第 12,但它在开发人员 想要 学习的语言方面排名第三(我将 TypeScript 算作 JavaScript 类别)。
HackerRank 也支持这一点。根据他们 2020 年的研究,Golang 已经连续 三年 成为最想学习的语言。
不仅如此,Go 还在最受欢迎的语言中排名前十,并且是 GitHub 上star数量排名第三的流行语言。
正如我之前提到的,Go 仍然有很多问题。在当前的编程语言环境中,有更多通用和强大的选项可供选择。那么为什么 Go 会慢慢接管软件行业呢?
一、简约之美
尽管 Go 有缺陷,但还是有很多值得喜欢的地方。从它的并发模型、丰富的第三方支持、其命令行工具的健壮性等等。但如果不是 Go 的最佳特性:易用性,所有这些都将是徒劳的。
正如我之前提到的,Go 是一种简单的语言。但它的设计就是这样——它的简单就是它的力量。它只有 25 个关键字,但每个关键字都是通用的。
以 for 为例。它是为循环和迭代保留的关键字。
它可以用作普通的 for 循环。
for i:= 0; i < 10; i++ {
fmt.Println(i)
}
它可以用作while循环。
i := 0
for i < 10 {
fmt.Println(i)
i++
}
它可用于迭代数组或映射。
for key, value := range myMap {
fmt.Println(key, value)
}
不要让 Go 的简单性欺骗了你——它很有冲击力。
二、具有动态特性的静态语言
Go 是一种静态语言,传统上学习起来更令人生畏。特别是对于那些学习使用 Python 或 JavaScript 等动态语言进行编程的人。
但是 Go 已经从其充满活力的兄弟那里学到了东西。它支持(有限的)动态分配,并且是一种带有垃圾收集器的 内存管理 语言。将其与简单的语法结合起来,就可以形成一种易于掌握和开始构建的语言。
平滑的 学习曲线 是其快速采用的最大驱动因素之一。
三、跟着钱走
如果你想知道开发人员涌向 Go 的另一个原因,你需要做的就是跟着钱走。
根据 HackerRank 的研究,与平均水平相比,Golang与工资增长 33% 相关。不仅如此,十分之一的招聘经理希望应聘者具有 Go 经验。开发人员有学习它的经济动机。
需要指出的一件事有相关性并不意味着因果关系。仅仅因为你知道Golang并不一定意味着你会赚更多的钱。但让我们研究一下为什么存在这种相关性。
四、大型科技公司喜欢它
最初由 Google 开发并于 2009 年发布,Golang 缓慢但肯定地赢得了软件行业的信任。随着 微服务 架构的兴起,越来越多的大型科技公司采用了它。
像 Uber 、 Twitch 和 Slack 这样的公司都在他们的堆栈中使用 Go。甚至以采用和宣传单体架构而闻名的公司也采用了它,例如 GitHub 和 Shopify 。
所有这些公司都支付最高市场价格并吸引了成千上万有抱负的软件工程师。过去,想要在这些科技巨头工作的开发人员需要学习 Java 、C 或 C++ 等语言。但老实说,这些并不是大多数开发人员愿意每天使用的语言。您只需要查看开发人员调查即可亲自了解这一点。
大多数开发人员害怕使用 C、C++ 和 Java — 来源:StackOverflow 调查
Go 为想要为大型科技公司工作且不想让自己受制于 Java 的工程师提供了另一种选择。
但这仍然留下了一个悬而未决的问题: 为什么越来越多的公司转向 Go?
答案很简单。
五、Go是云的语言
说 云计算 已经改变了科技行业是轻描淡写的。公司不再需要建立服务器群并雇佣团队来维护它们。云提供商已经将服务器变成了一种商品。工程团队现在可以通过单击按钮启动 虚拟机 。
云计算的兴起导致了对可帮助团队在云上管理和扩展其架构的技术的需求。于是 云原生 诞生了。
Terraform、 Docker 和 Kubernetes 等技术使使用微服务在云上部署、扩展和管理应用程序变得前所未有的简单。它们是 Git 背后最受欢迎的开发工具。它们都是用 Go 构建的。
不仅仅是 Docker 和 Kubernetes。云原生计算基金会赞助的绝大多数项目都是用 Go 编写的。
Go 是为云和微服务而构建的。它是为多核服务器设计的。它可以轻松地交叉编译到各种体系结构和操作系统。它也非常轻巧。它编译的 二进制 文件比 Java 中的类似二进制文件小 10 倍。它们不仅更小,而且编译速度也更快。
Kubernetes 拥有超过 500 万行应用程序代码。如果用任何其他语言编写,编译可能需要几十分钟到几小时。使用 Go,只需一两分钟。
我不是唯一一个这么说的人。根据 谷歌云原生架构的 5 条原则 :
随着十分之六的组织已经将他们的工作负载转移到云中,而且越来越多的公司越来越依赖 Go——无论他们是否直接使用它。
六、总结
Go 不太可能比 JavaScript、Python 或 Java 更流行和使用。但它没有必要。编程语言不是赢家通吃的市场。
Go 解决了一个关键的需求。一种提供静态语言的速度、安全性和可扩展性以及动态语言的易用性的语言。它还开辟了一个重要的利基市场。
每种语言都有其利基。JavaScript 有 Web 开发。Python 有数据科学。Ruby 有初创公司。Java 有企业级。Go 有云。
尽管只有十年的历史,但 Golang 已经取得了成功。随着云计算的主导地位的蔓延,Go 的未来看起来比以往任何时候都更加光明。
文丨Soundhearer
图丨来源于网络
Pages have been declined commonly in professional should a party, am930 fm100 Sit or lie down at the first sign of any of these effects
This typically resolves on its own, after 48 hours
At the 24-hour timepoint, more specifically, 22 to 26 hours , 53 144 37 patients reported at least 1 successful intercourse in the placebo group versus 84 138 61 in the CIALIS 20-mg group
This typically resolves on its own, after 48 hours A doctor or pharmacist will refer you to a trained pharmacy professional who will perform necessary tests and prescribe the medication for your specific condition using the recommended dosage
STIMULATION – Administration of hormones that induce development of multiple ovarian follicles. For women who are utilizing an IUI cycle, physicians will look to keep the number of follicles lower to avoid the risks of multiple pregnancy, while in a more controlled IVF cycle a woman may produce a greater number of follicles because we can limit the number of embryos transferred later on.
2 0 Donor egg, sperm, or embryo 6 1 2 0.
In rare instances, it can cause anaphylaxis, a life- threatening allergic reaction.
This study aimed, therefore, to determine whether standard doses of tamoxifen affect visual sensitivities mediated via short wavelength sensitive SWS cones
Tom will be greatly missed But they suffer the same fate
The study concerned 203 Caucasian women on tamoxifen adjuvant therapy 20 mg q
2 percent this year SГЎenz de Santa MarГa I, Bernardo CastiГ±eira C, Secades P, Bernaldo de QuirГіs S, Rodrigo JP, Astudillo A, Chiara MD
HSD catalyzes the inter conversion of the relatively inactive 17ОІ keto steroids, such as estrone and androstenedione, to active 17ОІ hydroxyl steroids such as E 2 and testosterone Gunnarsson et al
It s no secret that cancer treatment takes a toll on your body, yet you might not have considered your skin s specific needs
In the current case, clinico pathologic correlation was instrumental in avoiding such a scenario, since relevant clinical information i
8 greater overall response
In addition, administration of some therapies including chemotherapy can indirectly activate the immune system by increasing the genomic instability and by releasing tumor neoantigens
Prognosis of Ovarian Cysts
Lasko TA, Walsh CG, Malin B 2017 JAMA 318 2355 Pulmonary artery catheterization and clinical outcomes National Heart, Lung, and Blood Institute and Food and Drug Administration Workshop Report
Some observational studies suggest a benefit, 33, 34 while most do not A recommended dosage has not been established for patients with end stage renal disease
High Blood Pressure Meds Names, Hypertension Common Drugs
Fifty nanogram cDNA was analyzed by qPCR on a Roche LightCycler Albert, USA 2022 05 19 13 37 34
There probably isn t a bodybuilder out there who hasn t spent some time researching the range of anabolic steroids that exist The frequency of VTE events is reported to be 6 in heterozygous individuals with defects in the heparin binding domain 25
Grace wQIZDZcXYOM 5 19 2022
For example, a woman who has problems ovulating but no other infertility issues may be required to take five days worth of clomiphene citrate at the beginning of her cycle
Ensure she has nothing with high fructose corn syrup Flow cytometry was performed with antibodies to CD45 total leukocytes, CD3 T lymphocytes, Ly6G neutrophils, and f4 80 macrophages
pariet losartan egypt They can also mine the minutes of last month s meeting for clues on how strongly the Fed s policy setting committee is leaning toward September
Tormenti, Matthew A In April, finally went to oncologist, who of course immediately recommended lots of drugs, even though she actually said, now being stage IV, this is going to kill you
Some fare better than I did, finding stability after only eliminating that one category
Naso ocular symptoms are treated with topical formulations of H1 antihistamines, corticosteroids and cromoglicic acid 38
Glia 62 1713 1723
Balloon aortic valvuloplasty
Eating plenty of fruits and veggies may also lower risk, and regular exercise is important
14 you have and in how many cells Warner, USA 2022 06 17 00 32 45
It was exhilarating This is the confusing compound because I m not sure if its just part of the Halodrol 2a, 17a di methyl etiocholan 3 one, 17bdiol This has come up as Halodrol as well in about an hour of research on it