ok so I was happy with Ruby. But then I needed to take some more points in school and decided to take a PHP course since, well whatever. And at first things were, well, ok I guess, not glorious but I survived. And then my teacher said, "Great, now do the rest OO.". And now 4chan, please tell me what an idiot I am for taking a PHP course, or am I wrong?
So now my question is, wtf is PHP? (especially the object part)
Name:
Anonymous2006-11-30 9:32
(First of all, I hope you are studying PHP 5, not 4, for OO.)
PHP is a scripting language designed for web development and simple CLI work, and does the job fine (although it's easy to do it very wrongly and has a few terrible configuration options which must be turned off). It's not the most advanced programming language, but at least it has decent built-in dictionaries/lists and you can do certain things non-dynamic languages won't let you.
It doesn't have the best OO, not even good OO by my standards, but then again, Java doesn't have good OO by my standards and they use it everywhere. (Incidentally, PHP5's OO is modelled after Java's.) You mentioned Ruby. Ruby and Python are IMO two of the four most advanced languages in relatively widespread use, and feature good object models. I understand that the differences you see in PHP are big, but you wouldn't think it sucks so much if you came from more traditional languages.
Keep in mind what it lacks is not necessary for most medium-sized web applications; in fact, you can do just fine without much OO (as it's not too good), something you can't say about J2EE.
Name:
Anonymous2006-11-30 19:09
You said you're happy with Ruby. Ruby is all OO. What's the problem?
OO is PHP is simple and useful.
Name:
Anonymous2006-11-30 22:29
OP obviously has no clue what he's doing and he's just copy/pasting his Ruby on Rails shit.
Name:
Anonymous2006-12-01 0:15
CLI Work? It was never designed for that. It was hacked for that.
Name:
Anonymous2006-12-01 4:29
>>5
Truth is I've been using it over Perl for 70% of my CLI scripts because of the better syntax and needing to change the script in a few months, although I'm phasing out both in favour of Python.
>>9
Maintainability, liking it better (syntax, functional programming features), and the fact that I'm writing (as a hobby) the stuff it'd lack to be agile enough for quick system scripting.
Name:
Anonymous2006-12-01 13:00
>>10
You can do FP in perl. In fact you can do it better because it has proper closures.
(not that I like perl or anything. Ruby/Common Lisp/Haskell/Scheme/Anything but !"£$%^perl or ___python___)
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy