'. '

Go

From APIDesign

(Difference between revisions)
Jump to: navigation, search
Line 33: Line 33:
This is not to say everything in bad in [[Go]]. If you are working in an ecosystem that is build with [[Go]] (e.g. you are coding against [[Docker]] [[API]]s or your are a [[Google]] employee), it may still be beneficial to use [[Go]]. But otherwise, let's consider [[Java]]!
This is not to say everything in bad in [[Go]]. If you are working in an ecosystem that is build with [[Go]] (e.g. you are coding against [[Docker]] [[API]]s or your are a [[Google]] employee), it may still be beneficial to use [[Go]]. But otherwise, let's consider [[Java]]!
-
[[Java]]!? That slow, interpreted [[language]] which eats enormous amount of memory to execute its [[JVM|virtual machine]] and feels like an [[OS|operating system]] on its own? That [[Java]] which every real [[OS]] level hacker hates? Yes, that one. Well, not exactly that [[Java]], but rather a [[SubstrateVM]].
+
[[Java]]!? That slow, interpreted [[language]] which eats enormous amount of memory to execute its [[JVM|virtual machine]] and feels like an [[OS|operating system]] on its own? That [[Java]] which every real [[OS]] level hacker hates? Yes, that one. Well, not exactly that [[Java]], but rather a [[SubstrateVM]]. Let's enumerate what [[Java]] is:
 +
 
 +
* [[wikipedia:static typing|statically typed]]
 +
* [[wikipedia:compiled language|compiled]] language in the tradition of [[C]]
 +
* with [[wikipedia:memory safety|memory safety]]
 +
* and [[wikipedia:garbage collection (computer science)|garbage collection]]
 +
* and [[wikipedia:structural type system|structural typing]]
 +
* with [[Monitor|multi-threading concepts]] built into the [[language]] since day one
 +
 
 +
Does that sound familiar? Yes, the language has the same benefits as attributed to [[Go]]. Moreover (in combination with [[SubstrateVM]]) one also gets similar runtime behavior. [[SubstrateVM]] gives [[Java]] (and any other [[JVM]] language) following:
 +
 
 +
* instant startup
 +
* no interpretter/dynamic compilation overhead
 +
* low memory consumption
If you have a pre-occupation against [[Java]] forget them. We'll use the best of [[Java]] (or any other [[JVM]] language like [[Kotlin]]) and combine them with [[SubstrateVM]] to form a system which is clearly way better than anything [[Go]] can provide.
If you have a pre-occupation against [[Java]] forget them. We'll use the best of [[Java]] (or any other [[JVM]] language like [[Kotlin]]) and combine them with [[SubstrateVM]] to form a system which is clearly way better than anything [[Go]] can provide.

Revision as of 16:18, 21 September 2018

Go is a programming language developed by Google. When it was introduced in 2009, it was promoted as:

it became more known with the rise of popularity of docker (as most of the docker ecosystem is written in Go).

Contents

Forget Go!

The above is probably all you need to know about Go. Because this post isn't here to promote Go, the post is written to explain that you don't need Go at all. That there are better, faster, more approachable, more toolable alternative language. If you are a happy Go user, stick to it, but if you are considering to use Go for development of a new system, then the main take away is: **Forget Go!**, there are better options.

Let's start by enumerating what are the problems with the Go language.

Slow

Go is slow. The same algorithm written in Go runs at least twice as slow than the same algorithm written in Java or C. I have created a project to measure Turing Speed of various programming languages on a variant of Ancient and well known Sieve of Eratosthenes algorithm.

Hard for Coding

Support in IDEs is really bad. TBD. Not an industry standard.

Proprietary

TBD: whole stack is written from scratch and it shows.

Go, Java go!

This is not to say everything in bad in Go. If you are working in an ecosystem that is build with Go (e.g. you are coding against Docker APIs or your are a Google employee), it may still be beneficial to use Go. But otherwise, let's consider Java!

Java!? That slow, interpreted language which eats enormous amount of memory to execute its virtual machine and feels like an operating system on its own? That Java which every real OS level hacker hates? Yes, that one. Well, not exactly that Java, but rather a SubstrateVM. Let's enumerate what Java is:

Does that sound familiar? Yes, the language has the same benefits as attributed to Go. Moreover (in combination with SubstrateVM) one also gets similar runtime behavior. SubstrateVM gives Java (and any other JVM language) following:

  • instant startup
  • no interpretter/dynamic compilation overhead
  • low memory consumption

If you have a pre-occupation against Java forget them. We'll use the best of Java (or any other JVM language like Kotlin) and combine them with SubstrateVM to form a system which is clearly way better than anything Go can provide.

Personal tools
buy