JS and Go: Comparing and Contrasting (Intro)

JS and Go: Comparing and Contrasting (Intro)

JavaScript and Go are two popular programming languages that have gained widespread adoption in recent years. Both languages have their unique histories, features, and use cases. What I will be doing in this series is comparing and contrasting both languages' syntax and features in an attempt to find a sweet spot. 🍳

Why JavaScript?

If you google “top in-demand programming languages (2023)”, I am sure that Javascript will be in the top 3 of the first four results. Javascript is that programming language dominating the web and might be out to capture other territories as well 😃 _ it is beyond just the web now.

JavaScript is a powerful programming language that can be used in all things web and more. It is a dynamically typed, interpreted programming language introduced in 1995 to add interaction to web pages when web pages were static and lacked functionality. Now, with numerous frameworks and libraries, javascript does more than add interaction to a static page, it can be used to build dynamic client-side, and server-side, and is even used as the scripting language for some databases.

Some important things to note about Javascript are:

  • Popularity: Javascript is the language of the web, and modern browsers support it. It has a large community of developers, and many organisations depend on javascript or a javascript-based framework or library.

  • Versatility: Javascript can be used for almost everything in and outside web development. On the web, it features heavily in client-side, server-side, web-based games etc. Javascript can also be used in Artificial Intelligence (AI) and Desktop Applications.

  • Easy to learn: Despite all of its abilities, Javascript is pretty easy to learn.

Why Go?

I am just a while into GO and I am seeing a statically-typed programming language that is easy on the eye. The first line of the Go documentation says “The Go programming language is an open-source project to make programmers more productive” so far, I think that is true.

Go or GoLang is an open-source programming language that can be used in the development of robust, maintainable, and efficient applications. It is a statically typed, compiled programming language that is simple, readable, efficient and supports concurrency (can run multiple tasks simultaneously). It also provides core packages that can be leveraged to build server-side, cloud and network-based programs. Go was developed by a team of developers at Google because things were getting much more complex in Google's codebases.

Some important things to note about Go:

  • Go Goes Fast: Go is a compiled language and compiles quickly into machine code.

  • Standard Library: Go provides a comprehensive standard library that contains all its core packages. You only import what you need.

  • Elegant Syntax: the syntax is concise and clean, and I love it.

JavaScript and Go

In this JS and Go series, I will be comparing and contrasting both languages based on how they are written, data structures, and any other concept I find interesting, taking into account that I have been a JavaScript developer for three years while I am just having a go at Go. I anticipate building a project with Go as the backend and React JS as the Frontend 🤔.

Next, I will examine the Syntax and variables in both Languages. See you then…!