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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.99.9 with SMTP id x9mr20509017ywb.151.1483543100369; Wed, 04 Jan 2017 07:18:20 -0800 (PST) X-Received: by 10.157.18.211 with SMTP id g77mr3166182otg.14.1483543100310; Wed, 04 Jan 2017 07:18:20 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!c47no49579qtc.1!news-out.google.com!g131ni3812itg.0!nntp.google.com!b123no219638itb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 4 Jan 2017 07:18:19 -0800 (PST) In-Reply-To: <75f2482a-a94b-4820-b2b1-990010103709@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.0.242.189; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 67.0.242.189 References: <87r34j39u6.fsf@nightsong.com> <7643d59e-061f-42df-adda-9322608f127b@googlegroups.com> <75f2482a-a94b-4820-b2b1-990010103709@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4c5dfbe4-7987-48d4-8afc-817a8c134095@googlegroups.com> Subject: Re: Introductory Ada Programming Book From: Shark8 Injection-Date: Wed, 04 Jan 2017 15:18:20 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:33047 Date: 2017-01-04T07:18:19-08:00 List-Id: On Wednesday, January 4, 2017 at 6:45:29 AM UTC-7, raph....@gmail.com wrote= : > Le mercredi 4 janvier 2017 13:49:18 UTC+1, Dmitry A. Kazakov a =C3=A9crit= =C2=A0: > > On 2017-01-04 13:40, J-P. Rosen wrote: > >=20 > > > Oddly, variables are not initialised by default > > > (Personal opinion: default initialization is a huge mistake) > >=20 > > Right, but Ada is still wrong there. IMO it should have been: > >=20 > > declare > > I : Integer :=3D 1; -- OK > > J : Integer; -- Error: not initialized > > K : Integer :=3D <>; -- OK: uninitialized, I know what I am doing > >=20 >=20 > Or do it Swift's way and use flow analysis to make use of an uninitialize= d variable a compile time error. Meh. I guess it's complicated enough as it= is to implement an Ada compiler :) Well, there are certain times where you *want*/*need* non-initialized varia= bles; it's usually at [operating] system-level, but it does exist. (A good = example would me memory-mapped I/O ports, where your 'initialization' would= automatically send something down the I/O port when you might need to send= nothing.)