A concern I currently have with top-level functions is that of discoverability, so although it can get around the problem of extending an existing class how do you know the function exists? At least within an interface or class, you will get auto-complete when typing ImageReader.

Of course, Joshua points out that even within a class these factory methods do not necessarily stand out any more than any other already.

Matt Dolan has been eating doughnuts and developing with Android since the dark days of v1.6.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store