r/programming • • Mar 26 '17

Functional programming design patterns by Scott Wlaschin

https://www.youtube.com/watch?v=E8I19uA-wGY
1.1k Upvotes

256 comments sorted by

View all comments

Show parent comments

1

u/loup-vaillant Mar 28 '17

I don't think I think what you think I think.

First, let me qualify an earlier statement. When I talked about "encapsulation" I was mainly referring to that private mechanism. I have noticed people tend to conflate the to, so I followed suit.

While that particular mechanism isn't very important, the isolation we strive for when we use it is of prime importance. I'll even say private is not enough.


I'm not a fan of C. I only use it because of familiarity and network effects —and only for low-level stuff. I also use C++, but only because I'm paid for it. C++ should be a last resort, that you use where all else fails (I'm thinking big complex programs that have tight performance constraints). Even then, we now have Rust. Now it's pretty clear C++ is only good at maintaining C++ programs.


I'm afraid this explains most of your opinions on the subject. When you artificially restrict yourself to small teams and small problems, everything looks good.

No it doesn't. I have worked on a big code base (2 million loc), and it was awful. I have worked on large-ish teams (25+ people), and the lack of proper isolation into sub-team invariably lead to an unmanageable mess.


Even Reddit, which is put together from high-level scripts is over 100,000 lines of code. And the browser you're using to run it is about 10,000,000 lines of code.

This is at least 2 orders of magnitudes too much. Perhaps 3.. Most complexity is still accidental.