|
From: | Magali Lemes |
Subject: | [Outreachy] Use of impure functional programming and use of vlists |
Date: | Sat, 27 Feb 2021 00:10:05 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
Hello, Guix.As my Outreachy internship approaches an end, I'd like to know which of the following options is better for walking and displaying the Git commit history: 1) having a list and then using for-each it to display the commit information;
2) display the list while building it.When it comes to option number 2, the main advantage is that it's faster to perform operations such as 'guix git log --oneline | head -n5'. The downside is that it's not a pure functional programming approach. Another question is, could vlists be used? Since it would be fast to have the commits in a hash table implemented with vlists, we could use 'vlist-for-each' to display the commits. I haven't seen vlist-for-each being used anywhere in Guix, so I wondered if there's a special reason for it not being used, or if it hasn't really been necessary at all thus far.
Regards, Magali
[Prev in Thread] | Current Thread | [Next in Thread] |