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 #177434 is a reply to message #177432] Thu, 29 March 2012 13:39 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 3/29/2012 8:33 AM, Erwin Moller wrote:
> 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.
>

You forget who you're talking to, Erwin. TNP is not a programmer, both
by his own admission and by his posts here. It doesn't surprise me he
doesn't think OO is any good. I knew a guy like that when I worked for
IBM back in '90. He "read a book about it and didn't see any advantage
in it". But then he wasn't a programmer, either.

>
>>
>> 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.)
>

Any rules TNP doesn't bother to understand are "arbitrary" in his mind.
He doesn't even like having to follow PHP syntax rules - as he has
also said in the past.

But I disagree that PHP 5's implementation of OO is decent. I think
it's half-assed at best. Truly written by people who have no
understanding of OO. But then that can be said of a lot of PHP.

>>
>> 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. :-)
>

I agree - I've seen some things which work better using a procedural
approach. But I've also found the more complicated something gets, the
more appropriate an OO approach becomes.

It's like designing a soap box derby racer vs. an SUV. I'd build a kids
racer out of raw materials. It's small, simple and relatively easy.
However, do you think car manufacturers do it this way? Or do they take
an engine from one model, modify the body style from another, etc.? And
if they don't have the right engine, do they design that as part of the
car? Or do they specify the dimensions, mounting, etc. and separately
design the engine to that specification?

No, they don't have to do it that way - they could design each piece
from the bottom up. And then if they change the seats from bench to
bucket, they might find an interdependency and have to also change spark
plugs.

>
>>
>> (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.
>

No, a page is not an object. A page is closer to a transactional
application. For instance, the page cannot be reused in another page
without modifications. Objects can.

> 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.
>
>

Very true.

>
>> 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.
>

That's because if it isn't good for microprocessors, it must not be good
for anything, according to TNP.

> 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. :-)
>

I can code Intel processors - I started back in '82 when the typical PC
had 64K or 128K of RAM (and slow). We needed to do some stuff in 808x
assembler. I still do a little as a hobby (mainly to keep up with it),
but I don't go down to the OS level.

>
> Regards,
> Erwin Moller
>
>
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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: Thu Nov 28 06:41:55 GMT 2024

Total time taken to generate the page: 0.05081 seconds