- cross-posted to:
- fediverse@discuss.online
- cross-posted to:
- fediverse@discuss.online
Seems like an interesting effort. A developer is building an alternative Java-based backend to Lemmy’s Rust-based one, with the goal of building in a handful of different features. The dev is looking at using this compatibility to migrate their instance over to the new platform, while allowing the community to use their apps of choice.
Here’s an example:
https://github.com/sublinks/sublinks-api/blob/main/src/main/java/com/sublinks/sublinksapi/community/listeners/CommunityLinkPersonCommunityCreatedListener.java
IMO that’s a lot of code (and a whole dedicated file) just to (magically) hook a global event and increase the subscriber count when a link object is added.
The worst part is that it’s all copy/pasted into a neighbouring file which does the reverse:
https://github.com/sublinks/sublinks-api/blob/main/src/main/java/com/sublinks/sublinksapi/community/listeners/CommunityLinkPersonCommunityDeletedListener.java
It’s not the end of the world or anything, I just think good code should surprise you with its simplicity. This surprises me with its complexity.