|
From: Pete Dashwood on 4 Apr 2008 18:41 "Rick Smith" <ricksmith(a)mfi.net> wrote in message news:6JOdndZWVIsByGvanZ2dnUVZ_q2hnZ2d(a)mid-floridainternet... > > "Howard Brazee" <howard(a)brazee.net> wrote in message > news:bjccv3dhk21osd4upu7ct4r2poc3ustjrc(a)4ax.com... >> On Thu, 3 Apr 2008 19:31:14 -0500, "Rick Smith" <ricksmith(a)mfi.net> >> wrote: >> >> >Therein lies the problem, Mr Dashwood! While you advocate >> >the OO paradigm, you don't actually use it--preferring your own >> >principles to those of the paradigm. <g> >> >> If OO is a tool, and not a religion - he is free to use what parts are >> useful to produce the desired product. >> >> Same thing with relational databases and 2x4s. > > If language is to be used for communication, then calling > a combination of parts from a Toyota, a Ford, and a Yugo, > a Mercedes-Benz, isn't going to communicate accurately the > composite; though Toy-For-Yu would at least indicate a > composite. > > To understand others, I rely on definitions and usages supplied > by sources I find credible. According to those sources, the > OO paradigm consists of three parts: OOA, OOD, and OOP, > with OOD the linchpin. Any marked deviation from the > principles of OOD means thar OO paradigm does not apply. > > I may be confused by the choices others make; but, if it has > no direct effect on me, I have learned not to care that much > about what others do. Abuse of a term I have spent years to > understand well does have a direct affect on me. > OK that is fair comment and I understand what you're saying. However, you know as well as I do, that in the real world, millions of people are using OO concepts every day WITHOUT necessarily applying the rigourous definition you gave above. And even expert authorities on the subject may differ in exactly what they mean by certain terms. If people are working with objects and classes and applying design and development methodologies based on these concepts, then it is kind of small minded to say they are not using OO, because they are at variance with one strict academic definition of whatever that is. Nevertheless, I understand now why you took exception to my previous post. Here's what I suggest: You try and be less sensitive to loose usage of terms which, at least for you, have strict meanings. Realise that not all discussions are academic. I'll try and be more careful when I talk about what I consider is OO. (Or maybe I just won't post here at all...) I am genuinely sorry you were caused offence by my post. It was never intended to do that. Pete. -- "I used to write COBOL...now I can do anything."
From: Frank Swarbrick on 4 Apr 2008 18:49 >>> On 4/3/2008 at 11:38 PM, in message <v3ebv39km41qelvaflpo6p1k1nolmskunp(a)4ax.com>, Robert<no(a)e.mail> wrote: > On Thu, 3 Apr 2008 18:31:09 -0600, "Frank Swarbrick" > <Frank.Swarbrick(a)efirstbank.com> > wrote: > >>I'm not talking about how the Cobol standard has them specified. Just > that, >>as a feature, I would like some better way to work with variable length >>strings. >> >>With regard to DIRECT... Without actually reading the standard, here is >>what I would intuitively *expected* with regard to a direct "any length" >>data item (fixed length font required for this to make any sense at > all!): >> >>01 AN-01-DATA-AREA. >> 05 FIXED-STR-10 PIC X(10). >> 05 VARIABLE-STR-10 PIC X ANY LENGTH LIMIT IS 10 DELIMITED BY X'00'. >> 05 A-CHAR PIC X. >> >> >>MOVE 'XXXXXXXXXX' TO FIXED-STR-10 >>MOVE 'TEST' TO VARIABLE-STR-10 >>MOVE 'Z' TO A-CHAR >>MOVE 'YYYYYYYYYY' TO VARIABLE-STR-10 >> >>Result in memory, before the final MOVE: >>XXXXXXXXXXTEST_ Z >>^^^^^^^^^^^^^^^^^^^^^^ >>After the final MOVE: >>XXXXXXXXXXYYYYYYYYYY_Z >>^^^^^^^^^^^^^^^^^^^^^^ >>The underscore represents the delimiter 'null' character. >> >>What you say says to me that before the final move we would instead see >>XXXXXXXXXXTEST_Z > > That's what you'd get if you moved the group to a flat string. The > standard doesn't say > what memory would look like. It does say the address of a-char will not > change if the > any-length string is indirect (is represented by an inline pointer). I > take that to mean > the address of a-char MIGHT change if the any-length string is direct. The > compiler author > gets to decide whether to shift a-char when its neighbor changes length. > >>I would agree that this is rather crazy. >> >>I think how I am looking at it, which is apparently not how you would >>support it, is that if DIRECT is specified *along with a limit*, then the >>maximum storage required would be used. This is just like how in C you > can >>have, for instance: >> >>struct my_struct { >> char[21] field1; >> char[21] field2; >> char x; >>}; >> >>void cfunc(struct my_struct *s) { >> strcpy(s->field1, "This is a test"); >> strcpy(s->field2, "Another test"); >> s->x = 'X'; >>} >> >>Result in memory: >>This is a test_ Another test_ X >>^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >>If I wanted to call cfunc from Cobol I could do this: >> >>01 MY-STRUCT. >> 05 field-1 PIC X ANY LENGTH LIMIT IS 20 DELIMITED BY X'00'. >> 05 field-2 PIC X ANY LENGTH LIMIT IS 20 DELIMITED BY X'00'. >> 05 X PIC X. >> >> >>CALL 'cfunc' USING MY-STRUCT >>DISPLAY field-1 '/' field-2 '/' x >> >>Result: >>This is a test/Another test/X > > Compatibility with C is a non-issue because .. get this .. you are NOT > ALLOWED to pass a > variable length structure as a CALL parameter. Wow! That is lame. It seems to me one of the benefits to variable length structures would be passing them between programs/routines, whether written in Cobol or something else. > I seriously doubt any compiler author would enforce that restriction. > Then, to be > compatible with C, he would NOT shift X around. Indeed. >>Now as for a DIRECT any-length data item without a limit specified, I > don't >>think that makes sense. Is it even allowed? My brain doesn't want to > try >>to interpret the standard right now. > > DIRECT items must have a LIMIT except at the 01 level. If you leave it > off, they default > to INDIRECT. Seems to me that even at the 01 level they would have to be INDIRECT if there was no length limit. Frank
From: Pete Dashwood on 4 Apr 2008 18:53
"Howard Brazee" <howard(a)brazee.net> wrote in message news:pvpcv3do5r3d4k244tq47ltj3n4csqmnnn(a)4ax.com... > On Fri, 4 Apr 2008 11:20:56 -0500, "Rick Smith" <ricksmith(a)mfi.net> > wrote: > >>> If OO is a tool, and not a religion - he is free to use what parts are >>> useful to produce the desired product. >>> >>> Same thing with relational databases and 2x4s. >> >>If language is to be used for communication, then calling >>a combination of parts from a Toyota, a Ford, and a Yugo, >>a Mercedes-Benz, isn't going to communicate accurately the >>composite; though Toy-For-Yu would at least indicate a >>composite. > > Good point - but I've never come across any shop that use Reuse or > class maintenance to the extent that were promised. So should we > use the language to match the theory, or should we use the language to > match what actually happens? > > Probably both - recognizing the imprecise nature of language, and > looking more closely. Good post, Howard. That is very much what is happening. I hadn't realised (and probably should have) that it is hard for people like Rick to accept, when they have invested in learning the theory. On reflection, I have suffered from the same syndrome... I used to get defensive (I'm over it now...:-)) when I heard people calling themseves "programmers" because they wrote a configuration script for .NET :-) When you've spent years studying or doing something and then overnight, the currency is "degraded", it can be painful... But, the world moves on and doesn't pause for our sensitivities. Best bet is to get over it. Pete. -- "I used to write COBOL...now I can do anything." |