Bringing this over from heyotwell's message about Simpler Syntax...
I love the idea of Protoscript but to me, the syntax still isn't simple enough or consistent enough to use as a designer. For example:
Code:
$proto('img#avatar', {
Click: {
onClick: {
Fade: {
opacity: {to: 0},
onComplete: {Close : {} }
}
}
}
});
Why is "clicking" represented twice? I know one is the name of the event and one is the callback, but that's irrelevant and confusing--this duplication seems to be consistent through the docs. Much simpler would
be:
Code:
$proto('img#avatar', {
onClick: {
Fade: {
opacity: {to: 0},
onComplete: {Close : {} }
}
}
});
Also, why are some things Capitalized and some not? (why is "Close" capitalized above?) This is an additional detail that makes the syntax much harder to learn. Keep in mind that although there may be technical reasons for naming objects and events differently, this really doesn't matter at all to anyone who's not a programmer.
Consistency about when to use objects vs. numbers also bothers me: in this example, why does the "duration" property get a number after it, but the "opacity" property requires an object?:
Code:
$proto('img#avatar', {
Fade: {
opacity: {to: 0.0},
duration: 0.9
}
});
Yes, yes, I know there are reasons, but these kinds of things need to be simpler and more consistent, either make "opacity" take a single number (maybe as "startOpacity" and "endOpacity") or make all properties take objects.
I have high hopes for the GUI to avoid dealing with all this.