cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[SUGGESTION]

Open dobkeratops opened this issue 3 years ago • 0 comments

compare and contrast this was my personal project from 7 years ago. A language designed to transpile to & from a C++ subset https://github.com/dobkeratops/compiler

Here is a snippet of what the source code looked like - its using the rust extension to get syntax highlighting, but its not rust. [https://github.com/dobkeratops/compiler/blob/master/example.rs] (https://github.com/dobkeratops/compiler/blob/master/example.rs)

Perhaps consider everything here as a suggestion.

I was dithering with migrating to Rust - inspired by Jonathan Blows early progress on JAI - I set about writing this in the end I gave up on it because I realised I'd be unlikely to get a community. I like most of what Rust did but was frustrated with a few aspects of it being a bit TOO strict, I'm the target audience for JAI and Zig really.

I'm basically in the rust camp now but it strikes me this project would actually suit me better (as would have my pet language if I could have seen it through).

I was supporting a limited set of C++ class behaviour, UFCS, some rust-like pattern matching, easy "templates" and single expression functions fn foo(a,b,c)=... ;

my project emits an older version of LLVM source code instead of C++, as such it needs a specific older version of LLVM installed if you actually wanted to try it, but you can browse my example code to see the specific roadmap I had in mind. I never got the transpiling working but my plan was an explicit "superset of a subset" of C++ (I also remember SPECS) , which a significant subset that could be mutually transpiled for easy migration

I see the sense in the "JAI-like" declaration syntax but I was going for a more rust inpsired syntax. its not far off though.

I thought these ideas may be of interest to anyone else interested in the realm of "C++ successor languages", "C++ derivatives" "C++ code generators"

Anyway good luck with this cppfront/cpp2 project - I hope a real usable language emerges from it, it would have suited me. UFCS alone could have kept me from migrating to Rust..

dobkeratops avatar Nov 15 '22 08:11 dobkeratops