Tokenised programming - March 19, 2011

After talking a lot about coding convention with a college of mine the thought about complete tokenised programming came to me. Why is it that when our IDE's and text editors are so intelligent and so well knowing about the structure of the code and what it should look like, that the editors can not simply show the code in the preferred coding convention of the reader/writer, and when it is time to save the code, it is converted into the coding convention of the company or project that the code belongs to.

Pushing this idea one step further it would become that you would "configure" tokens in your editor and the code would "automagicly" appear as it normally would when programming. I am not sure this is a good idea, but think it is an area that is worth investigating. Chances are this could prevent some general programming errors since the configuration of each token is only possible when everything is defined.

If the first part, making code convention irrelevant for the individual programmer, could become a reality. Then religious views about where to put white spaces should be a thing of the past. But of course it does require two separate configuration, one for view and one for saving. What parameters should be possible to set could be a rather big task, but looking at how it is done in Eclipse it should be possible to make some "generic" configuration.

archive projects recipes