ImperativeFunctionallikeHaskelHardwarelikeVerilog/VHDL- Machine Learning (
Software 2.0)
- Assembly -> C -> Python
- Haskel
- Verilog & VHDL to see how things run at the same time
- 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 wrap a function, modifying its behavior
- 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 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, Manymarkup languages (e.g., HTML)
- 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++standard is1600+pages whileCis700=> more difficult to prove your code from ground principles as you can do withC- You might have to go to the
C standardfor some notions when using theC++ standard C++is a changing language, so different versions of thecompilerare not necessarilycompatible. This leads to problems atbuild/deploymenttime
- C++ and Java differ in their platform dependency, memory management, and use of classes
- C++ is
platform dependentand needs to be compiled on every platform - Java is
platform-independent. Once it's compiled intobytecodeit can be executed on any platform
- 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.