| The Avatar ( @ 2005-03-25 03:01:00 |
and now for the hard part...
I finally got sick enough of C++ that I've designed my own programming language and am working on porting menes over (which, most of the time, is causing me to realize I forgot to add something important to my grammar). My new language is called ++C. I got the idea for it after reading a paper called "A Modest Proposal: C++ Resyntaxed", where the two authors came up with a new, simpler, syntax for the same underlying programming semantic as C++. The new language could be parsed with an LALR(1) parser and was generally much cleaner. My language is LL(2) and takes much from them but took full liberty to change anything I disagreed with. Also, reading their paper I noticed they broke the language in a few places... they over-simplified templates until they had a different semantic. (But at the time C++ wasn't standardized and noone really understood templates well, so no one would have noticed; not that many would now, either.)
The first even remotely complex file (and really it's not complicated at all) I ported over was block.xxh. Apparently, .xxc/.xxh wasn't ever used as a file extension before and no language registry lists a ++C, thereby making my language name choice both funny (based on the old joke about wanting C to be better _before_ you use it, which a postfix ++ operator such as C++ will fail to accomplish) and as yet unused: probably because it's impossible to search for on any search engine, a detriment I don't care about as I don't expect anyone to ever want to use it for anything.
I'm still missing new/delete syntax, I'm going to remove all the little () blocks after typedef/function/etc. and add an attribute system like C#, and I haven't thought much about how I'm going to syntax the overloaded operator definitions, but already I have something that I can start porting with. Even without doing the type analysis, this is going to let me add things like: break/continue labels, implicit This_ typedef for all types, dynamic instantiation of objects by name without needing special macros all over the place to register things, automatically generated serialization stubs, and _maybe_ enough pointer/value type diffentiation to get type-accurate garbage collection (for the few places where I want such a thing).
I finally got sick enough of C++ that I've designed my own programming language and am working on porting menes over (which, most of the time, is causing me to realize I forgot to add something important to my grammar). My new language is called ++C. I got the idea for it after reading a paper called "A Modest Proposal: C++ Resyntaxed", where the two authors came up with a new, simpler, syntax for the same underlying programming semantic as C++. The new language could be parsed with an LALR(1) parser and was generally much cleaner. My language is LL(2) and takes much from them but took full liberty to change anything I disagreed with. Also, reading their paper I noticed they broke the language in a few places... they over-simplified templates until they had a different semantic. (But at the time C++ wasn't standardized and noone really understood templates well, so no one would have noticed; not that many would now, either.)
The first even remotely complex file (and really it's not complicated at all) I ported over was block.xxh. Apparently, .xxc/.xxh wasn't ever used as a file extension before and no language registry lists a ++C, thereby making my language name choice both funny (based on the old joke about wanting C to be better _before_ you use it, which a postfix ++ operator such as C++ will fail to accomplish) and as yet unused: probably because it's impossible to search for on any search engine, a detriment I don't care about as I don't expect anyone to ever want to use it for anything.
I'm still missing new/delete syntax, I'm going to remove all the little () blocks after typedef/function/etc. and add an attribute system like C#, and I haven't thought much about how I'm going to syntax the overloaded operator definitions, but already I have something that I can start porting with. Even without doing the type analysis, this is going to let me add things like: break/continue labels, implicit This_ typedef for all types, dynamic instantiation of objects by name without needing special macros all over the place to register things, automatically generated serialization stubs, and _maybe_ enough pointer/value type diffentiation to get type-accurate garbage collection (for the few places where I want such a thing).