Re: encapsulation violation

al davis <[email protected]>
Newsgroups gmane.comp.gnu.gnucap.devel
Message-ID <[email protected]>
On Friday 26 April 2013, Felix Salfelder wrote:
> theres a BUG comment in SIM::evaluate_models. does that imply
> that do_tr_last is staged for removal?

No.

> if not please explain what it means.

http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29

It's a warning to anyone reading that code that it somehow violates
the principle of encapsulation, and making changes here may lead
to trouble.

Looking deeper ..
grep for "encapsulation violation" .

apps/s__solve.cc:221:  while (!_sim->_late_evalq.empty()) { //BUG// encapsulation violation
apps/s_tr_swp.cc:77:    while (!_sim->_late_evalq.empty()) {itested(); //BUG// encapsulation violation

Similar code here.

So think of it as a reminder that code in these places is interrelated,
and you might not expect it to be.
If you make any changes, be sure to check the others.
That means certainly  these two places.  In general, any place that
does a loop of "do_tr", even if you write another, don't forget
the "late" queue.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.