Introducing the Backbone++ Programming Language
Hello Boost, (The former language name is already taken by Microsoft) By taking advantage of the simplicity of the code of Javascript, the power of C++ and the deterministic C++ memory manager Root.Ptr, I decided to write my own programming language which takes advantage of all these powerful features. On the downside Javascript suffers from a slow garbage collector that kicks in randomly which makes it impossible to write real-time engines and C++ just doesn't have any objective memory manager up to this day. My initial attempt was to convert Javascript into C++ but then the principle of 'closures' and 'escape analysis' inlaid with Javascript just makes it impossible to get rid of the garbage collector. So if we sacrifice these principles away then we can integrate Root.Ptr and take advantage of the power of C++ and the true flexibility and run-time features of Javascript. It has to be noted that BB++ is an extension of C++ and therefore everything we can do in C++ can also be done in BB++ and vice-versa. You can find the source code here: https://github.com/philippeb8/root_ptr/tree/bb++/bbpp2cpp And the benchmarks indicate BB++ is 3 times faster than Node.JS! Note that the language is still in a preliminary state but we can already compare it. Furthermore, in theory, it should be possible to offer a service which compiles the executables for combinations of major architecture / OS only once, cache these executables on the webserver and executing them in a specialized container on the client's desktop. This or convert the file BB++ -> C++ -> WebAssembly. Thus, in theory, we would be able to execute real-time engines from within our own browser! So I am including Boost because the backend of BB++ is Root.Ptr and the benefits are inevitable at this point. You can see here an example of mixing BB++ with C++ code and how easy it is for the language to get rid of cyclic references: https://github.com/philippeb8/root_ptr/blob/bb++/bbpp2cpp/tests/input2.bb Regards, -Phil http://www.fornux.com http://www.finitetheory.com https://www.actatabula.com http://www.backbonepp.com
On 19/07/2017 17:19, Phil Bouchard wrote:
(The former language name is already taken by Microsoft)
The new one might be confused with http://backbonejs.org/...
By taking advantage of the simplicity of the code of Javascript, the power of C++ and the deterministic C++ memory manager Root.Ptr, I decided to write my own programming language which takes advantage of all these powerful features.
On the downside Javascript suffers from a slow garbage collector that kicks in randomly which makes it impossible to write real-time engines and C++ just doesn't have any objective memory manager up to this day.
My initial attempt was to convert Javascript into C++ but then the principle of 'closures' and 'escape analysis' inlaid with Javascript just makes it impossible to get rid of the garbage collector. So if we sacrifice these principles away then we can integrate Root.Ptr and take advantage of the power of C++ and the true flexibility and run-time features of Javascript.
It has to be noted that BB++ is an extension of C++ and therefore everything we can do in C++ can also be done in BB++ and vice-versa.
You might get more attention if you had documentation on the language itself and how it extends C++ and what benefits that provides. Talk of sacrificing closures is a little worrisome; closures are an important feature of JS (and also of C++).
On 07/19/2017 03:08 AM, Gavin Lambert via Boost wrote:
On 19/07/2017 17:19, Phil Bouchard wrote:
(The former language name is already taken by Microsoft)
The new one might be confused with http://backbonejs.org/...
I saw that and that's why a added a ++ prefix.
By taking advantage of the simplicity of the code of Javascript, the power of C++ and the deterministic C++ memory manager Root.Ptr, I decided to write my own programming language which takes advantage of all these powerful features.
On the downside Javascript suffers from a slow garbage collector that kicks in randomly which makes it impossible to write real-time engines and C++ just doesn't have any objective memory manager up to this day.
My initial attempt was to convert Javascript into C++ but then the principle of 'closures' and 'escape analysis' inlaid with Javascript just makes it impossible to get rid of the garbage collector. So if we sacrifice these principles away then we can integrate Root.Ptr and take advantage of the power of C++ and the true flexibility and run-time features of Javascript.
It has to be noted that BB++ is an extension of C++ and therefore everything we can do in C++ can also be done in BB++ and vice-versa.
You might get more attention if you had documentation on the language itself and how it extends C++ and what benefits that provides.
I will create documentation but I just wanted to finish up core features of the language first. But basically: - It uses powerful features of C++ such as multiple inheritance and virtual inheritance implicitly, which makes Root.Ptr unbreakable. - I cleaned up Root.Ptr to be scope-based and you can't unify entire sets anymore but you can just "upscale" branches of a scope with lower precedence. This means a scope "jails" everything, including cycles, but if you assign a pointer of this scope to a pointer of a higher scope then this branch of objects will "upscale" to the pointer having higher scope. More to come. - ...
Talk of sacrificing closures is a little worrisome; closures are an important feature of JS (and also of C++).
Well in Javascript closures lead to escape analysis which requires garbage collection so that's out of the question. And from my experience closures can be converted into more conventional forms. For example read only values can always be passed in as function arguments and write values can be returned as an array of values. Also in general asynchronous functions modify only global scope objects like 'document' and 'location' so that closures are not vital. Furthermore in C++ we can still write C++ lambdas all we want. Regards, -Phil
participants (2)
-
Gavin Lambert
-
Phil Bouchard