Non-ugly ways to implement a 'static' class or namespace?
thebluepandabear
therealbluepandabear at protonmail.com
Mon Jan 23 00:14:24 UTC 2023
Something interesting.
I know that D has C++ SFML bindings, although they are
unmaintained.
I was interested to see how they would 'implement' the C++
namespaces of SFML, and - boy was I surprised.
Reading through `DSFML`, I see `final abstract class` getting
used to implement SFML's `Keyboard` namespace:
`final abstract class Keyboard` at
https://github.com/Jebbs/DSFML/blob/master/src/dsfml/window/keyboard.d
It seems like using `final abstract` is the best solution.
More information about the Digitalmars-d-learn
mailing list