First Draft: Static Single Assignment

Peter C peterc at gmail.com
Sun Nov 30 04:09:52 UTC 2025


On Friday, 21 November 2025 at 18:49:32 UTC, Walter Bright wrote:
> `final` is better anyway.

// good luck interpreting this code...(or explaining it to 
newcomers to D).
final class Config
{
  final:
     void baz() { }
     int port = 8080;
     string host = "localhost";
}

// my alternative - where there is no ambiguity and no cognitive 
overhead!
final class Config
{
  final:
     void baz() { }

  fixed:
     int port = 8080;
     fixed string host = "localhost";
}



More information about the dip.development mailing list