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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!j27g2000cwj.googlegroups.com!not-for-mail From: "Adam Beneschan" Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? Date: 24 Jan 2007 08:25:34 -0800 Organization: http://groups.google.com Message-ID: <1169655934.028861.51000@j27g2000cwj.googlegroups.com> References: <1169531612.200010.153120@38g2000cwa.googlegroups.com> <1169588206.234714.312650@k78g2000cwa.googlegroups.com> <1169624573.534128.172610@s48g2000cws.googlegroups.com> <87sle0sv9o.fsf@ludovic-brenta.org> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1169655939 11067 127.0.0.1 (24 Jan 2007 16:25:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Jan 2007 16:25:39 +0000 (UTC) In-Reply-To: <87sle0sv9o.fsf@ludovic-brenta.org> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: j27g2000cwj.googlegroups.com; posting-host=66.126.103.122; posting-account=cw1zeQwAAABOY2vF_g6V_9cdsyY_wV9w Xref: g2news2.google.com comp.lang.ada:8493 Date: 2007-01-24T08:25:34-08:00 List-Id: On Jan 24, 12:07 am, Ludovic Brenta wrote: > kevin cline writes: > > But the point was that expressiveness drives programmers to new > > languages, and Ada isn't particularly expressive.On the contrary, I think that Ada is the most expressive language > around. Consider: > > procedure Set_Bit_In_Register (At_Address : in System.Address) is > type Register is array (1 .. 32) of Boolean; > pragma Pack (Register); > for Register'Bit_Order use System.High_Order_First; > pragma Volatile (Register); > > R : Register; > for R'Address use At_Address; > begin > Register (4) := True; > end; > > versus > > void set_bit_in_register (volatile unsigned long * at_address) > { > *at_address |= 2 << 3; > > } I think maybe I understand how C might be considered "more expressive" to some programmers. If you want to set the third bit of this word, you can just type in what you want, without going through a whole lot of rigmarole like defining types and telling the compiler what you intend to do and what order you think the bits are in and stuff like that. You can just say it. Of course, if there's a misunderstanding between you and the compiler about how your data is laid out, perhaps, then your code doesn't work and it crashes your PC and introduces a vulnerability that some clever hacker can take advantage of to turn your computer into a subservient automaton whose sole purpose in life is to send millions of "performance-enhancing drug" ads to *my* e-mail address---but hey, at least you got to express yourself. C lets you do this without having to do as much thinking or actual work, which mean old Ada makes you do. Perhaps we should just concede that C is a "more expressive language"---with about as much benefit as there is to teaching math students to be "more expressive" as opposed to getting the right answer. -- Adam