On Friday, 20 January 2023 at 13:03:18 UTC, thebluepandabear wrote:
ll
a function without instantiating said class, as functions act on the class object.

Ok, thanks.

I think D should implement something similar to `static class` but I doubt it will happen.

D isn't Java, and never will be. If you want similar functionality, you put the functions in a separate file, and add the line to the top of it:

```d
module modulename;
```

and title the file modulename.d. Then you can use this module as a .class file in java by adding

```d
import modulename;
```

to the file that uses it.

Reply via email to