O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Avoiding callback hell

Perhaps the most compelling reason to consider Go for isomorphic web development is to avoid callback hell. JavaScript is a single threaded programming language. When we want to delay the execution of a particular task after an asynchronous call has been made, we would place the code for those tasks inside a callback function.

Soon enough, our list of tasks to delay for execution will grow, and the amount of nested callback functions will grow along with it. This situation is known as callback hell.

We can avoid callback hell in Go, using Go's built-in concurrency constructs.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required