dchaley / qupath-project-initializer

Tools to initialize a QuPath project from input files
0 stars 1 forks source link

Issue7/refactor delegation #42

Closed HawkSK closed 1 month ago

HawkSK commented 1 month ago

Refactoring of https://github.com/dchaley/qupath-project-initializer/pull/41 based on the delegation syntactic feature of Kotlin

HawkSK commented 1 month ago

Maybe mentioning this Kotlin feature in your article could advocate and popularise this feature more :)

dchaley commented 1 month ago

Good suggestion @HawkSK , I just updated the article. I credited to your GitHub username, lmk if you have a Dev.to profile you'd like me to use.

UPDATE 2024-09-10: Thanks to Adrián Szegedi (GitHub HawkSK) the code is even simpler (PR#42): no need to explicitly forward methods. Instead we use Kotlin's delegation syntax which implicitly forwards non-overridden methods. This removes 100 lines of boilerplate 💪🏻