This post contains comments to John Scholes’ post on name colouring; please continue to post any further comments with the original post.
This is a very interesting topic – as the discussion has already showed, there are many different needs. It seems to me that some of the suggestions that have been made are forms of highlighting that you would want to turn on briefly in order to search for something specific or highlight structures while editing code. For example:
- to verify the structure (highlight the matching parenthesis or bracket, or rainbow colouring of parentheses/brackets)
- highlight all uses of a particular name or small group of names.
I don’t think I would really want any of these enabled for any length of time; some of them can probably work very well if they are turned on and off as the cursor moves through the text (when on a parenthesis, highlight the other half of the pair, when on a name, highlight all uses of that name, etc).
Making it easier to read statements through highlighting of “kinds” feels more like something that I might well want to have enabled all the time. However, I find colouring to be quite distracting – it breaks the flow for me. I would certainly want the colours to be as calm as possible for the most common kinds, getting more exciting for the “exotic ones”. So I would suggest:
Array Function MonOp DyOp
For example:
r←(foo dop 1 2 3) mat hoo mop vec
I find that syntax colouring is much more effective in a bold font:
r←(foo dop 1 2 3) mat hoo mop vec
But…looking at the above, I personally find the colours to be quite distracting; they make it hard for me to read the expression as a “sentence”. How about if we experiment with emphasis instead, for example we could make functions italic, monadic operators bold, and dyadic operators both.
r←(foo dop 1 2 3) mat hoo mop vec
This is very subjective of course, but this is much more readable to me than the coloured version.
Further comments with the original post please.