Concrete types of computation

Most to all computer languages are Turing Complete or can compute every Turing-computable function. This refers to a language that has conditional branching and allows an arbitrary number of variables. If this is the case, then how do different language categories address the notion of computation?

  • Imperative or procedural programming (Assembly, C, Fortran, et al. ): This generally describes computation in terms of statements that change a program state.
  • Object-Oriented programming (Simula, Smalltalk, Java, C++, et al.): This grew out of a need to build larger and more complex systems. Its computation model focuses on data encapsulation and object interaction. While procedural programming treats computation in terms of statements that change a program state, the object-oriented (OO) paradigm encapsulates program states in objects and procedures in methods.
  • Functional programming (Lisp , R, Haskell, APL, et al.): This treats computation as the evaluation of mathematical functions and avoids state and mutable data. In contrast, procedural and object-oriented programming emphasize changes in state, while Functional Programming FP emphasizes the application of functions, very often with immutable data. FP has its roots in the lambda calculus, and many functional programming languages can be viewed as elaborations of lambda calculus.

There are other categories and techniques being researched, such as logic programming, type theory, and so on. We'll focus mainly on functional programming and Clojure, as they provide sufficient and powerful expressivity needed to model our problem domains. These provide a high fidelity of information, faithfully representing credit levels and credit flows within and between bank and bank-like entities. For example, the notion of a function used in imperative programming is that it can have side effects that may change the value of the program state. Functions lack referential transparency, where the same language expression can result in different values at different times depending on the executing program state. This has negative implications when making financial calculations or representing credit properly in your systems. Conversely, in FP, the output value of a function depends only on the arguments that are input to the function, which is much closer to a mathematical function. Eliminating these side effects make it much easier to understand and predict the behavior of a program. This and FP's close proximity to mathematical functions are some of the key motivations for the development of functional programming.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.255.168