Arc Forumnew | comments | leaders | submitlogin
1 point by almkglor 5944 days ago | link | parent

I've been looking at it, and it looks like it's added quite a few functions to the global namespace. Either we need to implement namespaces (or modules) quite well, or we need to make local functions easier to create.


1 point by absz 5944 days ago | link

Hmm, that's a good point. I think that andmap and ormap are generically useful; the rest should probably be hiding. I could wrap all of make-br-fns in (with (free? (rfn free? ...))), etc., but then it would have to recreate the procedures each time... prefixing the procedures with * mbf- might be one way to deal with it, so they don't overload a common name. I don't know what the best option is (until we actually have modules, in which case it's clear)--thoughts?

-----

2 points by almkglor 5944 days ago | link

Well, the lisplike we use in the office doesn't have modules either, so our convention (actually just my, since no one else takes that language seriously) is to put a prefix name like yours.

Btw there might be a bug in 'arglist-vars - it uses (is arglist 'cons), maybe you meant (isa ...) ?

-----

1 point by kennytilton 5944 days ago | link

I use CL with its pretty nice package mechanism and I still prefix all my names with a mnemonic abbreviation of the package name. FWIW.

-----

2 points by almkglor 5944 days ago | link

LOL. In my off-time in the office I'm building a package system for that lisplike, basing off a macro that must enclose all forms that need to use packages; basically what it does is add the package name to the symbols that have been imported from the package.

-----

1 point by almkglor 5944 days ago | link

Also, for 'arglist-frees - from what I can hack, it tries to extract used variables in argument lists for optional arguments. So for example, your intent is that: (arglist-frees '(x (o y (some-var)))) => (some-var)

However, to extract the subexpression, you use car:cdar. I don't understand why.

-----

1 point by absz 5944 days ago | link

You are correct on both counts: that's two bugs. car:cdar should be cddr. I'm adding the * mbf- prefix, and I'll repush then.

-----

1 point by almkglor 5944 days ago | link

Will be waiting, since I intend to do the docstrings for them; unless you wish to do the docstrings yourself ^^

-----