Tuesday, September 19, 2006

OO is for suckers

Im trying to read up on .NET Forms and how they work with .NET 2.0. Im reading a quite good book "Programming Microsoft Windows Forms" by Charles Petzhold. It's a Microsoft Press book. This evening I read something that I though was quite strange. The below quote is from page 167, when the author talks about creating controls in DLLs.

"We haven't been worrying much about making classes public. It's really only an issue when you're putting classes in a DLL."

So, making classes public, private, protected, package (or whaterver its named in C#) is only good when packaging everything in a DLL. I thought it was good OO to make certain classes private, public, etc. Perhaps I was wrong to put classes in different namespaces/packages so classes cant access every other class in a project. But the good thing is that I've been enlighted, and only bother with OO when packaging everything in a DLL.

BTW, I know Im nitpicking, but I thought it was fun :)

1 comment:

Anonymous said...

You're soooo rightwing!
First of all; no one needs namespaces, this creates segregation. Segregation leads to suffering. Suffering leads to hate and hate leads to the dark side.

Secondly; Information wants to be free!!!
Who are you to restrict people from access to what is rightfully theirs?
How many times haven't you found a property in an MS component that you badly need to change, only to find it (at compile time of course) to be read only?
Everything bellongs to the public.