Re: Problems with field initialization
Andre van Tonder 14 Sep 2005 21:04 UTC
On Wed, 14 Sep 2005, Michael Sperber wrote:
>
> Andre van Tonder <xxxxxx@now.het.brown.edu> 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.
Cheers
Andre