Object Oriented Programming suck
Not in terms of php it’s not.
_________________
"Striking up conversations with strangers is an autistic person's version of extreme sports." Kamran Nazeer
Last edited by lau on 10 Apr 2007, 4:40 pm, edited 1 time in total.
It is pretty silly that's what I'm trying to say. You have to look there logic for doing so. They wanted a kind of opposite to var but not quite. It is no different (or better) than !$x except it will check inside an array to see it has values. Actually the zero equals true is quite poignant because with empty "0" and 0 return true (well as of php 4 ). So they obviously got a bit confused. But because of implicit types they had to choose which way they are going to convert "0" and 0 either to string or number. Whereas why not treat 0 and "0" evaluating to true no conversion necessary? No special case i.e. "1" and 1 is treated the same. If I input 0, I want 0!! !. Trying to make it like 'real world' is bad I don't think that is what OO should be about.
No worries:) my memory is pretty bad.
In the case of ruby it is about being consistent 0 is in FixNum class. nil and false have their own classes so they are not inconsistent. I'm not saying you can't have uniqueness that would be crazy.
Well, I have programmed a lot. Mostly in a few languages but I have tried most of them in use in 1990.
I HATED SmallTalk's use of OOP. It was more of an obstacle than a tool for me.
I couldn't stand early augmented implementations of OOP in C. I think C++ was the first one to get it right.
I got used to Java, but its strict OOP style is a pain for fast coding.
I prefer Visual Basic OOP style, which is not quite true OOP, but I like it anyway.
I really like most procedural languages. I remember grinding out code in REXX in the morning, BAL at 2PM, two flavors of C at night, and 680x or x86 assembler the next day, and then some SQL and Visual Basic Script the day after. The transitions seemed to be near effortless back then
I hated APL, Lisp, and Prolog. I could never get my mind to think the way they required me to think.
I have had trouble get Perl, HTML, CSS, and PHP to stick with me since I, being a network guy now, don't code for work much anymore.
I really don't like how OOP was hyped. It is NOT more natural for me, but it does have its place.
Sometimes, though, I had wished the OOP languages had not been such a hinderance when I was developing programs, but I was thankful for their help when I had to debug someone else's code. All in all though, I don't think it was worth the trouble for me.
Just my PI cents