Re: python question

Circular imports are bad in any language. Just because you can doesn't mean you should.  Learn to fix this, not how to hack around it.

You can do this in something like PHP because PHP doesn't have a proper package system, which introduces other problems.  You can do this in C++ because C++ is very old, and when it was first written they didn't have the computing power to have a proper package system.  Also, C++ requires a bunch of extra things to make it work.  In most modern languages you can't do it, and C++ and PHP don't think it's a good thing to do either.

You need to learn how to write code that splits concerns up so that you don't have to do it this way.  Globals are only a good idea for very small programs.  When you use a global, you make it so that you have to think about the whole program all the time, even if it's larger than an entire bookshelf of novels.  The oint of passing parameters around is that when you read the function, you only have to be concerned with the function you're reading, not everything everywhere that might have touched the globals.  it lets you see where data comes from and where data is going, without having to memorize everything.

I've worked on multiple 100000 line codebases.  They get away without globals.  You can too.

But either way, doing what gettext does will take as much work as just fixing your code.  What gettext does isn't about having a global, it's about working well with automated tools that can figure out which strings from your program will need translating without having to run the program.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Hijacker via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : zywek via Audiogames-reflector

Reply via email to