
medium.com Data Transfer Object (DTO) with Kotlin data classes and extension functions
It’s something simple but makes the code much cleaner

Are extensions a good solution for DTO mapping?
It’s something simple but makes the code much cleaner
I came across this post (and more like it) claiming extensions to be a good, or at least different, solution for mapping DTO's.
Are they though? Aren't DTO's supposed to be pure data objects? I've always been taught to seperate my mappings in special mapping services or mapping libraries like MapStruct and ModelMapper for implementing the good practice of "seperation of concerns".
So what about extensions?