[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML as a transition to s-expr
If we want to migrate people to a consistent syntax, why is the choice
only between s-expr and XML? Here is a better syntax than either:
table [:cellpadding "0" :cellspacing "0"] [
tr  [
td [:width "50%"] "Cell one"
td [:width "50%"] "Cell two"
It is shorter to type, easier to read, and easier to process than
the equivalent s-expr's or XML....
Note: This all works because each "function" is presumed to take a fixed
number of arguments.
But if different functions take different numbers of arguments, then
the only way the computer can know which arguments match up with which
functions is to evaluate the whole program. (Or at least, do enough
evaluation to find the number of arguments for every identifier that
looks like a function.)
Think of the implications if you want to write an Emacs mode that
auto-indents a program in that language, where the program being
indented may refer to functions being defined in an external module,
lexically scoped definitions of functions, functions that the author
has referred to while writing the code but hasn't actually implemented
"We can build a better product than Linux." --Jim Allchin, VP, Microsoft
== Seth Gordon == firstname.lastname@example.org == http://ropine.com/ == std. disclaimer ==