|When I found myself reading Graham's essay on Being Popular, I found myself nodding in agreement when I saw the following:|
> Anything that can be implicit, should be.
In this context, I'd like to talk about libraries. Perhaps this is just me being lazy, or overly averse to boilerplate, but I have a fierce hatred of having to explicitly import a standard library -- in any language, and especially if that library does something trivial or standard (think `import math` or `import re` in Python -- maths and regular expressions -- or `use Path::Tiny` in Perl -- slurping a file into a variable), and if my program is really just a quick hack to do something small.
I understand that loading a potentially significant number of libraries automatically is a bad idea -- after all, if you're not going to use more advanced maths functions or regular expressions in your program, they shouldn't be imported. However, is it not possible to autoload a function from a library the moment it is first used? (And no earlier.) I know Emacs Lisp has this sort of functionality -- so should Arc have something similar?
[Forgive me if this is already the case in Arc -- I have not been able to find any examples of a library being loaded, possibly because the standard library doesn't exist yet.]