DSFML icon indicating copy to clipboard operation
DSFML copied to clipboard

Change some of DSFML to use structs instead of classes

Open Jebbs opened this issue 10 years ago • 2 comments

Most (but not all) objects in DSFML do not use polymorphism, but they are declared as classes.

I think that for a lot of reasons, anything that can be a struct should be a struct. Anything that needs polymorphism can be declared as a class, but otherwise should be a struct.

The 2.3 API will follow this and will change any classes that do not use polymorphism to be structs instead.

Jebbs avatar Nov 08 '15 07:11 Jebbs

Coming back around on this, I've changed my mind a little bit.

I'd like to change things to be structs IF it can easily be represented as a structure that matches the layout of its SFML counterpart(see #250 ), or if it can be re-implemented in D as a struct.

Otherwise, the API will stay the same.

Jebbs avatar Jul 31 '17 23:07 Jebbs

This will involve a lot of work, so I'm pushing it off until the next release.

Jebbs avatar Aug 05 '17 21:08 Jebbs