Skip to main content
deleted 76 characters in body
Source Link
AProgrammer
  • 10.5k
  • 1
  • 32
  • 48

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions, with parametric polymorphism and ad hoc polymorphism (akin to interfaces)

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note: in OO circles polymorphism is usually taken to mean inclusion polymorphism, while FP schools it usually means parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first class functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions, with parametric polymorphism and ad hoc polymorphism (akin to interfaces)

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note: in OO circles polymorphism is usually taken to mean inclusion polymorphism, while FP schools it usually means parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first class functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note: in OO circles polymorphism is usually taken to mean inclusion polymorphism, while FP schools it usually means parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first class functions (see the way lambda functions are defined in C++11 for instance).

updated "first order" to "first class" in the last paragraph and reworded bullet points
Source Link

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions., with parametric polymorphism and ad hoc polymorphism (akin to interfaces)

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note,: in OO circles polymorphism is often used alone with that meaning in OO circlesusually taken to mean inclusion polymorphism, while FP schools when they use polymorphism without qualification often meanit usually means parametric polymorphism polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first orderclass functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions.

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note, polymorphism is often used alone with that meaning in OO circles while FP schools when they use polymorphism without qualification often mean parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first order functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions, with parametric polymorphism and ad hoc polymorphism (akin to interfaces)

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note: in OO circles polymorphism is usually taken to mean inclusion polymorphism, while FP schools it usually means parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first class functions (see the way lambda functions are defined in C++11 for instance).

edited body
Source Link
AProgrammer
  • 10.5k
  • 1
  • 32
  • 48

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first orderclass functions.

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note, polymorphism is often used alone with that meaning in OO circles while FP schools when they use polymorphism without qualification often mean parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first order functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first order functions.

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note, polymorphism is often used alone with that meaning in OO circles while FP schools when they use polymorphism without qualification often mean parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first order functions (see the way lambda functions are defined in C++11 for instance).

FP like OO isn't a well defined term. There are schools with different, sometimes conflicting, definitions. If you take what they have in common, you get down to:

  • functional programming is programming with first class functions.

  • OO programming is programming with inclusion polymorphism combined with at least a restricted form of dynamically resolved overloading. (A side note, polymorphism is often used alone with that meaning in OO circles while FP schools when they use polymorphism without qualification often mean parametric polymorphism.)

Everything else is either present elsewhere, or absent in some cases.

FP and OO are two abstractions building tool. They each have their own strengths and weaknesses (for instance they have a different preferred extension direction in the expression problem), but none is intrinsically more powerful than the other. You can build an OO system over a FP kernel (CLOS is one such system). You can use an OO framework to get first order functions (see the way lambda functions are defined in C++11 for instance).

Source Link
AProgrammer
  • 10.5k
  • 1
  • 32
  • 48
Loading