Daphne Preston-Kendal on Nostr: Prompted by a discussion in #scheme on IRC, here is a guide to using ‘load’ in ...
Prompted by a discussion in #scheme on IRC, here is a guide to using ‘load’ in Scheme:
• Almost certainly, don’t; ‘load’ is probably not what you want
• If you are at the REPL, ‘load’ may be what you want (I use it to set up a scratch environment in multiple active REPLs quickly while trying things out)
• Otherwise, what you want is to use ‘include’ or, more likely, make your file into a library of its own and import it
If you wouldn’t call ‘eval’, don’t call ‘load’ – because it *is* ‘eval’
• Almost certainly, don’t; ‘load’ is probably not what you want
• If you are at the REPL, ‘load’ may be what you want (I use it to set up a scratch environment in multiple active REPLs quickly while trying things out)
• Otherwise, what you want is to use ‘include’ or, more likely, make your file into a library of its own and import it
If you wouldn’t call ‘eval’, don’t call ‘load’ – because it *is* ‘eval’