Non-ugly ways to implement a 'static' class or namespace?
thebluepandabear
therealbluepandabear at protonmail.com
Mon Jan 23 00:16:58 UTC 2023
> // app.d
>
> import API = api;
>
>
> void main()
> {
> API.draw();
> }
>
> ```
Another thing that I don't like about that solution, is that it
doesn't 'force' the user to write in a namespace-like style.
C++ `namespaces` force you to (I believe), and so does `static
class` from Java/C#.
D is both an object oriented and procedural language, I would
honestly love to see some sort of `namespace` or `static class`
feature come into the language. I know that it's controversial
here, but I would honestly think it would help develop the
language in a good way. But that's just my opinion.
More information about the Digitalmars-d-learn
mailing list