GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — go-for-javascript-developers/src at master · pazams/go-for-javascript-developers

Expand file tree

/

src

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

src

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
_layouts/website
_layouts/website
 
 
images
images
 
 
pages
pages
 
 
styles
styles
 
 
README.md
README.md
 
 
SUMMARY.md
SUMMARY.md
 
 
book.json
book.json
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 

README.md

Outline

book cover

Introduction

Often, a developer will use more than one programming language at a certain timeframe. Switching back and forth between languages can come with some overhead. These context switches can also result in bugs. For instance, if you switch back and forth between Python and Javascript, there's a likelihood you'll mistake evaluation of an empty array between truthy and falsey. Similarly, if you switch back and forth between Go and Javascript, there's a likelihood you'll mistake switch statements default behavior of break/fallthrough. Outlining the differences between languages can help mitigate these potential issues, and make it easier to transition back and forth.

This document compares between two programming languages, Golang (or "Go") and ECMAScript (or "Javascript" / "JS"). The merits of this pairing is the popularity of these languages. That's it. They are not similar, in fact, they are quite different. Javascript is an event driven, dynamically typed and interpreted language, while Go is a statically typed and compiled language.

If you're reading this there's a high chance you already know your Javascript and are just starting with Go. If so, make sure you first complete A tour of go and Effective go.

Which language should I use?

You should always pick the right tool for the right job. Unfortunately, there will never be a simple formula that will instruct you which programming language you should choose to complete a given task.

science is more art than science

Aside of technical considerations, other considerations, such as community adoption are also important. It was reported that Facebook moved away from the Erlang language because it was hard to find qualified programmers.

Having said that, it is worthy to note that Javascript excels in I/O intense applications, and less so in CPU intense applications.

Semantics

Each subchapter/subject is denoted with (D),(S) or (B) to indicate how it compares across both languages with 'mostly Different', 'mostly Similar' or 'mostly Both'.

This document uses ECMAScript 2015 (ES6). Also, some subjects will note the run-time environment "NodeJS".

Contributions

This book is friendly to suggestions, corrections and contributions. For these matters, please visit the source code for this book at https://github.com/pazams/go-for-javascript-developers and open an issue or a pull-request.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.