scruffles.net subscribe
Friday, February 28, 2003

I thought I would clarify a couple things about my last entry. I apparently got so excited about the ramifications of an expandable syntax, that I didn't take the time to clearly define the programmer's view of this language.

All programming in an XML-based language would need to happen from within a IDE. That IDE would parse the XML and translate it to a more human readable format. Text like this:








Would be seen by the programmer as this:

public class MyClass {
public String toString() {
return "Hello World";
}
}

For that matter, the same IDE might have multiple syntaxes for the same XML:

DEFINE CLASS: MyClass {
FUNCTION: toString()
END FUNCTION "Hello World"
}

Of course, the syntax would need to be within the same general family. You couldn't render a C based language as LISP or anything. Hell, I don't even know why you would want multiple syntaxes for the same language. My point is, the programmer wouldn't be reading XML.

I was also going to talk about an idea that involved wrapping a current language with an XML based language, but I realized that would only provide the component embedding features of an XML based language. You couldn't have an XML based meta-language if you were pre-compiling the XML into another language. Oh, well.

Labels:

Thursday, February 27, 2003

I read an interesting article in Dr. Dobbs today about embedding code in XML (XML-Based Programming Systems by Gregory V. Wilson, March 2003). The article predicts that one day soon we will be writing in languages based entirely on XML. This of course would have some drawbacks:

  • The code would be completely unreadable by human beings
  • We would be completely dependent on our IDE (take that, vi geeks!)

On the upside:

  • Code and comments could be intermixed in the code and still be accessible programmatically (javadoc++)
  • Code could be reverse engineered using all the features of XML (imagine Reflection with XPath support)
  • And best of all (imho), third party plugins could add tags into your code without getting in your way.

Lets reflect on that last point a bit. Think about all those third party apps that leave droppings in your code: Together's UML javadoc tags; the generated code from JBuilder's GUI Designer (oh! the humanity!); xDoclet's code generation tags; the javadoc comments from that damned web guy!!!; the obscure javadoc tags that the company standards force you to add; and the list just goes on. By extending an XML based syntax, all of that information could be in the code, and your IDE would simply hide the features you don't need to see.

Just like IDEA will allow javadoc to collapse or expand, IDEs of the future could have an expandable dialog with a tree of dependencies; or a SVG drawing of data interaction in a given method.

I have to admit, I got most of the way through the article before I could even except the idea of not saving my source code as plain old text. But being such a big fan of open source, I have to admit, this would be a feature that would really interest me. If the language and it's markup could be extended by any number of third party tools, there would be no end to the inventive combinations of features.

When the open source community gets a hold of a flexible set of interchangeable components, they have a tendency to go to town. Just imagine what we could make with this.

Labels:

Welcome to my blog. I'm not sure where this is going to go, so for now I'll just share my intentions. I'm a Java developer from St. Louis. I really like the work, but I haven't found myself challenged in quite a while (doubtful I ever will in the St. Louis area). For this reason, I spend a lot of my time working on my own. I have a lot of half-baked ideas and projects that never made if off the ground. Since my only motivation for working on these projects is to learn, I usually stop as soon as I feel comfortable that I know how to finish the project. Other times my idea die because I don't have a lot of people to discuss them with.

With luck, that's where this blog will come in. If it's successful, I'll get some feedback... maybe someone will have the need and desire to finish where I leave off. At the very worst, I'm just talking to myself and I've lost nothing.

Now, with all the introductions out of the way... I have nothing to say!

Bryan