On Fri, 9 Sept 2022 at 13:06, SAIFI <m...@strikr.io> wrote: > > On 9 September 2022 11:47:30 am UTC, Jonathan Wakely <jwakely....@gmail.com> > wrote: > >On Fri, 9 Sept 2022 at 12:17, SAIFI wrote: > >> > >> > > >> > let's use a simple database, a CSV file for simplicity, and generate > >> > both files from this. > >> > >> Curious to learn, why wouldn't you want to do it in C++ itself ? > >> > >> As an example, please see > >> https://github.com/cplusplus/lib-issues-software > > > >That repo has been dead for years, maybe you want the still maintained code > >at: > >https://github.com/cplusplus/LWG/tree/master/src > > > >I'm not persuaded that 4000 lines of C++ code for processing XML into > >HTML is really a good alternative to 150 lines of Python. > > To quote again, the OP words for emphasis, "let's use a simple database, a > CSV file for simplicity, and generate both files from this." > > Do you think the effort estimate to implement this requirement is "4000 lines > of C++" ?
No, but it was you who linked to the LWG repo with 4000 lines of C++, I don't know why. > Am i missing something here ? OK ... This script would be needed to bootstrap GCC. Using C++ would mean that we need to restrict it to C++11 (since that's all that is needed for bootstrapping GCC), and deal with all the peculiarities of the platform's C++ compiler and linker. We already do that to build GCC itself, but now we'd also need to do it for this tool that has to be built first, and would need to use all the right CXXFLAGS and LDFLAGS etc. to compile on the build machine (which might have unconventional linker properties, for example). We'd also need to implement a CSV parser from scratch. Or we could just use 150 lines of Python, which already has a csv module to do the parsing correctly. C++ is a great tool for some things. For parsing a CSV file and printing out some text there are simpler tools.