4 ms·
So did I, and then I did a stint in pico-8, stopped worrying and started loving the globals. It's my code, tiny, sloppy, single threaded, nobody reads it, it ju
by Cthulhu_ 2y ago
So did I, and then I did a stint in pico-8, stopped worrying and started loving the globals. It's my code, tiny, sloppy, single threaded, nobody reads it, it just needs to do a job.
Not going to use it in anything I get paid for though, lol. At one point there was a commonly accepted "singleton" pattern for things like logging but that's just globals with extra steps. In Go I just create services in my main and pass them around where needed.