FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » out of sheer curiosity...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: out of sheer curiosity... [message #177432 is a reply to message #177430] Thu, 29 March 2012 12:33 Go to previous messageGo to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 3/29/2012 12:46 PM, The Natural Philosopher wrote:
> Leonardo Azpurua wrote:
>> "M. Strobel" <sorry_no_mail_here(at)nowhere(dot)dee> escribi� en el mensaje
>> news:9tij5fFmi8U1(at)mid(dot)uni-berlin(dot)de...
>>
>>> Yes, this was truly an article.
>>>
>>> Next problem (or assignment) is to understand the supported paradigms,
>>> and how to use them to meet your requirements.
>>>
>>> I think of the - real or felt? - large ignorance of OO programming in
>>> PHP.
>>
>>
>> Probably felt.
>>
>> I mean, I am ignorant of much of PHP. But its support for OOP is quite
>> standard: single inheritance, interfaces, private, public and
>> protected visibility, abstract vs. concrete classes and methods. The
>> "magic methods" which I just discovered thanks to Alvaro Vicario's
>> response to my original post are sort of "idiosincratic", but
>> perfectly understandable. It lacks operator overloading (which I have
>> never actually used) and signature based overloading (which might come
>> handy, but would probably conflict with the dynamic nature of PHP
>> function calls, which I certainly prefer).
>>
>> I have been using (crippled) OO languages for the last couple of
>> decades, and my analisys and design methods are purely OO.
>>
>
> Do you know, I don't even know when my analysis and design methods are
> OO and when they are not.

Erm... seriously TNP?

Hint: If you use words like 'class' and 'new' you are typically in OO.
If you use functions outside a class you are typically procedural.

I think you know.


>
> Its just another way of doing things and I let my understanding of the
> problem guide me, not a set of arbitrary rules.

As it should!

But what 'rules' are you referring to?

PHP's OO is pretty straightforward.
I think they did a decent job implementing OO.(php 5 that is)

Creating smart classes is up to the programmer.
I am not aware of any extra 'rules'.

Are you maybe referring to all kinds of design patterns scattered around
the web?
(In which case I tend to agree, because implementing other people's
solutions can take the fun out of programming. But reading them never
hurts. And when you agree to a certain approach you can even decide to
follow it yourself. It is all up to you, the programmer.)

>
> I dont use OOP languages, because having read up on them extensively
> when they first appeared I simply thought 'oh, ok, I see where they are
> coming from' and incorporated a few ideas about how code and data should
> be organised in pseudo object form, and moved on. The benefits are in
> the way of looking at things, not enforcing a set of strictures on
> programming. Especially when many coding problems do not lend themselves
> to those strictures.

True, but also a truism.
"If a certain problem is unfit for OO approach, it is unfit for OO
approach."

But even then, OO often won't hurt too much either.
You can simply use your procedural logic in OO too.
I worked like that in Java when I started learning the language, until I
discovered how idiotic I was. All part of the learning curve. :-)


>
> (and almost all of the problems to which PHP is the natural language of
> choice do not benefit from OOP. If a web site is the application each
> php 'page' is an object in its own right..anyway.

True for a simple plain webpage, but when you have something more
complex OO can certainly help.
Most (all?) modern MVC software are at least partly OO, simply because
it makes things easier to organize.

With OO you don't have to drag all the information around to each
function that (might) need it. And scope is better organized: more
intuitive.

OO makes things easier to organize, that's all, but it DOESN'T define
how to solve your problem at hand.



> Neither are
> microprocessors in the end object oriented. Object orientation stresses
> the structure of data, whereas procedural coding stresses the way in
> which processing is carried out.)

Both true, but I don't think that the exact implementation on some
microprocessor is relevant for >99% of all programmers.

Most programmers have no clue how to code directly for a cpu.
The last microprocessor I coded directly was the 6502.
I have NO IDEA how to code for my current quadcode, and I don't care either.

We have compilers and interpreters and bytecode and what's more to solve
that.
Programmers focus on the task at hand, often in a high level language.
And OO is a very fine addition.
Give it another try one day. :-)


Regards,
Erwin Moller



--
"That which can be asserted without evidence, can be dismissed without
evidence."
-- Christopher Hitchens
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 5.4 windows installer.
Next Topic: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 06:12:13 GMT 2024

Total time taken to generate the page: 0.06073 seconds