Personally I don't see converting C++ to C as practical or realistic, just because of the complexity of modern c++.
To have, lets say, a C++11 to C99 compiler would require a huge and complex compiler, it might even require something like clang, so why use TCC as a back-end ? Selecting only a subset of c++ features is almost like designing another language, modern code base won't compile on it. It's probably saner to use (or design) another language than c++ to compile to C. Anaël. On ven 15/05/15 10:33 , "Christian Jullien" <[email protected]> wrote: > I understand the need for LTS but, unfortunately C++ never worked like > this. > I have been very happy with CFRONT 2.0, then with 3.0 when it came > out but > I'm no more able to use them for my developments. > I recognize that some projects can be very happy to use only > features from > CFRONT 2.0 only. > Except for 'small' projects you generally need to compose your > application > with other C++ library and here comes the nightmare. > Latest C++ is generally like a 'virus'. Because, for good or bad > reasons, > you absolutely need the latest C++ library you depend on, you also > need to > move your code to the same C++ version. > At the opposite, a C++ library using only CFRONT 2.0 features will > not be > usable by more recent C++ versions - I mean C++ < 10 years!! > It is especially true when you develop on different platforms. > LTS C++ will remain a dream. > Again, except for the fun (life is not interesting without fun), I > see no > interest for cfront. I bet that if we have the rights to use cfront > (say > 3.0) you soon will have a zillion of requests to add 'this important > C++ > feature I can't leave without'. > I'll stop to pollute this mailing list with this (interesting) > thread. > Christian > -----Original Message----- > From: tinycc-devel-bounces+eligis= > [mailto:tinycc-devel-bounces+eligis=] On Behalf Of > Sent: vendredi 15 mai 2015 10:03 > To: > Subject: Re: [Tinycc-devel] modern c++ compiler written in C > On Fri, May 15, 2015 at 08:50:44AM +0200, Christian Jullien wrote: > > Of course, I know C++ programs that satisfy themselves with > 'basic' > > C++ features. The difficulty is to agree on 'basic' features. No > two > > C++ users use the same 'basic' features. Some want only > encapsulation + > ctor and dtor. > > No more. Others want to add inheritance. > Basically this means that different people and tasks need different > languages. The intention of "one size is to fit all / to cover all > needs" > leads to a very complex solution. > Given that there are needs and people satisfied with C++ without > templates > and exceptions, it would be nice to keep that "pre-"standard and > implementation alive. > I have one extremely important application, the Coda file system, > which > belongs to this class. The complexity of modern C++ compilers is > several > orders of magnitude bigger than of the application itself. > This is bad, for several reasons (begin with security...). > Another very useful tool, FLTK, looks to be compatible with cfront > and also > is much less complex than the modern development tools. > So it is not wrong per se to have a complex language, but the fault > is to > "pretend" that the next C++ version becomes better for all purposes > and is > expected to be the only available/used one. > Strictly speaking each version is a definition of a new language, > but an > appearance of a new language does not render the other ones > obsolete. The > versions are treated like they do obsolete the previous ones, which > is > actually not true. > Sergey Korshunoff wrote: > > Solution? May be a small c++ compiler (cfront-1 .. cfront-3) which > can > > be considered LTS version. > Sounds just right. > Rune > _______________________________________________ > Tinycc-devel mailing list > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > _______________________________________________ > Tinycc-devel mailing list > https://lists.nongnu.org/mailman/listinfo/tinycc-devel > > _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
