Re: obvious extension of o-xml to all forms of programming, and need for import facility from existing code
<[email protected]> Tue, 18 Mar 2003 01:42:58 +0000 (GMT)
| Newsgroups | gmane.text.xml.o-xml |
|---|---|
| Message-ID | <[email protected]> |
hey Jeff, welcome to the list, good to have you on board! > One of the great things I think you can do with code in XML format is enforce > rules such that a functional spec for a function (for extreme programming > this would be called 'the story') is written first, followed by unit test the spec would have to map very closely to the code though (or vice versa, more likely). but there are definite advantages. have you seen any work done in the area of functional spec authoring using XML? with integrated unit tests, reference test results for regression testing and test data in XML... it could be awesome! all contained in the same format, even file, with editor options that lets you work on one or two aspects of the code at a time.. schema driven..! i've been playing with ideas of program-by-contract in o:XML, things like pre/post conditions and assertions are quite easy to integrate naturally in the language. eg <o:function name="foo"> <o:param name="bar" assert="$bar > 5"> <o:precondition assert="$this.alive()"/> ... </o:function> the conditions extend the language without changing existing syntax or semantics - they're dead easy to include in generated documentation too. another that would integrate nicely is aspect programming. but basically it's quite easy to extend the language with any sort of construct, as long as it is compatible with the general processing model of a dynamically typed, object-oriented language. which implies a complication when implementing this: > C --> import utility --> o-xml --->xslt etc -> Java src /x86 code etc the complication being the different programming paradigms used in say o:XML compared to C. Or even C++, or Java. Types in o:XML are determined at runtime, which has implications for resolving overloaded functions and invoking type functions, so there would have to be a whole library of supporting native (target) code to turn o:XML into any form of statically typed language. o:Path expression evaluation and variable scoping are other things that come to mind as requiring quite a lot of work. not saying that it can't be done though - it can and i think it must be done! of course, the ultimate goal is to write an o:XML compiler - in o:XML. cheers, /m Martin Klang http://www.o-xml.org - the object-oriented XML programming language