chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] I've gots an egg: missing.egg


From: Alaric Snell-Pym
Subject: Re: [Chicken-users] I've gots an egg: missing.egg
Date: Thu, 13 Aug 2015 13:26:03 +0100 (BST)

On Wed, 12 Aug 2015, Alexej Magura wrote:

Hey, I've got a new egg that I'm working on: https://github.com/amagura/eggs/tree/master/staging/missing/trunk

Excellent! May I offer some tips?

1+ and 1- duplicate add1 and sub1, which are already in the library: http://api.call-cc.org/doc/library/add1

What is !* supposed to do? Using eval like that is most likely not a good idea. Should you be using apply instead? Something like "(not (apply fn ...))"?

Rather than using a "settings" alist (note that mutation of things imported from modules is not a great idea!), it would be more idiomatic to use parameters:

http://api.call-cc.org/doc/chicken/parameters

Eg, export a paremter called "egg-actions-need-sudo" that's initialised to #f, and use the value of that in +install etc. That avoids mutation, and lets you safely override things locally (particularly in the presence of threads).

This is a broad mixture of things to put into one egg, especially one claiming such a fine name as "missing" :-) It might be good to split the install/uninstall/upgrade stuff into an eggs egg, submit do* and setq for inclusion in miscmacros, and decide if you really need to publish the logic stuff, which seem less widely useful to me?

Thanks & have fun,


ABS



reply via email to

[Prev in Thread] Current Thread [Next in Thread]