DEV Community

Discussion on: Why is Go so Damn Popular Among Developers

Collapse
 
petros0 profile image
Petros Stergioulas • Edited

I agree with @Łukasz, it is not so popular. But is nice if you want it for DevOps. I would consider it the best together with Rust.

But I find it a pain in the ... writting Web Apps with it. It doesn't have the solutions that Java and Node.js offer.

Collapse
 
totallygamerjet profile image
TotallyGamerJet

If you want to utilize Node.js you can use GopherJS which compiles Go into JavaScript and provide interfaces for calling into JavaScript libraries.

Collapse
 
nikolaykhodov profile image
Nikolay Khodov • Edited

GopherJS doesn't compile but rather transpile.

Transpilation doesn't bring run-time safety and may sometimes generate inconsistent code which can't be debugged w/o deep node.js knowledge.

I also think you can't enjoy all power and performance given by goroutines. The JS runtime is different from what you're used to.

I would think twice to use GopherJS. The other alternative is to really compile into WebAssembly modules with exposed APIs that give you the run-time safety, predictability, portability. node.js natively supports WASM modules.

Collapse
 
petros0 profile image
Petros Stergioulas

Why should one do this? It doesn't worth the hassle.

Thread Thread
 
totallygamerjet profile image
TotallyGamerJet

Well, there are a couple of reasons. First, if you've never used JavaScript and don't fully understand how it works you can use a more familiar language like Go. Second, you can use the entire std library including Go's very strong http support. Third, you can use go routines and channels for easy multiprocessor computation. Fourth, and in my opinion most importantly, Go provides safeties and creates less error prone code. There are probably a ton of other reasons but those are just a few.

Thread Thread
 
petros0 profile image
Petros Stergioulas

The effort you will put on doing this, you can just learn typescript (which really similar to Go).

Well, about the goroutines. Rxjs. Not the same but powerful.

Sorry but I am using on daily basis Go. Sometimes is really frustrating 😂