New ask Hacker News story: Ask HN: Do You Miss OOP?
Ask HN: Do You Miss OOP?
4 by parentheses | 4 comments on Hacker News.
I've been writing Typescript in a shared repo lately. I've noticed that rather than using classes, many opt for functions and data (which is the "FP way"). I can't help but want OOP for situations where encapsulation is helpful. Creating boundaries around code with similar level of abstraction is useful. The opposite is what we have in Typescript - every file is a bag of functions and data with no clear distinction between parts that may do file IO and business logic. After re-reading my whining, maybe this is more of a "Tell HN". lol.
4 by parentheses | 4 comments on Hacker News.
I've been writing Typescript in a shared repo lately. I've noticed that rather than using classes, many opt for functions and data (which is the "FP way"). I can't help but want OOP for situations where encapsulation is helpful. Creating boundaries around code with similar level of abstraction is useful. The opposite is what we have in Typescript - every file is a bag of functions and data with no clear distinction between parts that may do file IO and business logic. After re-reading my whining, maybe this is more of a "Tell HN". lol.
Comments
Post a Comment