Hello list,

I'm opposed to syntax highlighting of symbols in PicoLisp.

As I understand it, syntax highlighting marks symbols which are
"keywords" in the language. However, PicoLisp doesn't have keywords.
There are just "symbols".

It has built-in symbols, yes, but that doesn't make them special in any
way. Lexically all symbols are equivalent, and their meaning depends on
the (dynamic) context, not on their (static) name.

A symbol might represent a function, or a piece of data. And functions
might be redefined or bound any time.

If the editor detects, say, "if", and highlights it as a flow-function,
it may be wrong because it can be a symbol in a list of terms and means
"interface". Or "car" may refer to a vehicle.

Syntax highlighting for symbols can't be done "right". Being correct in
99 percent of the cases - but wrong in 1 percent - is fatal. If
something cannot be done right, it shouldn't be done at all.

This is the reason why I use syntax highlighting only for comments in my
editor. Comments can indeed be detected lexically. I've also
experimented with strings (see *Tsm, transient symbol markup), but these
are also symbols, with possible meaning depending on the context. And
strings are clearly visible anyway.

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to