Re: and then... (a curiosity)



On Fri, 29 Aug 2008 15:28:16 -0700 (PDT), Adam Beneschan wrote:

"and then" is not a function, however, and has none of these
properties.

It could be made a function if Ada had lazy arguments.

I am unsure if the arguments of "and" are eager. You are a language lawyer,
I am not. But I used to think that the eagerness of evaluation is rather
unspecified, so that the compiler is free "not to care," when it optimizes
the code, as Jeff Carter has pointed out.

So basically, provided the above is correct, the choice was motivated by
least strong precondition (=unspecified eagerness), rather than by choosing
between eager and lazy evaluation.

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



Relevant Pages

  • I switched sides. ;-) WAS: unusual OR syntax
    ... Personally I often use lazy evaluation for performance reasons. ... Being the instigator of this whole discussion, I think it is only fair to say here in public I think the former short circuit evaluation version is clearer. ... Personally, I seldom create functions/methods for one-time jobs/tests, but that is easily changed. ...
    (comp.lang.php)
  • SUMMARY: Alphaserver 1200 and T64 5.1B: memory holes??
    ... swapping from EAGER to LAZY in the /etc/sysconftab file. ... By resetting this to LAZY ... memory will only be allocated when needed. ... Dit bericht en eventuele bijlagen is uitsluitend bestemd voor de ...
    (Tru64-UNIX-Managers)
  • Re: I switched sides. ;-) WAS: unusual OR syntax
    ... Erwin Moller ... Cant find much on google about lazy eval or short circuit vis a vis ... Personally I often use lazy evaluation for performance reasons. ...
    (comp.lang.php)
  • Re: I switched sides. ;-) WAS: unusual OR syntax
    ... Personally I often use lazy evaluation for performance reasons. ... to be called on every loop when a simple $foo lookup would be enough in ... "There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. ...
    (comp.lang.php)
  • Re: I switched sides. ;-) WAS: unusual OR syntax
    ... Cant find much on google about lazy eval or short circuit vis a vis ... Personally I often use lazy evaluation for performance reasons. ... to be called on every loop when a simple $foo lookup would be enough in ...
    (comp.lang.php)