gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnucap-devel] encapsulation violation


From: al davis
Subject: Re: [Gnucap-devel] encapsulation violation
Date: Fri, 26 Apr 2013 11:27:55 -0400
User-agent: KMail/1.13.5 (Linux/2.6.32-5-amd64; KDE/4.4.5; x86_64; ; )

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]