Reverse the power
The previous post was about what I hate, but it’s not very constructive to talk in negatives, and the obvious question would be "Well, what do you want to put instead then?".
I was pleased when I saw the override keyword in C#, because that illustrates the reversal of power. The user specifies that he intends to override a function, so the compiler can warn him of misspellings etc. Still the virtual keyword has to be present at the other side, so it’s not entirely rosy for my glasses.
Template/Generics is another place where power resides with the designer. The designer decides that you need to be able to utilize this code, for different types, but he decides entirely what can be changed.
Dawn allows the user to alter the lookup of names (read:types although dawn is prototyped). This allows the user to alter every type inside the black box of the API. Of course this is incredibly powerful and thus dangerous, but Dawn allows the change to be totally local, and the user should know that this is potentially dangerous. This is another point - I don’t mind languages have dirty/dangerous features, but you should be aware when you use them.
To sum up, reuse have failed insofar because power has been with the designer, not the user. Reversing this might lead to greater reuse.
I was pleased when I saw the override keyword in C#, because that illustrates the reversal of power. The user specifies that he intends to override a function, so the compiler can warn him of misspellings etc. Still the virtual keyword has to be present at the other side, so it’s not entirely rosy for my glasses.
Template/Generics is another place where power resides with the designer. The designer decides that you need to be able to utilize this code, for different types, but he decides entirely what can be changed.
Dawn allows the user to alter the lookup of names (read:types although dawn is prototyped). This allows the user to alter every type inside the black box of the API. Of course this is incredibly powerful and thus dangerous, but Dawn allows the change to be totally local, and the user should know that this is potentially dangerous. This is another point - I don’t mind languages have dirty/dangerous features, but you should be aware when you use them.
To sum up, reuse have failed insofar because power has been with the designer, not the user. Reversing this might lead to greater reuse.
Labels: dawn, programming

0 Comments:
Post a Comment
<< Home