*once again* I have run into a situation where the...
# announcements
d
once again I have run into a situation where the lack of package-private access is a really bad thing
1
I have an EmailTemplate class in my email-service module. It has members that should not be part of its public API. The members only need to be accessed by a class in the same package (and module). However, they’re open because they’re intended to be overriden. Unfortunately, there is no way to now create templates in other modules.
To do this I now have to have an internal getter method to access a protected open val.
Can we just all agree that this is stupid?
🚫 6
this is how you get Java’s
protected
functionality back in Kotlin:
a
Maybe the better way is not to create protected field but redesign your API and provide a well fitted EmailTemplateBuilder?
6