18.07.2011, 15:28
So I'm currently developing my object extended pawn precompiler (right now I'm fighting with making it work so that pawno runs it, and it runs pawncc - with pawno given params) the thing is, it's syntax will be based on C++ style which is very common for me. My question is - what advanced features of C++ should I try to implant, and are there some that I should exclude?
Right now, I'm considering implanting :
If you need to know how the code will look more or less, here's a normal header file of C++ (It's from precompiler):
Edit : What about namespaces?
Right now, I'm considering implanting :
- only public access level
- only non-const functions
- ability to define either in class definition or outer one (as well as the fact, that it will check if a method is not defined, while a defined method may be as well not implanted (as long as it's not called!)
- I'm considering making the static keyword for classes
- later or sooner, inheritance WILL be there!
- Incorporating should be possible (probably not at first)
- Destructors will be called (not at first)
- my "pawn" version of inline functions (Link:What are inline functions?)
- Note : Initialization lists won't optimize anything, and thus will not exist
- stock keyword as default
- Very low possibility : Finding operators, and somehow manipulating them to allow complete unlimited overloading (C'mon, who's that advanced at sa-mp to need it - if there's anyone, code will be open source anyway)
- Basic method and variable calls
- Chained method/variable calls
- Possibly the pre-compiler will have full data of a class, so it would be possible to generate descriptions
If you need to know how the code will look more or less, here's a normal header file of C++ (It's from precompiler):
Код:
#ifndef PARSER_H #define PARSER_H typedef FILE* File; namespace Parse { enum Mode { Full=1, Block=2, Optimized=3, Seek=4, }; }; class Parser { public: Parser(Parse::Mode mod=Parse::Block); ~Parser() {} private: int cd; }; #endif