Thank you !

I don’t know which language you are using but I’m certain it is not coupled to ONE operating system.

There’s only one operating system which is passed to you as context. Malloc() and Free() are Operating System dependant so the compiler manages this context for you.

I don’t know much about game development. If you use Untiy Physics engine as Singleton you will not be able to mock it with a fake Physics engine. You just couple to it and trust everything will be right.

Lastly. I agree with treating everything as a service.

I disagree to couple to them by calling SingletonTranslationService::getInstance()

Who provides that service ? can you mock it ? can you put a decorator before it ? can you put a spy ? You can do all those things and much more if you break this hard binding

Written by

I’m senior software engineer specialized in declarative designs. S.O.L.I.D. and agile methodologies fan.

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