TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Learning Go as a Node.js Developer

82 pointsby skellertorover 7 years ago

7 comments

marcus_holmesover 7 years ago
The biggest difference I see: the author immediately reached for a framework instead of checking out the standard library.<p>In Node, the standard library is effectively non-existent, so Node devs get trained and acclimatised to dependencies.<p>In Golang, dependencies are minimised. Everyone tries to stick to the standard library as much as possible. Because the standard library is so good, for most projects this is perfectly reasonable.<p>I&#x27;d say the first thing every Node dev should know when learning Go is that they don&#x27;t need a dependency manager. If you can&#x27;t do it with the standard library then you&#x27;re probably doing it wrong (at least until you&#x27;ve got some experience with the library).
评论 #16338815 未加载
评论 #16337773 未加载
评论 #16337928 未加载
评论 #16337794 未加载
illuminati1911over 7 years ago
Is there really anything else in Go than &quot;pretty good standard library&quot;. Looking at this and many other Go discussion it seems there isn&#x27;t.<p>I&#x27;ve been using Go for a while now and while standard library is ok and definitely better than the one in Node.js and I really like strong typing, I still have to say Go is probably one of the worst programming languages I have ever seen in my life.<p>Error handling is from the stone age, no support for generics, no support for functional programming, no real enum but instead &quot;a hack&quot; you have build by yourself, dependency management without versions etc.<p>Also the hyped features such as channels are nice, but nothing a simple Rx-library couldn&#x27;t do.<p>Due to the language limitations it&#x27;s also nearly impossible to write elegant code with Go. If you take a look at any codebase, build by experienced senior developer or junior dev straight out of college&#x2F;high school the code is almost always the same:<p>Tons of &quot;if err != nil&quot; and for loops.
评论 #16339657 未加载
评论 #16342932 未加载
评论 #16342209 未加载
ingasover 7 years ago
It&#x27;s only natural that coming from such terrible mess as javascript ecosystem author is trying to solve problems he encountered in past.<p>I wrote comment to him:<p>It&#x27;s only natural that you&#x27;re trying to find solutions for problems you encountered in past.<p>But exploring new technology this way leads to absolutely natural mistakes. You&#x27;re are worring about wrong things.<p>Dependency management This problem is not (and never was) in such terrible scale as in javascript.<p>You can forget about this problem while you learn go. I suppose that dep will be released offically when you will really need this.<p>Asynchronicity I did the same mistake as you: I thought that channels and messages are similar to Actor pattern in Erlang, Akka.<p>Don&#x27;t try to think about promises, futures and other abstraction when you programming in go.<p>In fact, you need learn synchronicity now, golang already asynchronous in its nature.
sghiassyover 7 years ago
Super helpful to learn about Go using my existing understanding of NodeJS. Keep it up! Thx
todd_wanna_codeover 7 years ago
So I am trying to move away from NodeJs for my next project and I can&#x27;t decide between Elixir and Go. Can&#x27;t decide what to choose, any idea if there is any advantage for a noob to learn one or the other?
评论 #16337945 未加载
评论 #16338286 未加载
评论 #16337790 未加载
评论 #16337815 未加载
评论 #16345036 未加载
评论 #16337798 未加载
评论 #16338063 未加载
Teeerover 7 years ago
Oh boy, another learning ___ as a ____ developer blog post.
评论 #16337902 未加载
评论 #16337718 未加载
ralusekover 7 years ago
Why would this author feel compelled to write an article about this if they&#x27;re just learning? That asynchronous Go code which is meant to be analogous to the handful of Node lines looks super verbose. Because the author has claimed a lack of expertise, I have no idea if that is actually the correct way to write something like that out...but it certainly doesn&#x27;t make Go look good.
评论 #16337767 未加载
评论 #16338302 未加载
评论 #16337896 未加载