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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,735c710b5e547bad X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.224.39.72 with SMTP id f8mr1424882qae.7.1343315927505; Thu, 26 Jul 2012 08:18:47 -0700 (PDT) Received: by 10.66.77.230 with SMTP id v6mr1396799paw.20.1343314943247; Thu, 26 Jul 2012 08:02:23 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no4904670qas.0!news-out.google.com!p10ni64932187pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-peer1!btnet!zen.net.uk!hamilton.zen.co.uk!xlned.com!feeder3.xlned.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.11.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada 2005 puzzle Date: Sun, 22 Jul 2012 10:19:20 +0200 Organization: cbb software GmbH Message-ID: <1k3eqp61flhso$.ytgqehw2zf5d.dlg@40tude.net> References: <1arp60wtxes8h$.1qs6bt732ztgp.dlg@40tude.net> <030cde76-7435-405d-9f12-ac7f730ecab8@googlegroups.com> <1f9q6vk5z2r3t$.1hayo9rmxfwu7$.dlg@40tude.net> <7308644e-bfbe-44c1-8359-d67392d483e1@googlegroups.com> <1dgc6c6mortfo$.sdphq83df7gu$.dlg@40tude.net> <18usgh1w2ngg.18qc1w5q89um4.dlg@40tude.net> <1l1qasqzwtsof.18orc7p6s7hwz$.dlg@40tude.net> <1kfm6rhasv1hy.9ga3thjxlie8$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="iso-8859-5" Content-Transfer-Encoding: 8bit Date: 2012-07-22T10:19:20+02:00 List-Id: On Sun, 22 Jul 2012 12:00:33 +0400, Vasiliy Molostov wrote: > Dmitry A. Kazakov �����(�) � ����� ������ Sun, > 22 Jul 2012 11:41:04 +0400: > >> declare >> X : Boolean; >> Y : Boolean := False; >> begin >> >> Note, I intentionally take a most elementary type. > > its better set it to tagged type. and in this case you will get > "initialize(x)". > > Does you mean that initialize should be renamed to construct? No. Ada's Initialize is not a constructor. A constructor cannot be a procedure because there is no way to operate a not yet existing object. Initialize takes already constructed argument, it is indeed an [user-defined] initialization. [Constructors are always generated by the language. They could call some hooks, like Initialize, at certain stages of construction process. These hooks can be shaped as functions and procedures.] > Does "False" is a construction for Y? False is a value (actually, an expression yielding a value of the designated type). Y is constructed in a way that False becomes its first value. >> Construction operates on the object's type. Initialization does on the >> object's value/state. > > Before you told that this one converts from raw memory into well formed > typed object. Yes. It is a type conversion: none -> a type > I suppose that setting up state/value of raw memory can completely define > any typed object. Accompanied by setting the designated type. Initialization is a part of construction. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de