Re: The Elements of Informix-4gl Style?
Posted in 1992
Path: emory!europa.asd.contel.com!uunet!pdn!tct!jim From: jim@tct.com (Jim Kunzman) Newsgroups: comp.databases.informix Keywords: 4gl style Message-ID: <29BC2DE7.7F9D@tct.com> Date: 10 Mar 92 03:32:55 GMT References: <1992Mar5.021035.18374@StarConn.com> <29B7A050.1042@tct.com> <1992Mar09.021316.10584@dickens.com> Organization: TC Telemanagement, Clearwater, FL According to lpc@dickens.com (Luis P Caamano): >In article <29B7A050.1042@tct.com> jim@tct.com (Jim Kunzman) writes: <stuff deleted> >>I have to agree with Paul. Proper use of lower case and/or mixed case >>makes code much easier to read. Early programs used upper case >>exclusively because of teletype limitations and terminal limitations. >>However, no magazine or newspaper would ever conceive of abusing >>readers by overusing upper case. Neither should programming languages >>or programmers. Uppercasing KEYWORDS is particularly annoying and >>causes me to pause and wonder why anyone would want to bother >>highlighting them. It decreases input speed for both the programmer > ^^^^^^^^^^^^^^^^^^^^^^ > I don't agree. >>and the reader. -Jim You mean you can type upper case charcters as fast as lower case? Most people can't, but perhaps you are the exception. > >I have to say that after you've written several apps in 4GL, you >don't need to read the keywords. Hence, uppercasing KEYWORDS makes >it easier to read 4GL code. Why? you'll read subsconciously the >keywords and use some cpu cycles (or brain cycles :-) to read only >the variables and table names. > I can spot the keywords out of context. I don't need to use uppercasing to remind me. This is akin to having your wife yell at you all the time. I thought the big advantage to 4GL and SQL is that they are so "English" like. <stuff deleted> > >Obviously proper indentation helps, but look how easy one can spot >the OUTER keyword on the mixed version. If you write all your code >following this, soon you won't read the SELECT part nor the FROM, >WHERE, ORDER BY, etc > >I could give more examples involving CASE statements, IFs, WHILEs, >long variable names, etc., but I think you got the idea. > Yes, I get the idea, but not the point. Upper case is harder to type looks garish, and doesn't add any functionality, IMO. Once you learn the language, the keywords don't need to be reinforced. They merely detract and make the code harder to read. BTW, I do like the indentation scheme you used in your example. For those who missed it, see the previous article in this thread. I deleted it for bandwidth considerations. -- Jim Kunzman at Teltronics/TCT <jim@tct.uucp>, <uunet!pdn!tct!jim> ----- Mr. Gill Bates on IBM OS/2, "Out damn spot!"