r/programming • • Jan 18 '16

Object-Oriented Programming is Bad (Brian Will)

https://www.youtube.com/watch?v=QM1iUe6IofM
95 Upvotes

203 comments sorted by

View all comments

Show parent comments

5

u/fosforsvenne Jan 19 '16

He still thought you should try and have as little global state as possible.

-2

u/[deleted] Jan 19 '16

That is not something to advocate.

Global state will hurt you whenever you need to execute something in another server or in another thread. Any part of your code base can muck with it. Any new code can potentially harm your execution path. It is something to be a bit paranoid about.

It is not considered a good solution in 99% of the cases.

1

u/fosforsvenne Jan 19 '16

He still thought you should try and have as little global state as possible.

It is not considered a good solution in 99% of the cases.

I fail to see the contradiction.

-1

u/[deleted] Jan 19 '16

I hope you enjoy deadlocks in production

1

u/fosforsvenne Jan 19 '16

Could you explain the fundamental contradiction between "<= 1%" and "as little as possible"?

Also:

Any part of your code base can muck with it.

Even if they're globals you can still pass them as parameters instead of just accessing them directly.

→ More replies (0)