Are you requesting a feature, reporting a bug or asking a question?
Question / docs
What is the backwards compatibility promise regarding public functions on question types? The reason I'm asking is that some functions like QuestionFileModel::canPreviewImage() are public while they should probably be private.
The issue is that if we regard this function a part of the public SurveyJS library API, we break backwards compatibility every time we mark such a function as non-public.
Not cleaning up such functions means the API surface is bigger and code cleanup becomes harder, because we now have to take into account not only internal calls to these functions but also possible third party calls.
Note that even public functions that need to be public should not always be part of the public API. Other projects solve this by using annotations like @internal which essentially means: While this function is public, it can be changed at any time. The idea behind this is that the core team can update all calls to the public function in the same change set, but it cannot enforce that third parties don't call this code.
Are you requesting a feature, reporting a bug or asking a question?
Question / docs
What is the backwards compatibility promise regarding public functions on question types? The reason I'm asking is that some functions like
QuestionFileModel::canPreviewImage()
are public while they should probably be private.The issue is that if we regard this function a part of the public SurveyJS library API, we break backwards compatibility every time we mark such a function as non-public. Not cleaning up such functions means the API surface is bigger and code cleanup becomes harder, because we now have to take into account not only internal calls to these functions but also possible third party calls.
Note that even public functions that need to be public should not always be part of the public API. Other projects solve this by using annotations like
@internal
which essentially means: While this function is public, it can be changed at any time. The idea behind this is that the core team can update all calls to the public function in the same change set, but it cannot enforce that third parties don't call this code.