I have a state-machine-like class with a single public method that takes a command interface and dispatches work to a bunch of private methods (actually private extension functions of that class right now, but it doesn't matter). As the amount of commands grow, also grows the file containing this class. If package 📦 protected scope was implemented in Kotlin K, I would be happy to put that class in a separate package from everything else (especially tests), make all the private extensions package 📦 protected and put them in a couple different files, grouped by commands that commonly call other private extensions for subsets of their required actions. ❓ How would you aproach this i Kotlin K without package 📦 protected scope? ❓ Note I want all my tests to see only that public method and not autocomplete private stuff as I have other extension methods in tests that call this public method to easily setup this state machine.
Slack Conversation