2009, “C Language in the Age of Cloud Computing”

Go language core features

  1. Concurrent programming:
  • It's much simpler in concurrent programmingCopy the code
  • Golang's concurrent execution unit is a coroutine called a GoroutineCopy the code
  1. Memory reclamation:
  • Automatic recycling, no management requiredCopy the code
  • Just new, no releaseCopy the code
  1. Memory allocation:
  • Start by allocating a large memory areaCopy the code
  • Large memory is divided into blocks of various sizes and placed into different free listsCopy the code
  • When the object allocates space, it retrieves the appropriately sized blocks from the listCopy the code
  • When memory is reclaimed, unused memory is put back into an idle listCopy the code
  • Free memory is consolidated according to a policy to reduce fragmentationCopy the code
  1. compile
  • Two compilersCopy the code
  • Gccgo built on top of GCCCopy the code
  • A set of compilers for 64-bit x 64 and 32-bit x 86 computers (6G and 8G)Copy the code
  1. Network programming
  • Multiple interfacesCopy the code
  1. The function returns multiple values
  • Allows functions to return multiple valuesCopy the code
  1. Language interactivity
  • Call libraries in other languagesCopy the code
  • Can interact with C programsCopy the code
  1. Exception handling
  • The three keywords defer, panic and recoverCopy the code
  • Defer is executed at the end of the function, first in, then outCopy the code
  • Panic is used when the program has an unfixable error and will let defer finish executionCopy the code
  • Recover fixes the error without terminating the program. Use defer+recover when you are not sure that the function will not failCopy the code
  1. other
  • Type inferenceCopy the code
  • Interface interfaceCopy the code
  • Defer mechanismCopy the code
  • The concept of "package"Copy the code
  • cross-compilationCopy the code

Go Language Advantages

  • Easy learning curveCopy the code
  • Fast compilation practice, high development and operation efficiencyCopy the code
  • Parallel and asynchronous programmingCopy the code
  • Free and efficient: combined ideas, non-intrusive interfacesCopy the code
  • A powerful standard libraryCopy the code
  • Easy deployment: binary file and Copy deploymentCopy the code
  • The stability ofCopy the code