Op Cpp /

opC++ Features

opC++ Compiler

opC++ Language

opGames Company

FAQ

Frequently Asked Questions

Questions about the opC++ compiler and the opC++ Standard Dialect

What is the opC++ dialect language?

The opC++ dialect language essentially allows you to write your own portable flavor of C++. In effect you can customize the language for a specific project - the technical term domain specific language may describe this approach - although a better term might be project specific language. The opC++ dialect language extends C++ by translation, which means that your extended C++ code is compiled down to standard C++ through a code generation process.

Is opC++ a C++ replacement language?

No, opC++ merely gives you more features and more control over standard C++. opC++ code focuses on improvements to concrete classes while the recent trend in C++ has been to focus on generic (template) classes. opC++ code generates standard C++, which means it will remain compatible with C++ well into the future.

What platforms are supported?

Currently, the opC++ compiler is available on Windows and Linux, and there is a robust addin for Microsoft Visual Studio 2005. However, you can compile the generated code on any platform. As long as you have a decent standard C++ compiler for a particular platform, you can compile the opC++ generated code on it.

How can I redistribute my opC++ code?

You have two choices, you can redistribute the original opC++ code, and/or you can redistribute the generated standard C++ code. Of course, if you redistribute only the generated code, it will be difficult to read and edit, but will still compile, even without the opC++ compiler. Also, depending on your opC++ license there may be restrictions on how you can use the generated code.

How does the opC++ "category" concept compare with C++ templates?

Categories and templates are two different things and merely complement each other. A template class allows you to parameterize a class based on types and constants. Categories add language features to a concrete class through generated code. We do however encourage the use of templates in the code generated by categories since they can give you additional control through specializations.

How does opC++ compare with aspect oriented programming?

Aspect oriented programming involves weaving code throughout a program based on joint points and crosscutting concerns. In a sense this is what opC++ does as well, except that it takes a much more explicit approach. opC++ is also more focused on header and definition transformations, as well as meta-data, whereas AOP is more geared toward altering program flow. Generated code in opC++ is much easier to track down than AOP, since specifications are only in dialects, as well as the explicit nature of categories and modifiers.

Why do you use 'op' to prefix all your categories and keywords?

With 'opclass' for example, we do this to show that it's different than the normal C++ class category. While we could redefine the 'class' category and add features to it, we decided to allow the use of both - for when you want to define normal C++ classes. Similarly we preserve the 'static' keyword's meaning - while adding the improved 'opstatic' keyword.

What is reflection?

Reflection in a language means that you can get information about classes in your program at run-time. It gives you the ability to iterate over an object's data and methods, without needing to know the exact class you're dealing with.

Reflection is also often accompanied by descriptive metadata which give you additional information about data members. For example, whether or not a data member is saved to disk may be indicated by metadata. You can learn about opC++ reflection here.

What is serialization?

Serialization is the loading and saving of objects to files or memory. You can learn about opC++ serialization here.

Recent Changes (All) | Edit SideBar Page last modified on December 18, 2007, at 08:11 PM Edit Page | Page History
Copyright 2010 opGames Inc.