C++ Logo

std-proposals

Advanced search

Re: SCC / ISO IEC - C++ Superset

From: Phil Bouchard <boost_at_[hidden]>
Date: Tue, 3 Aug 2021 19:59:19 -0400
On 8/3/21 7:26 PM, Daniel Gutson wrote:
> Could you please provide a comprehensive list of language changes? A
> more detailed diff?

Before we start, just know that I already implemented the functionality
in a modified version of Clang v12 which is used underneath another
source-to-source compiler that converts Python into C++ code. Given the
complexity of that scenario, the final executable is crash proof and
free from memory leaks. So my point is: this has been thoroughly tested
and it works perfectly fine.

What can be done is to add implicit:

1) parameters (i.e. marker):

void foo(marker &__y /* implicit*/, int a, int b, int c)


2) compound statement instances:

void foo(marker &__y /* implicit*/, int a, int b, int c)

{

     marker __z(__y); // implicit & used to stack trace and to destroy
nested objects


     for (int i = 0; i < 10; ++ i)

     {

         marker __x(__z); // implicit & used to stack trace and to
destroy nested objects

     }

     bar(__x, 1, 2, 3); // implicitly share the stack frame in
subsequent calls

}


3) class members:

struct A

{

     marker & __x;

     A(marker & __y) : __x(__y) {}

};


4) global singletons:

static marker & __x()

{

     static marker __y;

     return __y;

}


5) raw pointers overload:

int main()

{

     int * p = new int(9); // implicitly replaced with your favorite
smart pointer

     delete p; // no-op

     return 0;

}


Just with this framework, we can help improve C++ drastically.

I am planning to talk to Intel regarding their compiler as well this
week or next week to see if they can help us out. My implementation with
Clang v12 works great but can definitely use some speed boost.


Regards,

-- 
*Phil Bouchard*
Founder & CTO
C.: (819) 328-4743
Fornux Logo <http://www.fornux.com>
>
> El mar., 3 ago. 2021 8:14 p. m., Phil Bouchard via Std-Proposals 
> <std-proposals_at_[hidden] 
> <mailto:std-proposals_at_[hidden]>> escribió:
>
>     Greetings,
>
>     I wanted to wait to announce that but since the subject is opened
>     then just know that I am planning to create an ISO / IEC JTC 1
>     framework on top of C++ called C++ Superset (that can be
>     integrated into the C++ later on). You won't have to worry about
>     bad and inefficient memory management anymore. All you'll have to
>     do is to run the compiler on existing C / C++ code and your app
>     will be crash proof and free from memory leaks.
>
>     That framework will offer the ability to add implicit variables,
>     parameters, compound statement instances, class members and global
>     singletons to existing C / C++ code and to overload raw pointers
>     to the user's convenience. The Root Pointer I wrote is patent
>     pending but any other important functionality can be added such as
>     a runtime stack trace, catching segmentation faults before they
>     emit a SIGSEGV, buffer overflows, double frees, ... the most
>     important problems so far.
>
>     More than 10 years ago I was part of the Boost community and I
>     wanted to create my own language but they told me not to create
>     yet another language so I decided to create C++ Superset which
>     makes sense because existing libraries just have to be recompiled,
>     not rewritten from scratch.
>
>     So I was hoping to create my own SCC / ISO mailing list before
>     announcing it but again since the subject was brought up already
>     then now you know. I would like to recruit interested people as well.
>
>
>     Regards,
>
>     -- 
>
>     *Phil Bouchard*
>     Founder & CTO
>     C.: (819) 328-4743
>
>     Fornux Logo <http://www.fornux.com>
>     -- 
>     Std-Proposals mailing list
>     Std-Proposals_at_[hidden] <mailto:Std-Proposals_at_[hidden]>
>     https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>     <https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals>
>

Received on 2021-08-03 19:01:23