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

Re: option vs. make-option



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