1 |
On Sunday 04 May 2003 12:49 pm, Björn Lindström wrote: |
2 |
> SGML (and thus HTML) was never originally intended to be human |
3 |
> readable/hackable. The same goes for XML. It is designed to be |
4 |
> easily _parsed_, not easily _read_. |
5 |
|
6 |
I think you've made an excellent point here, one people should not quickly |
7 |
overlook. Though I'll take a slightly different perspective. |
8 |
|
9 |
XML isn't intrinsically harder to read than any other general-purpose |
10 |
expressive system. When humans say that it is, what they're really doing is |
11 |
complaining that they cannot use domain-specific sub-syntaxes. (Or rather, |
12 |
that they are discouraged from doing so.) |
13 |
|
14 |
Example. Mathematical notation isn't /necessary/, people could just write "a |
15 |
quantity named y equals the indefinite integral of f, a function of a |
16 |
quantity named x, times the derivative of the quantity x". But they never do, |
17 |
instead preferring to write "y=", a certain squiggle, and "f(x)dx". |
18 |
|
19 |
Does anyone actually think a human is ever going to (voluntarily) write an |
20 |
equation of even moderate complexity in MathML? |
21 |
|
22 |
My point is this: |
23 |
|
24 |
Starting and stopping most services is a task that can be broken down into |
25 |
execing or fork-execing another program with a particular environment, |
26 |
particular command line arguments, and particular input and output |
27 |
redirections. Shell is a domain-specific language particularly suited to |
28 |
expressing these operations. |
29 |
|
30 |
I won't say that XML has no place, or that script snippets shouldn't be |
31 |
embedded within an XML document, or that the script a human writes shouldn't |
32 |
be immediately translated into its XML equivalent. I am saying, however, that |
33 |
humans will insist on writing in the shell domain-specific language where it |
34 |
is more convenient for them to do so, and that forcing them to do otherwise |
35 |
in the name of anything is a long-term design mistake. |
36 |
|
37 |
Which I suppose is a quite strong statement to make after all. |
38 |
|
39 |
Evan |
40 |
|
41 |
-- |
42 |
gentoo-dev@g.o mailing list |