From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public From: dewar@gnat.com Subject: Re: Software landmines (was: Why C++ is successful) Date: 1998/08/23 Message-ID: <6roram$ps4$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 383861420 References: <6rnhhe$e2u$1@nnrp1.dejanews.com> Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Sun Aug 23 10:36:06 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-08-23T00:00:00+00:00 List-Id: In article , dale@cs.rmit.edu.au (Dale Stanbrough) wrote: > dewar@gnat.com wrote: > > "No, it is a huge advantage of return over a *bad* use of goto. But nearly > every feature in a language can be badly misused. We didn't eliminate > assignments from Ada, even though they can be (and are all the time) > horribly misused, and even though we know perfectly well that you can > write programs with no assignments with no loss in expressive power." > > Do you have examples of the bad/excessive use of assignment statements? > > Dale > Well of course there are many programmers, who in a manner analogous to the "gotophobes" consider *any* assignment statement as anathematic, and prefer languages where no assignments are allowed. It is of course common knowledge that assignment statements are unnecessary, and that just as it is possible to program without gotos, it is possible to program without assignment statements. Indeed it is a good excercise at least to make students learning Ada or some other reasonable language that has appropriate features, write a program avoiding assignment statements completely. But in normal use of a language like Ada, it certainly is relatively unlikely that many people would agree to this kind of extremism. It is actually probably the case that many Ada programmers would find the notion of programming without assignments as bizarre and foreign (in much the same way as a Fortran-67 programmer considers programming without gotos as bizarre, oops, that should be Fortran66). As for programs that overuse assignments these are indeed common. In fact it is rare that I see a big Ada program that does not have instances of initialized declarations of variables without a constant keyword that are in fact constants. -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum