poke-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Syntax for fields with both explicit constraints and initializ


From: Jose E. Marchesi
Subject: Re: [RFC] Syntax for fields with both explicit constraints and initializers
Date: Sat, 06 Mar 2021 09:22:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>> I just just add a little thing: if both INITVAL and EXPR are provided,
>> then INITVAL should be checked against EXPR.
>>
>> In other words, this should raise a constraint expression:
>>
>>     int i = QUUX : i in [FOO, BAR, BAZ];
>
> Ya that makes sense to me! Shouldn't be able to set invalid default value.

Well, I like the proposed syntax.

If nobody objects and provides alternatives, I will schedule
implementing it for 2.x :)

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]