What really annoys me in text programming is that I have to write constructs again and again, referring to manual for method names constantly. Completions may be smart typewise, but IDEs never assume
what I am writing. Let's take a function:
static string defaultFamily = "Sans";
bool
foo(string s, Alignment a, int height)
{
Par_
Okay, it began. What can be done with all the available values? Seems that I'm going to create a paragraph and fill it with some arguments. One of autocompletion suggestions:
bool
foo(string s, Alignment a, int height)
{
Font f(defaultFamily, height);
if (!f.isValid()) return false;
Paragraph p;
p.setAlignment(a);
p.setText(s);
p.setFont(f);
_
return true;
}
How is it obvious? Because Paragraph told the completion system that it needs at least font and text values set. Height goes to font, other arguments go to paragraph. Names are selected from the style around. Since we return a boolean and few objects can be invalid after initialization, it assumes that it is a status. p is local, so there is something to be done with it, and another block is created.
Even better, you could just throw items together and get the result:
// this->points is double[20];
{
frame inset 0.5 red stroke;
add points black stroke;
---
{
Rect r = this.frame();
r.inset(0.5, 0.5);
Painter p;
p.setColor(Color::red());
p.addPath(rect);
p.stroke();
p.clearPath();
for (point in points) {
p.addPoint(point);
}
p.setColor(Color::black());
p.stroke();
But the completion style that we have everywhere just sucks:
int
foo(string s, Alignment a, int height)
{
ParadoxDatabaseProvider_
ParadoxDatabase...
...
Paragraph
ParamsManager
I can't point to good visual programming tool, but our "powerful" text IDEs are simply prehistorik typewriters.