From mboxrd@z Thu Jan 1 00:00:00 1970 From: "David Jones" Subject: Re: (X and other) basics (was: A few more things...) Date: Wed, 23 Oct 2002 00:09:10 -1000 Sender: linux-newbie-owner@vger.kernel.org Message-ID: <0d6f012081017a2HNLMAIL3@hawaii.rr.com> References: <0a6a538010616a2HNLMAIL2@hawaii.rr.com>; from gnome@hawaii.rr.com on Mon, Oct 21, 2002 at 08:02:33PM -1000 Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Return-path: In-reply-to: <20021022113416.E24238@neutrino.particles.org> List-Id: Content-Type: text/plain; charset="us-ascii" To: linux-newbie@vger.kernel.org On 22 Oct 02, at 11:34, Elias Athanasopoulos wrote: > On Mon, Oct 21, 2002 at 08:02:33PM -1000, David Jones > wrote: > No, it has 100% to do with the way you code. You > can > > This is the criterion from the user/programmer > perspective. It is well known that you can use almost > everything in a bad manner... That's right. Being a former tech writer, I've seen most any language used in that way. ;-) > You can kill someone even using a pen, but it's kinda > easier to do it with an M-16. :-) And even easier with a shotgun (which is an image I sometimes get when consider C pointers), ;-) > > write non-spaghetti code in BASIC. And personally, I > > find C's beloved pointers to be far more dangerous than > > BASIC's GOTO! ;-) > > Goto is a myth. C uses it, too. IMHO, it's quite useful. > The goto becomes a problem when it is used a lot without a > sane reason. Better to say that the idea that "GOTO is evil and must be exorcized at once" is a myth. Most folk I've read complaining about GOTO have been academic computer language designers. GOTO has its good points - my programming experience was partly in good old Commodore BASIC and GWBASIC, where a well-placed GOTO was great. (Unlike C's pointers, a BASIC GOTO can't shoot you off somewhere to an unknown memory location.) My other programming experience is in Forth. The Forth I used didn't have a GOTO at all, although you could certainly make one yourself if you really wanted to. > As far as the pointers are concerned, pls don't mix > "difficult to read code" with "spaghetti code". Pointers > can give *elegant* solutions to many problems. That's the > reason they are so popular. Oh, I'm not mixing them - I understand the difference. Pointers can be very elegant, yes. But one must use them carefully, lest one experience a phenomonon folk programmning the old 68000 called "addressing grey space" because an invalid value had been used as a pointer. I'm no C programmer, so I know I'd find a chain of bizarre GOTOs easier to figure out than some of the complex pointer stuff I've glimpsed in my limited C code reading. A co-worker who's a longtime C/C++ programmer would understand the pointer stuff at a glance. BTW, gnewtellium sounds like fun. Thanks for the link! David gnome@hawaii.rr.com - To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs