tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] OT (Re: modern c++ compiler written in C)


From: Christian Jullien
Subject: Re: [Tinycc-devel] OT (Re: modern c++ compiler written in C)
Date: Sat, 16 May 2015 08:11:21 +0200

Sorry to insist

> cfront showed us a usable C++ dialect and also a proof that such a dialect
can be efficiently implemented by a translator to C.

Nobody doubt it's true. Cfront has been the de facto standard for years so
it is clearly usable and you can do reasonable code with it. However, I
recalled it was a pain to use C++ at that time on big to medium size
project. Many features where missing to make good OOP subsystems. As it
started its life, I was a "C with classes" and as such was already an
improvement over POD C structs.

> - would be useful, as a compact and extremely fast compiler  for a
practical subset of C++

I've more trouble with this sentence. Useful for what these days?

- to teach OOP? Unless license is clarified you'll not have the right to use
it, even for teaching. g++ is fast enough to compile one class and to see
how encapsulation works.
- to do some personal and simple work. Yes, but who wants to create a
program that don't compile with g++ (streams work differently now - jus as
an example). Do you really want to program without exceptions?
- do you really want to forget about nice C++ standard containers and
algorithms that greatly simplify your life these days? Are you happy to
write your own List class that internally uses void* ? Are you also happy to
test all return code when you call a method to know if an error occurred?
Sorry I pass

Btw, if tcc compiles fast, it runs not so fast. If the Cfront and its
associated libraries are compiled with tcc, there is a chance that it will
be slower to compile than g++. When used with -O0 g++ is fast to compile
even on my Rasberry Pi using a SD card.

> - is realistically doable

Sure it is

Now I appreciate the challenge to let a modified Cfront be compiled by tcc
but, once it proved it works, I see no reasons to use it in any cases. And
even it works no so bad, nobody will use it because of the LICENSE.

Christian

-----Original Message-----
From: address@hidden
[mailto:address@hidden On Behalf Of
address@hidden
Sent: vendredi 15 mai 2015 21:53
To: address@hidden
Subject: Re: [Tinycc-devel] OT (Re: modern c++ compiler written in C)

On Fri, May 15, 2015 at 07:32:02PM +0000, address@hidden wrote:
> > Historical research - yes. Any practical application - only at one's 
> > own risk, left to the discretion of AT&T to wipe one out of 
> > existence or not.
> 
> Due to this legal issue, cfront is not worth it.
> 
> Any other alternative?

cfront showed us a usable C++ dialect and also a proof that such a dialect
can be efficiently implemented by a translator to C.

This means that the effort to recreate such a translator from scratch
- would be useful, as a compact and extremely fast compiler
  for a practical subset of C++
- is realistically doable

This is my feeling about the best or the only possible way to combine many
of the attractive features of tcc and C++/OOP.

An easier but much less certain way would be to try to talk to someone at
AT&T - this would be certainly a lot more efficient, _if_ it could work.

Rune


_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]