First Draft: Static Single Assignment

Peter C peterc at gmail.com
Sun Nov 16 21:48:32 UTC 2025


On Sunday, 16 November 2025 at 09:59:19 UTC, Kapendev wrote:
> On Sunday, 16 November 2025 at 04:16:56 UTC, Peter C wrote:
>> I propose intead, 'init' -  it (at least to me) directly 
>> evokes an initialization context for the construction of a 
>> variable.
>
> I don't think this is a good idea because `init` is a common 
> constant or function name. Not D specific also, just check some 
> code in other languages.

We've had the 'init' keyword in C# for many years now.

https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/init

init evokes the context of initialization, which is not what C#'s 
'sealed' would have done.

'sealed' is D's 'final' btw - and both of those invoke an OOP 
context (structural inheritance and type extension).

I would have thought all the anti-oop people would have given me 
a +1 for suggesting 'init' instead of final ;-)



More information about the dip.development mailing list