[Nickle] Artificial distinction between import and autoimport

Carl Worth cworth at cworth.org
Fri Feb 1 17:07:07 PST 2008


So I started writing a nickle program today[*] and ended up with the
following code:

	import Socket;
	import File;
	autoimport Process;

I contend that the distinction of "core" namespaces like Socket and
File and "non core" namespaces like Process is arbitrary and totally
uninteresting to the user. So forcing the user to remember which is
which is just not nice.

Keith explains that the distinction comes down to whether the core of
nickle uses the namespace or not, (and there's actually a desire to
keep the core as small as possible so that nickle can load fast). So
there's even the potential for namespaces to move from core to
non-core. Again, not nice for the user.

So Keith says "There's no harm in autoloading a core namespace, why
don't you just do that?". But if I'm going to always type "autoload"
for all namespaces, why don't we just settle on the "import" name and
make it do exactly what autoimport does today.

Bart, I'm informed that this all takes place in fairly twisty passages
of the implementation, and that you are likely to be much more
successful at finding your way through them than I am. Care to take a
whack at it?

-Carl

PS. Same applies to "load" and "autoload" of course.

[*] 60 lines of code and 1 nickle bug[**] found so far.

[**] twixt (statement; /* nothing here */) was segfaulting---keithp
     will push the fix soon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/nickle/attachments/20080202/eeed11c7/attachment.pgp 


More information about the Nickle mailing list