Settings

Theme

The mismatch between OO design and function composition

akisaarinen.fi

1 points by amsaarin 13 years ago · 2 comments

Reader

edgls 13 years ago

I don't know Scala, but in Python I do not find any difficulty in mixing two styles.

  • amsaarinOP 13 years ago

    Author of the blog post here.

    I think interfacing functional code from object-oriented code is usually pretty easy. You just wrap the functions to an object instance.

    However, if your 'outer layer' is functional, and try to integrate OO pieces inside it, it can be troublesome to to wrap your OO code in such a way that it's natural to use in a functional context.

    OO paradigm is in some sense more restricting, in that it limits the client of the code to using OO-like patterns.

    Does this make any sense to you?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection