Programming Terminology(GO)

Armine Khachatryan
3 min readMay 2, 2020

--

Go has a language to talk about its language. Terms have been jettisoned because they come with baggage. Re-envision programming. New words to talk about some concepts. We don’t talk about objects we talk about creating TYPES and VALUES of a certain TYPE. We don’t talk about casting, we talk about CONVERSION and ASSERTION.

“dynamic language”

  • A dynamic language (Lisp, Perl, Python, Ruby) is designed to optimize programmer efficiency, so you can implement functionality with less code.

“static language”

  • A static language (C, C++, Go etc) is designed to optimize hardware efficiency, so that the code you write executes as quickly as possible.

“keywords”

  • These are words that a reserved for use by the Go programming language
  • They are sometimes called “reserved words”
  • You can’t use a keyword for anything other than its purpose

“operator”

  • In “2 + 2” the “+” is the OPERATOR
  • An operator is a character that represents an action, as for example “+” is an arithmetic OPERATOR that represents addition

“operand”

  • In “2 + 2” the “2”s are OPERANDS

“statement”

  • In programming a statement is the smallest standalone element of a program that expresses some action to be carried out. It is an instruction that commands the computer to perform a specified action. A program is formed by a sequence of one or more statements.

“expression”

  • In programming an expression is a combination of one or more explicit values, constants, variables, operators, and functions that the programming language interprets and computes to produce another value. For example, 2+3 is an expression which evaluates to 5.

The var keyword

“parens”

  • ( )

“curly braces”

  • { }

where var can be used

  • Any place within the package

scope

  • Where a variable exists and is accessible
  • Best practice: keep scope as “narrow” as possible

packages

  • Code that is already written which you can use
  • imports

Data types

“primitive data types”

  • In computer science, primitive data type is either of the following:
  • a basic type is a data type provided by a programming language as a basic building block. Most languages allow more complicated composite types to be constructed starting from basic types.
  • a built-in type is a data type for which the programming language provides built-in support.
  • In most programming languages, all basic data types are built-in. In addition, many languages also provide a set of composite data types. Opinions vary as to whether a built-in type that is not basic should be considered “primitive”.
  • https://en.wikipedia.org/wiki/Primitive_data_type

“composite data types”

  • In computer science, a composite data type or compound data type is any data type which can be constructed in a program using the programming language’s primitive data types and other composite types. It is sometimes called a structure or aggregate data type, although the latter term may also refer to arrays, lists, etc. The act of constructing a composite type is known as composition

Zero value

understanding zero value”

  • false for booleans
  • 0 for integers
  • 0.0 for floats
  • “” for strings
  • nil for pointers, functions, interfaces, slices, channels, maps
  • Use short declaration operator as much as possible
  • Use var for zero value, package scope

“idiomatic language”

  • Idioms are patterns of speech
  • Idiomatic language — idiomatic go
  • When someone writes “idiomatic Go” they are writing Go code in the way Go code community writes code

--

--