From: dmitry6243@my-dejanews.com
Subject: Re: Valued procedures
Date: 1999/01/25
Date: 1999-01-25T00:00:00+00:00 [thread overview]
Message-ID: <78hddd$8in$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 787gb8$kp2$1@nnrp1.dejanews.com
adam@irvine.com wrote:
> ... If you have a
> function that searches a large binary tree for a key and returns a
> value, it might make sense in some applications for the function to
> store the key and value in a global variable, so that if the next
> search uses the same key, the tree doesn't have to be searched again.
> This principle was discussed in Meyer's _Object-oriented Software
> Construction_.)
Now imagine that instead of burying the search state in invisible globals you
would like to expose it as an IN OUT parameter ...
I agree that in a carefully designed program procedures with return values
would be rare. As well as gotos which are allowed.
I agree that they are clumsy (in most cases), but the alternative is pointers,
which are much more worse.
Regards,
Dmitry Kazakov
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
next prev parent reply other threads:[~1999-01-25 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-21 0:00 Valued procedures dmitry6243
1999-01-21 0:00 ` robert_dewar
1999-01-21 0:00 ` dennison
1999-01-21 0:00 ` robert_dewar
1999-01-21 0:00 ` dennison
1999-01-25 0:00 ` dmitry6243 [this message]
1999-01-25 0:00 ` robert_dewar
1999-01-21 0:00 ` Tom Moran
1999-01-21 0:00 ` robert_dewar
1999-01-21 0:00 ` adam
1999-01-22 0:00 ` Tucker Taft
1999-01-22 0:00 ` adam
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox