First, I would like to say "hi" as this is my first post on the forums. I really liked Master of Orion and got super hooked on FreeOrion recently. Therefore, I decided to help out the project.
As I am primarily a Python developer I like the way f-strings and string templates emphasize what the final shape of the string/message/log would be. In C++ this can be achieved in several ways, one of which (boost::format) is used already in the localization code in FreeOrion.
I was wondering whether developers of FreeOrion would be interested in seeing it in other places like the many uses of DebugLogger in CombatSystem: https://github.com/freeorion/freeorion/ ... m.cpp#L244
Here is the related GitHub issue I opened: https://github.com/freeorion/freeorion/issues/4047
I personally don't have a strong opinion either for or against, but I would be interested in tackling it as it would give me a broad overview of the code base.
What are your thoughts?
Using boost::format for DebugLogger messages and other logs
Moderator: Committer
-
- Space Krill
- Posts: 1
- Joined: Mon Aug 08, 2022 7:36 pm
Re: Using boost::format for DebugLogger messages and other logs
A belated welcome from my side
Regarding your question, I don't have a preference, but I'm not doing coding stuff. That's something our C++ coders need to weigh in on... anyone? Not much feedback yet...
Regarding your question, I don't have a preference, but I'm not doing coding stuff. That's something our C++ coders need to weigh in on... anyone? Not much feedback yet...
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Using boost::format for DebugLogger messages and other logs
I doubt there's enough people donig string formatting in FreeOrion C++ code to have a useful poll result.