[Top][All Lists]

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

Re: [Tinycc-devel] Extension to C language: #TCC part2#2

From: Stefano Zaglio
Subject: Re: [Tinycc-devel] Extension to C language: #TCC part2#2
Date: Sun, 03 Jun 2012 19:54:33 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

I have two dreams.

1st a #TCC. I think that the preprocessor can be enhanced.

And I'm asking to who well know TCC if this could be possible:

*int* fact(*int* n) {*return*(n==0?1:fact(n-1));}

    printf( "factorial of 3 is " #fact(3) );

that will become perfectly:

    printf( "factorial of 3 is 6" );

while the C++ version ... :

        *template*  <int N>
        *struct*  Factorial
        *enum*  { value = N * Factorial<N-1>::value };

        *template*  <>
        *struct*  Factorial<1>
        *enum*  { value = 1 };

        // example use
        *int*  main()
        *const*  *int*  fact3 = Factorial<3>::value;
            std::cout<<  fact3<<  endl;
        *return*  0;

I mean, use the ability of TCC to run script to generate code from in-code:

*void* config_from_outsource(*char* *param) {
        // ...

*enum* colors {

*void* gen_config() {FILE f;...fopen("config.h","w+");...}
    #include "config.h"

Today's complexity does not preclude the need for GUI tools and IDE hyper-integrated. That 's what makes it potentially winning the C # (mono & c).

For example, consider the use of TCC in place of lemon parser in sqlite and the integration of tcc in sqlite to extend SQL functions.

And I like that Google was financing all of this instead of spending money trying toreplace JavaScript with Dart, Go & C., because #TCC just needs a good editor for children, chicken and monkeys like me, with a libtcc, ofcourse, to get or create plugins.

reply via email to

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