To DoTheSimplestThingThatCouldPossiblyWork, you should use the highest-level language that might possibly both work and satisfy your performance requirements. * This would seem to conflict with PrincipleOfLeastPower * ''Correct. PrincipleOfLeastPower is an optimization principle. It, by nature, conflicts with DoTheSimplestThingThatCouldPossiblyWork.'' Actually, you should use the next highest level language, if it's realistic to expect the schedule to allow for profiling the performance-critical sections and reimplementing them in a more efficient language. For example, I recently did a project with scripts implementing the first version of the processing and reporting functionality; after we proved that we correctly parsed and reported the data, we reimplemented in a compiled language, which went very quickly since all our algorithms and data structures were already proven. The phrase "Better Syntactic Sugar" was originally used in derision about programmers who liked PrettyPrint''''''ed, color-coded, hyper-linked, interactively-iconified code editing, by one who thought that this kind of "sugar" was just to cover up a lack of skill at the basics of reading and writing code. It's such a delightful phrase that I decided to use it as a page title, and explore just how sweet automated tools could make the XP development process. Thanks to BenKovitz for extensive refactoring to clean up the page. -- ChrisBaugh See also: ItsTimeToDumpCeeSyntax, TheLastOne. ---- '''Examples''' ---- XML can be used to make a data file which can be written and read by a variety of tools, that each only have to know the basic rules of XML and the rules for their own specific domain. An XML based development system could have a single XML file with the customer requirements obtained from CRC cards; the customer's prioritization of requirements; the development team's time estimates for completion, risk estimates for difficulty, and spike tests to reduce risk; the unit tests written to verify completion of development; the source code written to satisfy the unit tests; object code generated from the source; the results of test runs of the object code against the UnitTest; programmers' vacation schedules, and anything else relevant to the project. Rather than a single large file, in real life a relational database might be used; but a DTD for extreme programming would allow for "development project files" to include any or all of these contents. XP developers could have a suite of programs which can each import and export the data as XML, and handle one or more of these types of contents. Compilers and interpreters could read source and write object code; documentation programs could scan for matches between CRC cards, names of source blocks, and results of test runs; project management programs could scan for CRC cards not satisfied by successful object code, customer priorities, and developers' schedules. Source editors could handle the source in a variety of syntactic formats based on the needs and preferences of developers. Here are some examples of the source code portions of "syntactic sugar", but my wish list goes far beyond just "PrettyPrint''''''ing" the code. ---- ChuckMoore has pointed out, with his ColorForth system, that the use of words and punctuation marks to distinguish names, literals, parameters, or the like in code are no longer necessary. Code can be stored in an XML format, representing program elements and their attributes, and displayed in whatever way programmers like best - with curly braces on the same line, curly braces on another line, the words "begin" and "end", or in his case, with changes of color indicating the function of code elements. Other developers have pointed out that XML elements could be used to represent conditional statements and loops, converting on the fly to BASIC, C, or COBOL like display of the structure. Microsoft's VisualStudio automatically looks up available properties and methods for objects whose type has been declared, eliminating the justification for terse and cryptic abbreviations whose sole virtues were that they were quick to type and quick to transmit over a few-hundred-baud Teletype connection. Around 1990, the AmigaVision development environment let the developer add icons to a flowchart. Icons represented such ideas as a conditional test, a request for user input, or a media playback. Oracle has tools that take a model of the relational data structures required and generate all the relevant SQL code. ''Unfortunately, that won't work. All languages don't share the same semantics, and things that one language does with ease, others can't do at all. That's why we have different languages to begin with, because they express different ways of programming. You can't represent Lisp macro's in VB, and XML can't get around that. If it were that easy, we wouldn't have languages to begin with.'' ---- ColorForth type of editing could be used to decorate names with CSS attributes at display time in order to illustrate the properties of what the names represent. For example, when the mouse hovers over DictionaryBase, the mouse cursor will be swapped for an icon of an arrow pointing at a 2x2 grid. In the top left cell is an icon of an arrow to a series of ellipses with a trailing slash, followed by (0..3, 0..5). This shows that DictionaryBase is a pointer to a two-dimensional array of pointers to null terminated strings. Of course the editor would be configurable (by swapping in a new XSL stylesheet) to have a variety of display possibilities for this type of display, including prepending Hungarian abbreviations to the variable name. ---- Here's a more specific example in the code-editing section: A variable is a pointer to a two-dimensional array of pointers to null-terminated strings. Using the hypothetical DTD for representing C code, the XML may look something like this: An XSL stylesheet with transformations can be used to display this code in Hungarian Notation for programmers who prefer it, showing the code as: prgrgpszDictionaryBase I would prefer to swap in an XSLT sheet which would highlight Dictionarybase, like all variable names, in a color of my choice; and, whenever I moved the mouse pointer over the name, popped up an icon showing an arrow pointing to a two dimensional box, with the top left box containing an arrow to a series of ellipses closed by a 0, and the information (0..3, 0..5). ---- Here is another example: this.pay This could be automatically represented in VB as: for each Salary in Salaries Salary.pay next And in C++ as: for (int i=0; i