Another Respected Developer Says Farewell to Node.js and Hello to Go

Alex Williams · · 1398 次点击 · · 开始浏览    
这是一个创建于 的文章,其中的信息可能已经有所发展或是发生改变。

TJ Holowaychuk, a prominent module writer, made his farewells to Node.js and is turning to Go, which he calls a “next generation,” programming language in the same company as Rust and Julia.

It’s the latest high profile departure from Node.js to Go, as noted by Zef Hemel in a post today. In particular, he cited Felix Geisendörfer, a frequent contributor who moved on to Go in 2012.

Hemel also cited Koding, which provides a web-based development environment.

Holowaychuk is the creator of the Luna programming language. He is also the force behind Koa, Express, Stylus, Cluster, Mocha, Jade and node-canvas.

He writes in a post published yesterday that Node.js does some things well but it is not suited to his interests these days in distributed systems. Node.js stresses performance over usability and robustness. He finds Go “performs better, is easier to maintain, and has better test coverage since synchronous code is generally nicer and simpler to work with.”

He likes C but it is not a language for working with every day.

For Holowaychuk, most satisfying about Go is its iteration speed. He hopes the community will be willing to break things in Go but he recognizes with big companies behind it, breaking things can be a problem for people managing big systems. But it could help make it more resilient and stronger.

Why Go

Summarizing, he says Go is robust for its age and refactoring with types is pleasant and simple. The tooling for profiling and debugging works and the community has “a very strong conventions regarding documentation, formatting, benchmarking, and API design.”

Go’s primitives are more suited to distributed computing than Node.js’s generators. Node.js does not have separate stack error handling. Without it, reporting is mediocre.

I also don’t want to wait 3 years for the community to defragment, when we have solutions that work now, and work well.

There’s also Go’s error-handling, too, which Holowaychuk says is superior. Node.js makes you look at every error, which helps the developer think but it also has some flaws, which he lists as follows:

  • you may get duplicate callbacks
  • you may not get a callback at all (lost in limbo)
  • you may get out-of-band errors
  • emitters may get multiple “error” events
  • missing “error” events sends everything to hell
  • often unsure what requires “error” handlers
  • “error” handlers are very verbose
  • callbacks suck

Howaychuk is a philosophical and a natural writer. He’s critical of Node.js but in a constructive way. In particular, he puts the onus on Joyent to make Node.js more usable.

I have written about Poptip moving to Go. Many of the emerging services use Go, too. Docker, CoreOs, Dropbox and MongoDB to name some of the more prominent users.

Are the Node.js issue overblown or misguided? I am curious about this one. It may be time do a Google Hangout on the topic.

Feature image via Creative Commons on Flickr.

本文来自:The New Stack

感谢作者:Alex Williams

查看原文:Another Respected Developer Says Farewell to Node.js and Hello to Go

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:muxilin131420 备注:入群;或加QQ群:729884609

1398 次点击  
加入收藏 微博
0 回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传