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,d5b211b0c1ffcf3e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.193.129 with SMTP id ho1mr263866pbc.8.1340298889171; Thu, 21 Jun 2012 10:14:49 -0700 (PDT) MIME-Version: 1.0 Path: l9ni3893pbj.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Practicalities of Ada for app development Date: Thu, 21 Jun 2012 12:14:45 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <79c5c9f7-4b72-4990-8961-b3e2db4db79b@qz1g2000pbc.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1340298887 27016 69.95.181.76 (21 Jun 2012 17:14:47 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 21 Jun 2012 17:14:47 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response Date: 2012-06-21T12:14:45-05:00 List-Id: "Jeffrey Carter" wrote in message news:jqur16$teu$1@adenine.netfront.net... > On 06/08/2012 05:40 PM, Adam Beneschan wrote: >> On Friday, June 8, 2012 2:35:55 PM UTC-7, Jeffrey Carter wrote: >> >>> One nice thing about Ada is not needing to use a debugger. >> >> I don't get this comment. Ada is a lot nicer than some languages at >> preventing you from making certain kinds of mistakes, but no language is >> able >> to prevent logic errors and certain dumb typos. And if you make this >> kind of >> error and the program doesn't work, just the fact of its being written in >> Ada >> doesn't help you much. There may less need for a debugger because Ada >> will >> prevent certain types of errors and things like constraint checks will >> catch >> some others that would cause havoc in C. But it can't catch everything, >> and >> even if it does find an index that's out of range it won't tell you why >> the >> index was out of range. I mean, Ada is a much better language than >> certain >> others for writing correct code, but this seems like a gross >> overstatement. > > I haven't used a debugger for a long time. Usually Ada gives an idea of > the kind of error and its location, and I can easily figure out what the > problem is. In the rare case that that isn't true, it's quicker to stick > in a few Put_Lines than to learn to use the debugger again. This is a > self-reinforcing situation, of course. I tend to be with Jeff on this one. I sometimes use a debugger to figure out low-level problems in generated code (that is, to find compiler bugs), but that's pretty much it. (And I admit that the quality of our debugger has suffered because I don't use it enough to want to spend the time to improve it.) Almost all of my programs include a built-in logging/tracing facility that can be controlled interactively (even for batch-oriented tools like our compiler), and combined with Ada's checks, that's enough 95% of the time. Virtually all of the rest of the time, it's easier to add some new tracing to the facility than to figure out how to compile a version of the program with debugging information on, get it linked properly, and then remember the quirks of the debugger. Part of the problem is that there are a lot of problems for which a debugger will not help. For instance, when tracking down problems in Claw, we had to use an off-line logging facility, because adding anything to the program window changes the stream of messages, and thus tends to obscure the problem that we were trying to locate and fix. I'm sure the situation is not the same for everyone, but I'm surprised that you (Adam) can get much use out of a debugger, since compilers and their tools is definitely one case where a debugger is pretty much worthless (the only exception being the rare code generation bug). Randy.