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: 103376,fe928bde93f0c2f4 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Fun: the Ada assignment operator is an alias of the equivalence operator Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Sat, 28 May 2011 11:03:25 +0200 Message-ID: <1ahuqa8azzgr4.pb0vclmr8vm6.dlg@40tude.net> NNTP-Posting-Date: 28 May 2011 11:03:27 CEST NNTP-Posting-Host: 14851c11.newsspool2.arcor-online.net X-Trace: DXC=:gIl0CPG On Sat, 28 May 2011 10:02:51 +0200, Yannick Duch�ne (Hibou57) wrote: >> Assignment is not a logical operation, variables are not logical >> predicates. > Nor "defined-as" is ;) > > ":=" would be OK for constant, makes Ada looks a bit more functional :p I think it is a widely shared misconception that immutability has anything to do with that. [Functional is not an answer, whatever the question was (:-))] No, even an initialized constant is not necessarily equivalent to its initializing expression. Obvious examples: I : constant Integer := Get (File); X : constant Float := Random (Dice); T : constant Time := Clock; Another point is that equivalence itself is an abstract operation with the semantics undefined in general. Mathematical equivalence = is not analogous to "=" operation defined on objects. Rather it is: 1. Values equivalence (values do not belong to the program). I.e. you can say that the value of the variable A is equivalent to the value of the variable B. Which is unrelated [not required] to whether A=B yields True or False. 2. Program equivalence. You can say that two programs are equivalent in some [limited] sense, e.g. when the compiler optimizes the code, or when you modify the program. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de