3 ms·
I just read an article today or yesterday about the reason that VIM's cursor keys are h,j,k,l or whatever. I think the reason that code is ASCII text is pretty
by ilaksh 15y ago
I just read an article today or yesterday about the reason that VIM's cursor keys are h,j,k,l or whatever.
I think the reason that code is ASCII text is pretty much the same reason VIM's cursor keys are h,j,k,l. All they had was a terminal so it had to be ASCII.
If you think about it, all information is structured and multidimensional. But people can only make one sound at a time, so information must be serialized to be communicated.
There are some easy starting points for understanding why we should get away from pure ASCII source code. One of them is to try first coding a complex UI with pure text and then build the same UI using a graphical editor with widgets.
Another one is this: just answer this question -- why can't I represent division in my source code using a numerator over a divisor the way that we are taught to write mathematics? Should we continue to pretend that we are required to edit our code on terminals from 1979?
- dgallagher 15y agoAs you suggest, this is definately a legacy issue of being tied to the teat of a 1980's terminal. People still like to edit in simple editors. I've viewed it as a Model-View-Controller problem, where everyone is attempting to merge the Model and View into one. Technically your editor should be worrying about the View. It can draw division however you configure it to. But when saving to a Model source file, that should be portable, without any (or very little) formatting embedded in it (e.g. MultiMarkdown). You should be able to customize your editor, much like swapping out a CSS file on a website, and skin it to your desires.
- stcredzero 15y agoWe talked about exactly this at a Camp Smalltalk almost a decade ago. If it had flown, at least one computer language (Smalltalk) could've allowed each programmer to have their own customized code formatting (View) while the code was actually stored as the Abstract Syntax Tree nodes.
- ilaksh 15y agoHave you seen the intentional domain workbench?