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

Re: Problems with field initialization

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

On Wed, 14 Sep 2005, Michael Sperber wrote:

Andre van Tonder <andre@xxxxxxxxxxxxxxxxx> writes:

 Instead of having a separate <init expression> for each field, one could
 simply have an <expression> for the constructor, which should evaluate to a
 procedure that returns the computed fields (using VALUES, for example).

This might be a suitable alternative if it could fit into the
syntactic layer in such a way as to provide a simple way of
defaulting, at least for the case where I just want the constructor
arguments to go into the corresponding fields.  Do you have
suggestions on how that might look?

Perhaps another keyword clause

  (constructor <expression>)

which can be left out for the default constructor.