On Friday, February 24, 2017 at 5:00:48 AM UTC-6, Edward K. Ream wrote:

Rev 522890 simplifies g.readFileIntoString...nothing would be gained by 
> delaying public testing.
>

Actually, this has it backwards. Because these changes impact Leo's read 
logic, it is important to test them *for as long as possible* before Leo 
5.5b1.

Furthermore, I am pretty confident that all is well. The rest of this post 
explains why. It is for devs only.  Feel free to ignore. Otoh...

*I could not simplified the code as I did without cff* 

I used cff (clone-find-flattened) to find, and then to *organize*, all 
calls to g.readFileIntoString, and other read-file helpers. It quickly 
became clear that g.readFileIntoString is, by far, the most important 
helper.

In this case, careful study of the keyword args in the *calls* to 
g.readFileIntoString showed that the 'mode', 'raw' and 'silent' keyword 
args were confusing and unnecessary. *This was far from obvious at first.*  
It became obvious only when I organized the calls to g.readFileIntoString 
by keyword args in the calls.

The 'raw' arg was particularly confusing. The at.compareFiles method was 
the only method that set the 'raw' arg. (Verified by a cff on 
compareFiles.) In the new code, at.compareFiles just calls 
g.readFileIntoEncodedString, which is much more direct and clear.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to