Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 2.59 KB

File metadata and controls

47 lines (38 loc) · 2.59 KB

Types

  • Imperative
  • Functional like Haskel
  • Hardware like Verilog/VHDL
  • Machine Learning (Software 2.0)

Languages to Learn

  • Assembly -> C -> Python
  • Haskel
  • Verilog & VHDL to see how things run at the same time

Statically-typed vs. Dynamically-typed Language

  • In a statically-typed language, the type of a variable is determined at compile time, rather than at runtime.
  • This means that the type of a variable must be specified when it is declared, and the variable can only hold values of that type.
  • In contrast, a dynamically-typed language like Python does not require you to specify the type of a variable when you declare it.

Decorators

  • Decorators wrap a function, modifying its behavior

Imperative Programming Language

  • Code describes a step-by-step process for a program’s execution. This process is called the control flow
  • Examples of imperative languages like Java, C, Pascal, Python, Ruby, Fortran, PHP

Declarative Programming Language

  • Declarative programming describes what you want the program to achieve rather than how it should run.
  • You define the results you want a program to accomplish without describing its control flow.
  • Examples of declarative programming languages like SQL, Miranda, Prolog, Lisp, Many markup languages (e.g., HTML)

OOP vs. Non-OOP Languages

  • It's more a matter of how you write than what you can express
  • Some people prefer to have a special syntax support for functionality, but that comes with much more complex language like C++
  • Different systems will lead to different choices like mission-critical (performance/correctness)

C vs. C++

  • C++ standard is 1600+ pages while C is 700 => more difficult to prove your code from ground principles as you can do with C
  • You might have to go to the C standard for some notions when using the C++ standard
  • C++ is a changing language, so different versions of the compiler are not necessarily compatible. This leads to problems at build/deployment time

C++ vs. Java

  • C++ and Java differ in their platform dependency, memory management, and use of classes
  • C++ is platform dependent and needs to be compiled on every platform
  • Java is platform-independent. Once it's compiled into bytecode it can be executed on any platform

Public vs. Private vs. Protected

  • Public variables, are variables that are visible to all classes.
  • Private variables, are variables that are visible only to the class to which they belong.
  • Protected variables, are variables that are visible only to the class to which they belong, and any subclasses.