basilisque-framework / AutoImplementer

Automatically implements interfaces
Apache License 2.0
1 stars 1 forks source link

Create a basic version of the AutoImplementer project #5

Open astaerk opened 2 weeks ago

astaerk commented 2 weeks ago

info: Initial commits were on #1 and #3, should have been on this issue number

Fasteroid commented 2 weeks ago

clarify if it would be better to mark the implementing classes for auto implementation

This feels more intuitive to me. Also less chance to cause weird side effects. Imagine a dev that's unfamiliar with this project tags some existing interface with AutoImplement to use it in just one class—now every other class running that interface gets it auto-implemented! That seems like it could break something. Marking auto-implement on the class itself avoids that.

astaerk commented 2 weeks ago

yeah, that is exactly what I have in mind, too. On the other hand if manually implemented members will be detected and skipped nothing would break for existing implementations. And it is one thing less I have to do for all my implementing classes. Also this would mean you'd have to specify which interfaces should be automatically implemented on class level; because it's probably not all of them. This is why I somehow think about supporting both scenarios.

btw. I moved the attributes to namespace Basilisque.AutoImplementer.Annotations felt cleaner somehow