OOP vs functional (11)

3 Name: #!/usr/bin/anonymous : 2012-01-26 01:47 ID:auY5imFY

Functional isn't opposite of OO, because there is functional OO.

OO with immutable objects is functional. (States can still be represented by creating new objects based on old ones.)

From a functional point of view, OO is a way of organizing the types into classes which are tuples of properties optionally linked by inheritance relationships, and of dispatching methods based on class-based pattern matching over the argument lists.

Functional OO is "cleaner" than regular OO in some ways. For instance circle-ellipse issues don't arise, because you can't mutate a circle or ellipse once it is constructed.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: