On hoot, on boot
wingolog.org
wingolog.org
function add(a) {
return a + arguments.callee.amount
}
add.amount = 2
console.log(add(2)) // => 4
(In this simple eread-only example arguments.callee could be be replaced with add, but if one is doing inline function definitions or other cases that's not possible.)And that was something devs explicitly had to do in their libraries! But in guile there's some automatic capability to expose your bindings.
> Guile programs can use first-class accessors on the module systems to pull out bindings.
In general, I strongly feel like the ability for the language to let developers explore the bindings is like "the" missing piece of programming language systems, is one of the primary gates to good metaprogramming ever emerging. I wish the runtime would be observable.
function selfBind(f) {
return function g(...args) {
return f.call(this, g, ...args);
};
}
let add = selfBind(function (callee, a) {
return a + callee.amount;
});
add.amount = 2;
/* ... */
Though obviously it isn't quite as straightforward as 'arguments.callee'.But more to the point, I absolutely love how well Hoot works, I've been playing with it for the last month and plan on doing the next Lisp game jam with it.
Is the difference that you can literally fetch some name defined in a module at runtime vs it being a purely static thing a-la C includes?
It really needs someone to give other package managers some love (Homebrew, apt, rpm...)
But I get your point.