|
Re: Version Control is Undo . . . or more
|
Posted: Dec 18, 2008 6:43 AM
|
|
> I never argued for anything different.
Ok, I just replied to your question 'what is the point etc'.
> But the meaning is ambiguous. It's really a first and > last name of a person. It's not fundamentally different > than your C++ ambiguity example.
Parsing != meaning. A parser recognizes structures, it's not about meaning.
The problem that exists in the world of computers is that different applications can't parse the same documents, unless they share the parser code.
The common data format would solve the parsing problem.
> XML doesn't make my life easier. It's a problem I deal > with.
You failed to show why though.
> > What is your definition of a structured format. Java code > is a structured format, in my view. Do you agree?
It is, but it is not universal. It's for Java.
> Hah! Only XML related tools can be improved, right?
No, all tools can be improved. But there is an obstacle...it's called 'non-context free grammars'.
For example, c++ has a non-context free grammar, and therefore, in order to parse it, one needs a full blown compiler.
Java does not have this problem.
But, if there was a common structure format, the parsing problem would be solved (with one tool, instead of many).
> I didn't say anything about you. I said the creator > regrets using XML instead of writing a parser: > > "James Duncan Davidson, the original creator of Ant, who > later came to admit that > > 1. He originally chose to use XML as the format for Ant > Ant scripts because he didn't want to write a parser, and > 2. He really regrets it and apologizes to the Java > ava community at large for it." > > http://blogs.tedneward.com/2005/08/22/When+Do+You+Use+XML+A > gain.aspx
The arguments presented in the blog are all ...stupid. Let's examine them:
1) "XML is a hideously verbose format"
a) So? it's not that Ant scripts would be thousands of pages long.
b) it can be compressed very well.
2) "in using XML is that it is a strictly-hierarchical format, and not everything follows a strictly hierarchical format"
a) It's a well known problem of XML. But that does not diminish XML's usability.
b) it can be solved by using references to other nodes via attributes. I've done it in 20 lines of C++ code, I don't see how Ant developers missed that. What I've done is to assign an 'id' to each node I wanted to link to, then reuse the id. As I read the DOM model, I had a map of ids to objects, and whenever I found a reference to an id, I used the map to get the object.
3) "and the "self-descriptive" tags that everybody blathers on about are only self-descriptive to carbon-based life forms (and then only if semantically-rich terms are used for the tag names). For example, does this "self-descriptive" XML have any meaning to you? "
a) I call bullshit. Instead of naming your tags 'p', 'ph' and 'a', use descriptive names.
b) It's the same as if I had Java methods with name 'p', 'ph' and 'a'.
> I use XML all the time. It's unavoidable. That doesn't > mean it's a good choice for a programming language. I > want something that can be read and modified without using > tools and XML doesn't fit those requirements.
Bogus argument my dear Watson. You still use tools to manipulate your text files: text editors.
You also failed to show why XML tools are worse than text-editing tools. They are both tools.
|
|