Hacker News new | ask | show | jobs
by thaumasiotes 1301 days ago
> Consider h::i::j::k versus h.i.j.k

> Two :’s is an extremely loud combination of visual elements compared to the subtle point. :: drags the eye away from the content and says “look at me oscillate”

> In addition, humans group similar visual elements together so a combination of anything::doesnt::matter::what::between::clumps it is impossible to escape the common pattern and the eye jumps between the ::’s. Therefore it takes double the cognitive load to read.

It is true that the colons take up more space and your example looks good on HN.

But this problem will be immediately solved by syntax coloring. It's just never going to come up.

1 comments

Syntax coloring would make it worse because coloring the :: independently of the surrounding tokens will make them stand out even more as a group.

Rust is safe but it’s at least as ugly as C++.

It depends on how the coloring is done. If the background is white, the words are black and the :: are gray, the :: won't stand out.
True, but why bother with the symbols in the first place? User experience is just as important for developers reading/writing text and languages are typically created behind closed doors with a small engineering team only.

Guido got a lot right with Python because it’s clean and easy to jump in. Minimal cognitive load. But still very powerful.