× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 2011/1/3 9:02 AM, David FOXWELL wrote:

I was looking at the code I wrote last year. Well, last week
actually, but it seemed a long time ago. There I was, like the next
developper called upon todo the maintenance, and I said to myself,
"Why has he put EVAL-CORR? - that would suggest that the two DS were
not the same". So, I went back to a move, as in my OP but then asked
myself if was safe, hence my question.


Arguably, using EVAL or MOVE to assign data structures should be the case that causes head-scratching.

I realize that MOVE, MOVEL or EVAL were the only ways to assign two data structures for decades, so EVAL-CORR is naturally the odd case. But just as the use of MOVE or MOVEL nowadays might cause "Huh? Why not EVAL?" head-scratching for ordinary fields, perhaps eventually EVAL-CORR will become the norm for data structures.

Using EVAL-CORR makes the code a little bit more self-documenting, for the cases where the names might not make it obvious that the variables are data structures.

I wouldn't worry too much about the performance impact of using EVAL-CORR vs EVAL or MOVE for the cases where EVAL-CORR would handle the subfields separately. In those cases, where the data structures are not related by LIKEDS or LIKEREC, the possibility of error due to the structure definitions getting out of synch should outweigh the possible tiny gain to be had by moving all the subfields at once.

Rules to live by:
- Correctness beats performance.
- Explicit correctness beats happenstance correctness.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.