Skip to content

Instantly share code, notes, and snippets.

View nek0's full-sized avatar

rys ostrovid nek0

View GitHub Profile
@nek0
nek0 / keybase.md
Last active May 15, 2017 14:55
Keybase proof

Keybase proof

I hereby claim:

  • I am nek0 on github.
  • I am nek0 (https://keybase.io/nek0) on keybase.
  • I have a public key ASAraZlnNVmSo3irzZd1wGq7xrMsvJa_eIqHxMPJcS--yQo

To claim this, I am signing this object:

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.