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

Re: option vs. make-option

This page is part of the web mail archives of SRFI 37 from before July 7th, 2015. The new archives for SRFI 37 contain all messages, not just those from before July 7th, 2015.

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

  -Tony Carrico