Mark As Completed Discussion

One Pager Cheat Sheet

  • Understanding type systems in programming is fundamental to solving many programming exercises and challenges, and this article by Simon Drake serves as an amazing primer for language-specific interview questions.
  • High-level languages are easier for humans to read and write, but need to be translated into machine code, which can be done through either compilation or interpretation.
  • The compiler takes in the source code and translates it into the target language (usually machine code), potentially through an intermediary language called assembly.
  • The source code is translated on the fly to machine code when needed, to be executed, with interpreters having optimisations to reduce resource waste.
  • Opting for a language with an interpreter or compiler will impact the time and performance of your source code execution, with various additional complexities to consider depending on your language of choice.
  • Statically-typed languages will check code for errors before run-time, while dynamically-typed languages will only check when code is executed.
  • Because of compile-time and run-time performance considerations, statically typed languages provide better run-time performance and have different executables for different architectures, while dynamically typed languages provide quicker set-up times and run the same code on all architectures.
  • A strongly-typed language is one where the programmer declares the data-type in advance, whereas a weakly-typed language is one where the data-type is determined by the input given to it.