Non-ugly ways to implement a 'static' class or namespace?
Ruby The Roobster
rubytheroobster at yandex.com
Fri Jan 20 13:50:25 UTC 2023
On Friday, 20 January 2023 at 13:38:52 UTC, Hipreme wrote:
> On Friday, 20 January 2023 at 11:28:23 UTC, thebluepandabear
> wrote:
> ...
> [snip]
>
> With a single file, you can do:
> ```d
>
> final class Algo
> {
> @disable this();
> static:
> void drawLine(...){}
> }
> ```
This also works, but it dissimilar to Java in that in Java, each
class gets its own file.
More information about the Digitalmars-d-learn
mailing list