Re: Object Oriented PHP vs Java
"Agelmar" <ifetteNOSPAM@c omcast.net> wrote in message news:bun77t$k8f 2g$1@ID-30799.news.uni-berlin.de...[color=blue]
> Bruno Desthuilliers wrote:[color=green]
> > Savut wrote:[color=darkred]
> >> "Jerry" <weinstei@nova. edu> wrote in message
> >> news:69fca47c.0 401211031.539ef 63f@posting.goo gle.com...
> >>
> >>> What are the advantages and disadvantages of using Object Oriented
> >>> PHP vs Java?
> >>
> >> >> PHP is not fully OO, even the PHP5... but Java is OO
> >>>[/color]
> >
> > As there is *no* commonly accepted definition of OO, I just dont
> > understand how you can claim such a thing.
> >
> > BTW, Smalltalkers could tell you why Java is not OO !-)[/color]
>
> Actually, there is a commonly accepted definition...
> OO implies:
> polymorphism, encapsulation, and inheritance.
>
>[/color]
Not to beat a dead horse (or a live one for that matter) but WHAT IS OOP?
Object Oriented Programming
That is what it is. Everything else is just fluff. You can design and program OOP with just about any language - even BASIC. It's
all in your design and discipline.
If you never publish a class do you need to have public/private parts to it? No. Would a comment be suffice? i.e.
class example
{
//Private
var m_dontUse
var m_dangerousToUs e
var m_topSecret
//Public
var m_safeToUse
var m_okayToUse
var m_useMe
}
This works fine if you trust your programmers and they are disciplined enough to only use what they are "allowed" to use.
What if you release a library - if the documentation only lists the pubic members then why isn't that suffice - again if you trust
the programmers.
The point is that there is a disconnect between OOPL and OOP/OOD. Do you REALLY need C++ to do OO when you have C?
Let's not forget that C++ compilers used to be PRE-processors - they generated C code.
There is no doubt that OOPL are more convenient to use (though I was criticized in an earlier OT message for suggesting a language
construct just for convenience) the point is that OOP is about the paradigm of building your code based on real-world objects. It
has nothing to do with whether a language allows you to do some neat trickery.
-CF
"Agelmar" <ifetteNOSPAM@c omcast.net> wrote in message news:bun77t$k8f 2g$1@ID-30799.news.uni-berlin.de...[color=blue]
> Bruno Desthuilliers wrote:[color=green]
> > Savut wrote:[color=darkred]
> >> "Jerry" <weinstei@nova. edu> wrote in message
> >> news:69fca47c.0 401211031.539ef 63f@posting.goo gle.com...
> >>
> >>> What are the advantages and disadvantages of using Object Oriented
> >>> PHP vs Java?
> >>
> >> >> PHP is not fully OO, even the PHP5... but Java is OO
> >>>[/color]
> >
> > As there is *no* commonly accepted definition of OO, I just dont
> > understand how you can claim such a thing.
> >
> > BTW, Smalltalkers could tell you why Java is not OO !-)[/color]
>
> Actually, there is a commonly accepted definition...
> OO implies:
> polymorphism, encapsulation, and inheritance.
>
>[/color]
Not to beat a dead horse (or a live one for that matter) but WHAT IS OOP?
Object Oriented Programming
That is what it is. Everything else is just fluff. You can design and program OOP with just about any language - even BASIC. It's
all in your design and discipline.
If you never publish a class do you need to have public/private parts to it? No. Would a comment be suffice? i.e.
class example
{
//Private
var m_dontUse
var m_dangerousToUs e
var m_topSecret
//Public
var m_safeToUse
var m_okayToUse
var m_useMe
}
This works fine if you trust your programmers and they are disciplined enough to only use what they are "allowed" to use.
What if you release a library - if the documentation only lists the pubic members then why isn't that suffice - again if you trust
the programmers.
The point is that there is a disconnect between OOPL and OOP/OOD. Do you REALLY need C++ to do OO when you have C?
Let's not forget that C++ compilers used to be PRE-processors - they generated C code.
There is no doubt that OOPL are more convenient to use (though I was criticized in an earlier OT message for suggesting a language
construct just for convenience) the point is that OOP is about the paradigm of building your code based on real-world objects. It
has nothing to do with whether a language allows you to do some neat trickery.
-CF
Comment