atom_symbols ::=
'H' | 'He' ... 'Na' |
'Be' ...;
This way it is easier to edit, automatically wrap (not meaning that the periodic table will change drastically soon, but this might have been a table of sth. else) and read the snippet. This is more of a matter of personal delight though.Of course if this is a table of something else then it might be okay to use a different formatting. But that I could easily give a counter-example, suggests that there are plenty of counter-examples.
You argue that a linear list, without spacing, has advantages. My assertion is that you don't have the experience to make that judgement. Anyone using this layout will have chemistry experience, and often decades of practice of looking at the periodic table in standard form. When I consider at your suggested layout, I find it a bit jarring.
For one, the symbols you wrote are out-of-order, which means it's hard to infer some information from the table.
For example, what is the age of the this instance of the table? A chemist knows, from experience with the standard periodic table layout, and my use of that layout, that Rg is the newest element on the list. This immediately places it as a pre-2009 table, which means I should update it.
Here's an example from Python heapq.py implementation, rewritten slightly to work in HN (I switched from triple-quoted strings to '#' comments):
# The strange invariant above is meant to be an efficient memory
# representation for a tournament. The numbers below are `k', not a[k]:
#
# 0
#
# 1 2
#
# 3 4 5 6
#
# 7 8 9 10 11 12 13 14
#
# 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#
#
# In the tree above, each cell `k' is topping `2*k+1' and `2*k+2'.
This is a tree structure layout in ASCII. It's useful information, and it can't easily be structured or represented in a proportional font.
The second is that your solution - fixed indentation levels, etc - doesn't work for this case. Or as a challenge, what's your better way of writing this yacc-style BNF in a proportional font?
Every example I can think of is uglier, and harder to understand. The only solution is that everyone switches to a source code encoding which includes enough presentation capabilities that it supports embedded tables. I don't see that happening any time soon.Do you have a better suggestion of how to lay this out in some alternative environment?