[ prog / sol / mona ]

prog


Internal definitions vs letrec

8 2020-08-02 20:06

>>7
Well you did mention the two primary reasons of variable capture and avoiding namespace pollution. I don't see any reason for letrec to be used over internal definitions for variable capture, and I think avoiding namespace pollution remains desirable within a package. Reducing the number of procedures you have to keep up with when reasoning about a subset of a package is useful. If you find yourself in a position where the internal definitions are making things more difficult to reason about it's probably a decent hint that you should split off another package.

13


VIP:

do not edit these