comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Fun: the Ada assignment operator is an alias of the equivalence operator
Date: Sat, 28 May 2011 11:58:17 +0200
Date: 2011-05-28T11:58:16+02:00	[thread overview]
Message-ID: <8ok2pytkbemj$.sueohx59cmzv$.dlg@40tude.net> (raw)
In-Reply-To: op.vv6ph7wtule2fv@douda-yannick

On Sat, 28 May 2011 11:19:09 +0200, Yannick Duchêne (Hibou57) wrote:

> Le Sat, 28 May 2011 11:03:25 +0200, Dmitry A. Kazakov  
> <mailbox@dmitry-kazakov.de> a écrit:
>> 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;
> 
> Right Er Professor, sure ":=" does not introduce a macro :p

"Lazy" would be a better word than "macro".

> So, what about  
> “defined-as the realization-of” ?

Well, declaration of an immutable variable defines it in a scope. The point
is that realization, which looks like just another word for "value", cannot
define [immutable] variable. A variable can be defined *to have* some
value, but variable is not a value. Value is a "meaning" of a variable in
some context. In mathematics both sides of "defined-as" are same sort of
beasts.

BTW, just for fun:

   Huh : constant Boolean := Halt (P); -- Is Huh defined? (:-))

>> 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.
> Equivalent by realization (modulus some canonicalization of the output) ?

Indistinguishable by certain means, e.g. within some formal model, like
black box etc.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



      reply	other threads:[~2011-05-28  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-28  0:48 Fun: the Ada assignment operator is an alias of the equivalence operator Yannick Duchêne (Hibou57)
2011-05-28  7:25 ` Dmitry A. Kazakov
2011-05-28  8:02   ` Yannick Duchêne (Hibou57)
2011-05-28  9:03     ` Dmitry A. Kazakov
2011-05-28  9:19       ` Yannick Duchêne (Hibou57)
2011-05-28  9:58         ` Dmitry A. Kazakov [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox