Functional Programming Languages Flashcards

1
Q

Define Functional Programming Languages

A

Functional programming means using functions to the best effect for creating clean and maintainable software.
Functional programming is a set of approaches to coding, usually described as a programming paradigm.

Often defined in opposition to OOP. They are not mutually exclusive however, most systems use both.
Offers clear benefits in certain cases. it’s used heavily in many languages and frameworks, prominent in current software trends.

Ideal in FP is pure functions. A pure function is onw whose results are dependent only upon input paramaters, and whose operation initiates no side effect. It is architecturally simple.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Differences between FP and OOP?

A
  • FP emphasises on evaluation of functions. OOP based on concepts of objects.
  • FP uses ummutable data, OOP uses mutable data
  • FP follows declarative programming model, OOP follows imperative coding model
  • FP supports parallel programming, OOP does not.
  • In FP, statements can be executed in any order, OOP they should be executed in a particular order
  • OOP uses feedback loops, FP doesn’t
  • The basic elements of FP are variables and function. Basic elements of OOP are objects and methods.
  • FP is used when there are few things with more operations. OOP is used when thee are many things with few operations.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Scala?

A

Uses FP and OOP. Combines in one consise and high-level language. Statically typed. Designed to be consise and address many of the issues of Java. It is functional not OOP though. Scala is backend. Structures blocks. Compatible with existing java programs. Well suited to Android development. Twitter uses it and apple uses it in certain teams. UBS approved scala for certain teams. Morgan Stanley uses Scala extensively in their finance and asset related projects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is F Sharp

A

Functional first, general purpose, strongly typed, multi-paradigm programming language. Most often used as a cross-platform Common Language Infrastructure language on .NET, but can also generate JavaScript and GPU code.

Designed by Microsoft. Can be used for IOS and Android apps.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is Kotlin?

A

Cross platform, statically typed, general purpose with type inference. Interoperates fully with Java, but type inference allows its syntax to be more concise. Operates primarily with JVM. May 2019, google announced Kotlin is preferred language for android app developers. Fastest growing language in 2018. Cash app, Netflix, Barclays bank use it.

Corda – a distributed ledger developed by a consortium of banks (Goldman Sachs, Wells Fargo, JP Morgan, Deutsche Bank, UBS, HSBC, etc), has over 90% Kotlin code in its codebase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly