Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #5385 > unrolled thread
| Started by | "Mr. B-o-B" <mr.chew.baka@gmail.com> |
|---|---|
| First post | 2012-04-09 14:35 -0500 |
| Last post | 2012-04-12 13:18 -0400 |
| Articles | 8 on this page of 28 — 11 participants |
Back to article view | Back to comp.lang.php
OOP versus Procedural/Functional "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2012-04-09 14:35 -0500
Re: OOP versus Procedural/Functional "J.O. Aho" <user@example.net> - 2012-04-09 21:59 +0200
Re: OOP versus Procedural/Functional The Natural Philosopher <tnp@invalid.invalid> - 2012-04-09 22:46 +0100
Re: OOP versus Procedural/Functional Michael Vilain <vilain@NOspamcop.net> - 2012-04-09 19:29 -0700
Re: OOP versus Procedural/Functional Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-09 16:55 -0400
Re: OOP versus Procedural/Functional "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-10 00:34 +0200
Re: OOP versus Procedural/Functional Goran <goran@nospam.com> - 2012-04-10 10:14 +0200
Re: OOP versus Procedural/Functional "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-10 12:06 +0200
Re: OOP versus Procedural/Functional The Natural Philosopher <tnp@invalid.invalid> - 2012-04-10 13:04 +0100
Re: OOP versus Procedural/Functional Tim Streater <timstreater@greenbee.net> - 2012-04-10 16:07 +0100
Re: OOP versus Procedural/Functional The Natural Philosopher <tnp@invalid.invalid> - 2012-04-10 16:28 +0100
Re: OOP versus Procedural/Functional Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-10 12:08 -0400
Re: OOP versus Procedural/Functional "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-10 19:14 +0200
Re: OOP versus Procedural/Functional The Natural Philosopher <tnp@invalid.invalid> - 2012-04-10 18:19 +0100
Re: OOP versus Procedural/Functional Michael Fesser <netizen@gmx.de> - 2012-04-10 14:49 +0200
Re: OOP versus Procedural/Functional "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-04-10 17:29 +0200
Re: OOP versus Procedural/Functional The Natural Philosopher <tnp@invalid.invalid> - 2012-04-10 16:34 +0100
Re: OOP versus Procedural/Functional crankypuss <no@email.thanks> - 2012-04-11 05:16 -0600
Re: OOP versus Procedural/Functional Goran <goran@nospam.com> - 2012-04-11 16:25 +0200
Re: OOP versus Procedural/Functional Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-11 13:06 -0400
Re: OOP versus Procedural/Functional Tim Streater <timstreater@greenbee.net> - 2012-04-11 18:18 +0100
Re: OOP versus Procedural/Functional Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-11 16:24 -0400
Re: OOP versus Procedural/Functional Tim Streater <timstreater@greenbee.net> - 2012-04-11 22:43 +0100
Re: OOP versus Procedural/Functional crankypuss <no@email.thanks> - 2012-04-12 05:54 -0600
Re: OOP versus Procedural/Functional "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-11 19:09 +0200
Re: OOP versus Procedural/Functional crankypuss <no@email.thanks> - 2012-04-12 05:56 -0600
Re: OOP versus Procedural/Functional "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-12 17:33 +0200
Re: OOP versus Procedural/Functional Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-12 13:18 -0400
Page 2 of 2 — ← Prev page 1 [2]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-04-11 18:18 +0100 |
| Message-ID | <timstreater-567849.18181911042012@news.individual.net> |
| In reply to | #5458 |
In article <jm4dnm$cj7$1@dont-email.me>, Jerry Stuckle <jstucklex@attglobal.net> wrote: > On 4/11/2012 10:25 AM, Goran wrote: > > On 11.4.2012 13:16, crankypuss wrote: > >> I remember writing a Java application and trying to derive an actually > >> useful string class from the garbage they had declared "final" and that > >> was it for me and Java. > > > > Just for curiosity, which method you tried to override? Somehow i smell > > a good reason for "final" :) > > Actually, I agree with Cranky on this one. I, too, have wanted to > override the java String class and been frustrated by its 'final' > attribute. I don't see why it couldn't have been created as non-final - > and it would have been a lot more usable. Somehow this reminds me of one of the Pascal pig's ears: that two strings of different lengths were different types. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-04-11 16:24 -0400 |
| Message-ID | <jm4pao$lqh$1@dont-email.me> |
| In reply to | #5460 |
On 4/11/2012 1:18 PM, Tim Streater wrote: > In article <jm4dnm$cj7$1@dont-email.me>, > Jerry Stuckle <jstucklex@attglobal.net> wrote: > >> On 4/11/2012 10:25 AM, Goran wrote: >> > On 11.4.2012 13:16, crankypuss wrote: >> >> I remember writing a Java application and trying to derive an actually >> >> useful string class from the garbage they had declared "final" and >> that >> >> was it for me and Java. >> > >> > Just for curiosity, which method you tried to override? Somehow i smell >> > a good reason for "final" :) >> >> Actually, I agree with Cranky on this one. I, too, have wanted to >> override the java String class and been frustrated by its 'final' >> attribute. I don't see why it couldn't have been created as non-final >> - and it would have been a lot more usable. > > Somehow this reminds me of one of the Pascal pig's ears: that two > strings of different lengths were different types. > LOL. Yes, Pascal takes strict typing (more than) a bit too far. And for that very reason I think it's a good training language - but a crappy development language. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Tim Streater <timstreater@greenbee.net> |
|---|---|
| Date | 2012-04-11 22:43 +0100 |
| Message-ID | <timstreater-826F45.22434111042012@news.individual.net> |
| In reply to | #5463 |
In article <jm4pao$lqh$1@dont-email.me>, Jerry Stuckle <jstucklex@attglobal.net> wrote: > On 4/11/2012 1:18 PM, Tim Streater wrote: > > In article <jm4dnm$cj7$1@dont-email.me>, > > Jerry Stuckle <jstucklex@attglobal.net> wrote: > > > >> On 4/11/2012 10:25 AM, Goran wrote: > >> > On 11.4.2012 13:16, crankypuss wrote: > >> >> I remember writing a Java application and trying to derive an actually > >> >> useful string class from the garbage they had declared "final" and > >> that > >> >> was it for me and Java. > >> > > >> > Just for curiosity, which method you tried to override? Somehow i smell > >> > a good reason for "final" :) > >> > >> Actually, I agree with Cranky on this one. I, too, have wanted to > >> override the java String class and been frustrated by its 'final' > >> attribute. I don't see why it couldn't have been created as non-final > >> - and it would have been a lot more usable. > > > > Somehow this reminds me of one of the Pascal pig's ears: that two > > strings of different lengths were different types. > > > LOL. Yes, Pascal takes strict typing (more than) a bit too far. And > for that very reason I think it's a good training language - but a > crappy development language. Sure - as it was intended to be. -- Tim "That excessive bail ought not to be required, nor excessive fines imposed, nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <no@email.thanks> |
|---|---|
| Date | 2012-04-12 05:54 -0600 |
| Message-ID | <jm6fq421ldo@news4.newsguy.com> |
| In reply to | #5457 |
On 04/11/2012 08:25 AM, Goran wrote: > On 11.4.2012 13:16, crankypuss wrote: >> I remember writing a Java application and trying to derive an actually >> useful string class from the garbage they had declared "final" and that >> was it for me and Java. > > Just for curiosity, which method you tried to override? Somehow i smell > a good reason for "final" :) That was sometime around 1998 and those bits have long ago scrolled off the LRU list. <g>
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-04-11 19:09 +0200 |
| Message-ID | <9uls5hFufuU1@mid.uni-berlin.de> |
| In reply to | #5456 |
Am 11.04.2012 13:16, schrieb crankypuss: > On 04/09/2012 01:35 PM, Mr. B-o-B wrote: >> I was curious about peoples thoughts in regards to OOP with PHP. >> >> Are there pro's/con's of writing OOP code versus procedural/functional >> coding? >> >> Strictly speaking for PHP, I do the bulk of my coding as >> procedural/functional. I really haven't found any added benefit to going >> the OOP route. >> >> Am I missing something, or is it just a different approach to the same >> problem? > > OOP is basically a good idea carried to an extreme. > > There is a boatload of value in the concept of inheritance, but that's largely > negated by the mechanics of how inheritance is done in OOP languages. > > Polymorphism is something that's more in the eye of the programmer than in the > language, data constructs can be specific or generalized. > > The idea that making something into an object gives it superior robustness is a joke > if you can step back and look at it. > > I remember writing a Java application and trying to derive an actually useful string > class from the garbage they had declared "final" and that was it for me and Java. I > cannot begin to count the times when I've had to hoke up an object pointer to use > some simple processing method that was part of a C++ class. > > Of course that's all personal opinion. I avoid all OOP constructs in PHP wherever I > can, the more closely I can make it resemble C the easier it will be to convert it > when the time comes. There is one exception to that in my code, one of the zip > functionalities is only supported through some objects... that stuff is encapsulated > in a subroutine. > > Since I value inheritance I've build myself a layered methodology that lets me > override various functions by adding or inserting different layers at runtime. > > Perhaps the nicest thing about programming is that it puts the lie to religious > adherences... as one of my college instructors put it, "if your program works for all > cases it is by definition correct". Second phrase could have been "But there are many more aspects of software quality". /Str.
[toc] | [prev] | [next] | [standalone]
| From | crankypuss <no@email.thanks> |
|---|---|
| Date | 2012-04-12 05:56 -0600 |
| Message-ID | <jm6fu731ldo@news4.newsguy.com> |
| In reply to | #5459 |
On 04/11/2012 11:09 AM, M. Strobel wrote: > Am 11.04.2012 13:16, schrieb crankypuss: >> On 04/09/2012 01:35 PM, Mr. B-o-B wrote: >>> I was curious about peoples thoughts in regards to OOP with PHP. >>> >>> Are there pro's/con's of writing OOP code versus procedural/functional >>> coding? >>> >>> Strictly speaking for PHP, I do the bulk of my coding as >>> procedural/functional. I really haven't found any added benefit to going >>> the OOP route. >>> >>> Am I missing something, or is it just a different approach to the same >>> problem? >> >> OOP is basically a good idea carried to an extreme. >> >> There is a boatload of value in the concept of inheritance, but that's largely >> negated by the mechanics of how inheritance is done in OOP languages. >> >> Polymorphism is something that's more in the eye of the programmer than in the >> language, data constructs can be specific or generalized. >> >> The idea that making something into an object gives it superior robustness is a joke >> if you can step back and look at it. >> >> I remember writing a Java application and trying to derive an actually useful string >> class from the garbage they had declared "final" and that was it for me and Java. I >> cannot begin to count the times when I've had to hoke up an object pointer to use >> some simple processing method that was part of a C++ class. >> >> Of course that's all personal opinion. I avoid all OOP constructs in PHP wherever I >> can, the more closely I can make it resemble C the easier it will be to convert it >> when the time comes. There is one exception to that in my code, one of the zip >> functionalities is only supported through some objects... that stuff is encapsulated >> in a subroutine. >> >> Since I value inheritance I've build myself a layered methodology that lets me >> override various functions by adding or inserting different layers at runtime. >> >> Perhaps the nicest thing about programming is that it puts the lie to religious >> adherences... as one of my college instructors put it, "if your program works for all >> cases it is by definition correct". > > Second phrase could have been "But there are many more aspects of software quality". > > /Str. Sure, and if he'd really wanted his students prepared for the real world he'd have said something about quality being meaningless in the face of profit, so what?
[toc] | [prev] | [next] | [standalone]
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
|---|---|
| Date | 2012-04-12 17:33 +0200 |
| Message-ID | <9uoauvFebjU1@mid.uni-berlin.de> |
| In reply to | #5484 |
Am 12.04.2012 13:56, schrieb crankypuss: > On 04/11/2012 11:09 AM, M. Strobel wrote: >> Am 11.04.2012 13:16, schrieb crankypuss: >>> On 04/09/2012 01:35 PM, Mr. B-o-B wrote: >>>> I was curious about peoples thoughts in regards to OOP with PHP. >>>> >>>> Are there pro's/con's of writing OOP code versus procedural/functional >>>> coding? >>>> >>>> Strictly speaking for PHP, I do the bulk of my coding as >>>> procedural/functional. I really haven't found any added benefit to going >>>> the OOP route. >>>> >>>> Am I missing something, or is it just a different approach to the same >>>> problem? >>> >>> OOP is basically a good idea carried to an extreme. >>> >>> There is a boatload of value in the concept of inheritance, but that's largely >>> negated by the mechanics of how inheritance is done in OOP languages. >>> >>> Polymorphism is something that's more in the eye of the programmer than in the >>> language, data constructs can be specific or generalized. >>> >>> The idea that making something into an object gives it superior robustness is a joke >>> if you can step back and look at it. >>> >>> I remember writing a Java application and trying to derive an actually useful string >>> class from the garbage they had declared "final" and that was it for me and Java. I >>> cannot begin to count the times when I've had to hoke up an object pointer to use >>> some simple processing method that was part of a C++ class. >>> >>> Of course that's all personal opinion. I avoid all OOP constructs in PHP wherever I >>> can, the more closely I can make it resemble C the easier it will be to convert it >>> when the time comes. There is one exception to that in my code, one of the zip >>> functionalities is only supported through some objects... that stuff is encapsulated >>> in a subroutine. >>> >>> Since I value inheritance I've build myself a layered methodology that lets me >>> override various functions by adding or inserting different layers at runtime. >>> >>> Perhaps the nicest thing about programming is that it puts the lie to religious >>> adherences... as one of my college instructors put it, "if your program works for all >>> cases it is by definition correct". >> >> Second phrase could have been "But there are many more aspects of software quality". >> >> /Str. > > Sure, and if he'd really wanted his students prepared for the real world he'd have > said something about quality being meaningless in the face of profit, so what? Ignoring good advice, "state of the art", "best practices" isn't something to teach. It happens. And quality is not completely meaningless if the customer can have a look at the code and see what he is paying for. /Str.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2012-04-12 13:18 -0400 |
| Message-ID | <jm72p3$7mp$2@dont-email.me> |
| In reply to | #5492 |
On 4/12/2012 11:33 AM, M. Strobel wrote: > Am 12.04.2012 13:56, schrieb crankypuss: >> On 04/11/2012 11:09 AM, M. Strobel wrote: >>> Am 11.04.2012 13:16, schrieb crankypuss: >>>> On 04/09/2012 01:35 PM, Mr. B-o-B wrote: >>>>> I was curious about peoples thoughts in regards to OOP with PHP. >>>>> >>>>> Are there pro's/con's of writing OOP code versus procedural/functional >>>>> coding? >>>>> >>>>> Strictly speaking for PHP, I do the bulk of my coding as >>>>> procedural/functional. I really haven't found any added benefit to going >>>>> the OOP route. >>>>> >>>>> Am I missing something, or is it just a different approach to the same >>>>> problem? >>>> >>>> OOP is basically a good idea carried to an extreme. >>>> >>>> There is a boatload of value in the concept of inheritance, but that's largely >>>> negated by the mechanics of how inheritance is done in OOP languages. >>>> >>>> Polymorphism is something that's more in the eye of the programmer than in the >>>> language, data constructs can be specific or generalized. >>>> >>>> The idea that making something into an object gives it superior robustness is a joke >>>> if you can step back and look at it. >>>> >>>> I remember writing a Java application and trying to derive an actually useful string >>>> class from the garbage they had declared "final" and that was it for me and Java. I >>>> cannot begin to count the times when I've had to hoke up an object pointer to use >>>> some simple processing method that was part of a C++ class. >>>> >>>> Of course that's all personal opinion. I avoid all OOP constructs in PHP wherever I >>>> can, the more closely I can make it resemble C the easier it will be to convert it >>>> when the time comes. There is one exception to that in my code, one of the zip >>>> functionalities is only supported through some objects... that stuff is encapsulated >>>> in a subroutine. >>>> >>>> Since I value inheritance I've build myself a layered methodology that lets me >>>> override various functions by adding or inserting different layers at runtime. >>>> >>>> Perhaps the nicest thing about programming is that it puts the lie to religious >>>> adherences... as one of my college instructors put it, "if your program works for all >>>> cases it is by definition correct". >>> >>> Second phrase could have been "But there are many more aspects of software quality". >>> >>> /Str. >> >> Sure, and if he'd really wanted his students prepared for the real world he'd have >> said something about quality being meaningless in the face of profit, so what? > > Ignoring good advice, "state of the art", "best practices" isn't something to teach. > It happens. > > And quality is not completely meaningless if the customer can have a look at the code > and see what he is paying for. > > /Str. They ARE things which should be included in every course. We do it in ours - which is one reason corporations like us. Corporations are interested in quality. Support costs are a major expense. -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.php
csiph-web