First Draft: Static Single Assignment
jmh530
john.michael.hall at gmail.com
Wed Nov 19 13:08:04 UTC 2025
On Wednesday, 19 November 2025 at 04:33:38 UTC, Peter C wrote:
> [snip]
>
> Ummm... it's a final method.
>
> module mymodule;
> @safe:
> private:
> import std;
>
> class C
> {
> final int f()
> {
> return 0;
> }
> }
>
> void main()
> {
> if (__traits(isFinalFunction, C.f))
> writeln("C.f is a final method");
> else
> writeln("C.f is not a final method");
> }
>
> // C.f is a final method
My point was that if this DIP is approved, then a newbie to the
programming language might get confused as to whether `f` is a
`final` method or returns a `final int`.
More information about the dip.development
mailing list