Email list hosting service & mailing list manager

option vs. make-option Anthony Carrico (29 Oct 2002 15:20 UTC)
Re: option vs. make-option felix (30 Oct 2002 18:45 UTC)
Re: option vs. make-option Anthony Carrico (30 Oct 2002 20:27 UTC)

Re: option vs. make-option Anthony Carrico 30 Oct 2002 20:33 UTC

On Wed, 30 Oct 2002, felix wrote:

> I'd say `make-option' is more Schemely.

Schemeliness is most difficult for arbitrary decisions.

R5RS seems to use "make-foo" when the args and slots differ, and "foo"
when they are the same. I have seen both conventions in code with records,
so I can't really say one is definitely more Schemely.

> On the other hand `option' is shorter, and a complex command-line
> interface might easily have many of those.

Yes they may. I oscillate on this issue. An one point I was strongly in
the "foo" camp for constructors, because that convention makes code
compact, but I often find myself using "make-foo" for constructors finding
the name "foo" more useful for other variables.

In this case, it seems to me that a programmer is most likely to create
the options together in one place, and might not mind shadowing the
constructor when using option's elsewhere in their code. I don't know for
sure.

  -Tony Carrico