I am considering the possibility of designing an application that would allow people to develop C++ code graphically. I was amazed when i discovered scratch (see site and tutorial videos).
I believe much of C++ can be represented graphically, with the exceptions of preprocessor instructions and possibly function pointers.
What C++ features do you think could be (or not be) represented by graphical items ? What would be the pros and cons of such an application ? How much simpler would it be than "plain" c++ ?
RECAP and MORE :
Pros :
- intuitive
- simple for small applications
- help avoid typos
Cons :
- may become unreadable for large (medium?) - sized applications
- manual coding is faster for experienced programmers
- C++ is too complicated a language for such an approach
Considering that we -at my work- already have quite a bit of existing C++ code, i am not looking for a completely new way of programming. I am considering an alternate way of programming that is fully compatible with legacy code. Some kind of "viral language" that people would use for new code and, hopefully, would eventually use to replace existing code as well (where it could be useful).
How do you feel towards this viral approach ?
When it comes to manual vs graphical programming, i tend to agree with your answers. This is why, ideally, i'll find a way to let the user always choose between typing and graphical programming. A line-by-line parser (+partial interpreter) might be able to convert typed code into graphical design. It is possible. Let's all cross fingers.
Are there caveats to providing both typing and graphical programming capabilities that i should think about and analyze carefully ?
I have already worked on template classes (and more generally type-level C++) and their graphical representation. See there for an example of graphical representation of template classes. Boxes represent classes or class templates. First top node is the class itself, the next ones (if any) are typedef instructions inside the class. Bottom nodes are template arguments. Edges, of course, connect classes to template arguments for instantiations. I already have a prototype for working on such type-level diagrams.
If you feel this way of representing template classes is plain wrong, don't hesitate to say so and why !