Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions
On 05/09/10 23:08, Thomas Preud'homme wrote: On Saturday 08 May 2010 17:05:32 mobi phil wrote: Hello, the most useless question on this list: did anybody think about adding basic C++ extensions to tcc, eventually trivial form of templates? tcc misses at least one thing for C++: exception handling. I plan to implement it but I won't start the implementation before mid june so don't be too in a hurry. :) And of course the C++ parsing must be added. As some some rules are different than in C (like priority of operators), this might require some (maybe minor) refactoring. Also, the calling convention is different so there is work to do in the symbols generation as well. That's for what I know, I may have forgotten things. Regards. C++ is a very different weird and hardly complex language compared to C. Are you saying that TCC will support it? In mainstream? As an extension? I would really prefer to not have such support..and in case, just think on object-oriented extensions, but not c++. --pancake ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions
On Saturday 08 May 2010 17:05:32 mobi phil wrote: Hello, the most useless question on this list: did anybody think about adding basic C++ extensions to tcc, eventually trivial form of templates? tcc misses at least one thing for C++: exception handling. I plan to implement it but I won't start the implementation before mid june so don't be too in a hurry. :) I presume setjmp/longjmp, isn't it? Hm... and unwinding, calling destructors... indeed.. bit of work :) And of course the C++ parsing must be added. As some some rules are different than in C (like priority of operators), this might require some (maybe minor) refactoring. Also, the calling convention is different so there is work to do in the symbols generation as well. That's for what I know, I may have forgotten things. step by step, isn't it? for from me to define your schedule :), but in my opinion, the following would be the priority list: 1. class + inheritance 2. template 3. operators 4. exceptions 5. lambda !! :) I think exceptions are not the the most important things, as they can be simulated with macros. (well you need sthg like endtry macro after the exceptions). Based on my experience templates are of higher added value, than operators. Calling convention: would not work with what is already there? It is not strictly necessary, at least at the begining to be binary compatible with libraries, etc. or? rgrds, mobi phil being mobile, but including technology http://mobiphil.com ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions
Hello Pancake, hello All, If I am not wrong you are the guy behind radare. Really cool tool, however bit disappointed that never ever got any reply to mails sent to the list... C++ is a very different weird and hardly complex language compared to C. Indeed it is complex, for sure handling mangled symbols with radare would cause pain to some radare users :). But I think this does not meen it is necessarily weird. I can call C as weird, as 'natural' inheritance or other object orinted extensios were simply not added to the original design. (I know the workarounds, no worry ). I also could say that C is weired, as in lot of situations I have to accept that it does not provide features that seem to be so obvious to have, after using so other languages. Instead I have to write workarounds that simply cost me time. I miss templates (simple ones, not the crashes-my-compiler-heavy-metaprogramming). There is workaround for templates, but you need more, and often you end with uggly macros etc. Are you saying that TCC will support it? In mainstream? As an extension? I would really prefer to not have such support..and in case, just think on object-oriented extensions, but not c++. So... it seems that you need object oriented extensios... I think you are/were missing them when writing radare 1 and refactoring for radar 2, isnt't it? So add this, add that and consider a bit forces that push for minimal compatibility... you end up with c++. Anyway there are few other things that could be added even on top of c++. And indeed, the key is extension.. I think tcc is a very interesting platform to play with ideas like prototypes, mixins, traits, etc. etc. If any of them you did not need in any of your works, this does not mean, that they are usefull etc. etc. As the design of tcc is relatively simple, maybe the idea is to add some plugin mechanism to the parser, where one could add hooks for some extensions etc. Why not, one will end up with C.2 a super language that will offer more than c++ etc, with superfast compiler etc. etc.. Prototype languages are booming, prototypes are powerful feature. I saw recently Lisaac, a new language. I like some ideas of lisaac, (http://www.mobiphil.com/2010/05/lisaac-is-almost-complete, but the cons list is much longer than the pros... That's all for the moment:) rgrds, mobi phil being mobile, but including technology http://mobiphil.com ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions
Of course it is, how would you link to libstdc++ if you aren't compatible ? scatter-gather... why would you link? :) ... well recompile it, or do not use it... stdc++ is not necessarily the strength number one of c++. My point was that calling convention would not be strictly necessary to bootstrap the action :) -- rgrds, mobi phil being mobile, but including technology http://mobiphil.com ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel
Re: [Tinycc-devel] the most useless question on this list about basic c++ extensions
On Saturday 08 May 2010 17:05:32 mobi phil wrote: Hello, the most useless question on this list: did anybody think about adding basic C++ extensions to tcc, eventually trivial form of templates? tcc misses at least one thing for C++: exception handling. I plan to implement it but I won't start the implementation before mid june so don't be too in a hurry. :) And of course the C++ parsing must be added. As some some rules are different than in C (like priority of operators), this might require some (maybe minor) refactoring. Also, the calling convention is different so there is work to do in the symbols generation as well. That's for what I know, I may have forgotten things. Regards. signature.asc Description: This is a digitally signed message part. ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel
[Tinycc-devel] the most useless question on this list about basic c++ extensions
Hello, the most useless question on this list: did anybody think about adding basic C++ extensions to tcc, eventually trivial form of templates? -- rgrds, mobi phil being mobile, but including technology http://mobiphil.com ___ Tinycc-devel mailing list Tinycc-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/tinycc-devel