Slashdot Mirror


Are Extensible Programming Languages Coming?

gManZboy writes "Programming writer and instructor Greg Wilson is proposing that the next generation of programming languages will use XML to store not only such things as formatting (so you can see indentation your way, and I can see it my way, via XSLT) but even programmatic entities -- like: <invoke-expr method="myMethod"><evaluate>record</evaluate></invoke-expr>. Wacky, but perhaps wacky enough to be possible?"

838 comments

  1. Umm... by Anonymous Coward · · Score: 0

    No.

    1. Re:Umm... by WD_40 · · Score: 2, Insightful

      Seriously. Isn't software bloated enough? Why obfuscate things further. Dumbest... idea... ever.

      --

      "With sufficient thrust, pigs fly just fine." -- RFC 1925

    2. Re:Umm... by canuck57 · · Score: 2, Insightful

      Seriously. Isn't software bloated enough? Why obfuscate things further. Dumbest... idea... ever.

      Couldn't agree more. Leave it to some MS XML pin head to think you need a new language to be extensible.

      The fool should study polymorphism, and a object orientated language like Java or C++. But I suspect that is all is to much for the child's brain.

      Going to be flame bait for this:

      ALL XML IS IS FREE STYLE HTML/SGML and your smoke'in crack if you do not realize it.

      And when I type code I hate typing

      <><><></></></>
      all the freaking time to make my job productive. Or at least I don't think it makes me virile.
    3. Re:Umm... by xcham · · Score: 1

      Refer to page 4. Programmers would not see/edit XML tags. RTFA.

      The fool should study polymorphism, and a object orientated language like Java or C++. But I suspect that is all is to much for the child's brain.

      Maybe you should read up on the author. He's probably written more code in his day than you could shake a stick at.

      --
      When life gives you lemons, you CLONE those lemons, and make SUPER-LEMONS. -- Dr. Cinnamon Scudworth, Ph.D
    4. Re:Umm... by canuck57 · · Score: 1

      Refer to page 4. Programmers would not see/edit XML tags. RTFA

      It is possible to hire senior web developers that doesn't know how to read html, xml or jscript but is that the type of person you want when it is time to troubleshoot problems?,

      Maybe you should read up on the author [third-bit.com]. He's probably written more code in his day than you could shake a stick at.

      Somehow I really doubt that part about code.

  2. Extensible? by jawtheshark · · Score: 5, Insightful
    My programming languages were always extensible. Be it over procedures or functions, objects and inheritance, fuck even the good old programmable interrupts did the job! Programming languages don't limit, they enable you to do what you want.

    Look, I can understand XML to convey data.... but honestly, you don't need to use XML for everything under the sun. Proven old good methods work just fine, thank you very much.

    --
    Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    1. Re:Extensible? by eln · · Score: 5, Insightful

      XML now is what OOP was 15 years ago: Useful for some things, but shoehorned into every possible application, whether it actually made any sense or not, and whether or not it made things easier or more difficult.

    2. Re:Extensible? by Anonymous Coward · · Score: 4, Insightful

      15 years ago? That's where OOP is now.

    3. Re:Extensible? by aklix · · Score: 0

      And OOP is still slow. I use C due to the fact that I can get 100 extra FPS out of it compared to C++ (OpenGL, ATI Radeon 9800 Pro 256 MB, 490 to 587 on a 9 spinning cube shaded render)

    4. Re:Extensible? by Anonymous Coward · · Score: 0

      It's not about extending what you can do with it, it's about extending the syntax of the language. So that's not even about *how* you do things but how you can write them down.

      I think noone is proposing you start writing down XML. But you could translate from whatever format you use (text based,visual, or a mix) to XML. Then image you write a compiler for this XML format. You could easily extend this compiler to support new techniques, without breaking the syntax of your language. Think about storing meta data in it, etc.

    5. Re:Extensible? by Anonymous Coward · · Score: 0

      OOP is still this.

    6. Re:Extensible? by Umbral+Blot · · Score: 4, Insightful

      I for one welcome new tools. Well that is if they are tools and not straight jackets. For example a new language construct (for eaxmple generic classes in Java 5) is an example of a good tool. You can use if if you need it, but you can also ignore it. Perhaps XML syntax might be useful in some areas (although I can't see how ...), but forcing the entire language to be in it seems too much like a straight jacket to me.

    7. Re:Extensible? by Anonymous Coward · · Score: 0

      If there is that big of a difference in performance, then there is probably something wrong with your C++ code. Also, you don't have to use OOP with C++.

    8. Re:Extensible? by cnettel · · Score: 1

      The scary part is that a do-it-all-pseudo-OOP language has taken a great share of the market compared to 15 years ago (Java)...

    9. Re:Extensible? by Anonymous Coward · · Score: 0

      This looks quite similar to ColdFusion.

    10. Re:Extensible? by Cthefuture · · Score: 4, Insightful

      I could not agree more.

      At it's core XML is nothing. It's so generic, so basic, so flexible, whatever you want to call it, that it's completely pointless. Yes, you read that right, the structure is so flexible that it's not really structure any more.

      XML is just dumb in general. It's like saying: I've got this new, exciting, powerful data container called "The English language."

      Yeah, OK, whatever.

      --
      The ratio of people to cake is too big
    11. Re:Extensible? by gnuLNX · · Score: 0

      I call bullshit...either that or you have no clue about how to write optimized C++ code. I gaurantee that I can match you fps to fps with you using C and me using C++.

      All or your execution time is spend rendering the cube which you are almost certainly linking to an outside library such as openGL. In the event that you are writing all your 3D routines I will still match you fps to fps by simplying writing object-less linear algebra routine...which most people do any way.

      --
      what?
    12. Re:Extensible? by h4lphl33tor · · Score: 1

      It's about time we get extensible languages as we have had extensible processors for a couple of years already e.g. Altera's NIOS : http://www.altera.com/niosii

    13. Re:Extensible? by moebius_4d · · Score: 1

      This is just like writing Lisp. You have an s-expression like (+ 2 3) or (make-hash-table blah blah) that use functions from the language proper, and you have s-exprs like (render-cube blah blah) that are calling your own functions.

      The funny thing is that McCarthy originally was going to use s-exprs just like the above, as an internal representation, with the actual programming done in another form. But guess what? s-exprs are really convenient and easy to use, and easy to parse and to generate from other code because they have a regular form - no operator precedence issues, column indenting issues like fortran or python, distinctions between builtin function and user function like almost every other language.

      So this idea is redundant and obsolete at the same time.

    14. Re:Extensible? by Paradise+Pete · · Score: 1
      I've got this new, exciting, powerful data container called "The English language."

      Well then do me a favor. Before you get out of beta, see if you can fix up some of that goofy spelling. I mean really, what were you thinking?

    15. Re:Extensible? by saden1 · · Score: 1

      I doubt the grandparent has ever written any meaningful code. Any idiot knows that the cost of the language itself is minute, especially for non-interpreted languages. What gets you is the compiler. 20 FPS I can understand, but a 100? That's just total bullshit.

      --

      -----
      One is born into aristocracy, but mediocrity can only be achieved through hard work.
    16. Re:Extensible? by x_codingmonkey_x · · Score: 1

      For example a new language construct (for eaxmple generic classes in Java 5) is an example of a good tool.

      This is in fact not a new construct in anyway, Sun just copied C++'s template classes which have been around for longer than I have been alive :P.

    17. Re:Extensible? by Anonymous Coward · · Score: 1, Insightful

      At it's core XML is nothing. It's so generic, so basic, so flexible, whatever you want to call it, that it's completely pointless. Yes, you read that right, the structure is so flexible that it's not really structure any more.

      How did this get to insightful? You don't know what you are talking about. Oh, I forgot, Slashdot has some odd anti-XML bias.

      XML doesn't deal with structure beyond organising elements into a hierarchy. That's it. Nobody (with a clue) has ever suggested otherwise.

      The benefits XML brings are a standard, regular syntax that can be parsed without too much overhead, and the related technologies, like XPath, that make it dead easy to manipulate documents.

      No, it's not magical technology that fixes everything wrong with a project. Only clueless PHBs say things like that. So attacking it for simply being was it was planned to be all along is pretty damn dumb.

    18. Re:Extensible? by einhverfr · · Score: 1

      Of course, you have concepts like XUL and XAML. But in this article, you see the difference between XUL (well designed) and XAML (almost exactly what this article is talking about).

      Mozilla uses XUL for layout of controls in Gecko applications. XUL is sort of like a hyper-XML. But you don't really write any interactivity into the program with XUL. Instead you use Javascript (and some CSS may be useful here as well).

      At the same time, XAML has application logic *stored in the XML file...* How are you supposed to productively do this?

      --

      LedgerSMB: Open source Accounting/ERP
    19. Re:Extensible? by Anonymous Coward · · Score: 0

      C++ has the asm keyword, c doesn't.

    20. Re:Extensible? by conradp · · Score: 4, Insightful

      XML has definite value, but that value has just as definitely been overhyped.

      I bet all of us have written code to save and restore configuration files or data files of some sort or another. You start with a flat file, if you're really dumb you store values implicitly by position, if you're a bit more clever perhaps you opt for using keyword/value pairs. Later you decide you want to allow newlines in the values and need to write special code for that, so you use double-quotes. Then you decide you need double-quotes in your values, and you invent an escaping mechanism. After some more development you realize that some subset of your keyword/value pairs has to be multiply-instanced, so you need some mechanism to have "objects" each with their own keyword/value pairs. And so on... Eventually someone on another project needs to read your file, and you have to explain all these idiosyncrocies to them so they can write some parsing code...

      XML simplifies all that by defining a common syntax in which you can encode your information. It's easy to gradually expand your format by adding XML fields, and if you show the file to anyone else they instantly get a pretty good idea of what the information means; plus they have access to a bunch of libraries to parse it (SAX and DOM) and there are predefined ways to escape newlines, quotes, braces, and so forth.

      Of course, XML is only a syntax. There are a billion other syntaxes that could probably accomplish the same things, but somehow XML became the standard; that in and of itself has value because everyone uses it and knows how to read and write it. But programs can't interoperate and read and write the same files until they agree on symantics, i.e. what tags will be where and what each field really means. I've encountered this several times, some customer says "write the data in XML format" and I have a hard time explaining to them that, yes, we can write it in XML, but that's not sufficient information to define the file format, that's really just the beginning.

      --
      "To be absolutely certain about something, one must know everything or nothing about it." -- Olin Miller
    21. Re:Extensible? by scisco · · Score: 1

      As usual, you can search and replace "XML" (in the original post) with "umm, what was I talking about." What the author is really asking for, without realizing it, is a better programming environment where you can do things like embed pictures. We don't have this now because coders won't let go of their ascii files. XML adds nothing to this equation; it's still ascii but now it looks like vomit, so programmers still won't accept it. Better to just get a nice tiny binary format for code annotation, and then trust your intelligent, graphical, literate editor to hide the annnotations and just show you the logic. This would support that - barely - but with no advantage over binary and no additional chance of success in the marketplace. It's the IDE, stupid.

    22. Re:Extensible? by jd · · Score: 1
      Turing said much the same thing in the 1940s, only with more maths and fewer expletives. :)


      Seriously, you are exactly right on all points, including that XML is utterly inappropriate for structured programming. It's good for many things, but that isn't one of them.


      Thinking about it, programming in XML would be like programming in a cross between PROLOG (structure) and FORTH (definable syntax). You'll notice that neither of these is exactly in the top ten most-demanded languages. Oh, FORTH is great for microcontrollers, mechanical engineering problems and Radio Astronomy. It's just not, oh, something you'd probably want to re-write MySQL in.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
    23. Re:Extensible? by xcham · · Score: 1

      Unfortunately Java generics are pretty clunky for anything moderately complex. C#'s generics, though I'm aghast to say it, seem much friendlier.

      --
      When life gives you lemons, you CLONE those lemons, and make SUPER-LEMONS. -- Dr. Cinnamon Scudworth, Ph.D
    24. Re:Extensible? by xcham · · Score: 1

      There's a reason, though, that LISP has remained primarily an academic curiosity. XML is dumbed down enough to appeal to the masses.

      --
      When life gives you lemons, you CLONE those lemons, and make SUPER-LEMONS. -- Dr. Cinnamon Scudworth, Ph.D
    25. Re:Extensible? by jarran · · Score: 1

      At it's core XML is nothing. It's so generic, so basic, so flexible, whatever you want to call it, that it's completely pointless

      Mmm, have you actually ever heard of schema? I assume not, as I can't understand why you'd make such a silly comment otherwise.

      If you have heard to them, perhaps you'd care to explain why XML restricted by a schema is still "too flexible", considering you can restrict the language down to pretty much whatever you want.

    26. Re:Extensible? by edp927 · · Score: 1

      All right I understand, a lot of you /kids don't like the XML. But look at it this way, XML is exactly as dumb as you think it is, you just don't realize how dumb everything else you do is.

      Since it's the topic of conversation, let's take programming languages. Now, I know you're all saying "why write in xml when I can write in (insert something here, for example parent's reference to "english"). Sureley, there's no one here, of all places, who thinks that english (a la Pascal, etc.) is a good markup language (oops I mean syntax) for a program. Even a language like C, that embraces non-textual delimiters, still has its issues. As I'm sure a many former tcl programmer (or, for arument's sake current tcl programmer) will agree with me when I say that keywords are preposterous. (note to lisp programmers: special forms are very special keywords).

      In the end, wouldn't programming within a framework where structural elements of the language can be differentiated from naming constructs be a good idea?

      You say that XML is so simple it's not structure, but this is only because you think that structure is easy. What happens when I want to mix structure with truly unstructured data (or even with other structures)? The fact of the matter is that extracting structured data like the loop represented by "for i in $* ;do echo $i ;done" from an otherwise unstructiured source (say this posting) is next to imposible -- Note here I've made it "easy" for you by using quotes, but even that doesn't tell you much, since I accidentally quoted the word easy as well.

      Of course, XML is not needed for this endeavor. As I mentioned, tcl (a thing near and dear to my perverse heart) is an example of an compact and elegant language expression. It smounts to what you might call good markup (Mind you, no one uses it). But herein lies the heart of understanding XML. It's not that we need it; I mean, it's not actually good for anything. It's just that, as a common denominator, it is pretty good (a hell of a lot better than bare ASCII), for doing just about anything at all.

      So, in the case of a language, you could write a parser that balances case with esac, or you could get one of IBM's code-monkeys to do it for you, which do you prefer?
      Me, I've always wanted a monkey.

      Then, once you've got your XML-based language, you can let it play with other xml documents. For example, if you are the one-in-a-million programmer who thinks that documentation is a good thing, you could add marked up documentation to your program without resorting to arcane @incantations in your comments.

      Listen, I'm not saying that XML programming languages are a brilliant idea (it's probably a bit wordy to make a lot of programmers happy). And, of couse, I didn't bother to RTFA, since XML-based programming languages have been around for a while. But, saying XML is dumb is really missing the point (by which I mean, that's the whole point)

      The goal, of course is that we can leverage this

    27. Re:Extensible? by Retric · · Score: 2, Interesting

      Ok when your storing data files you might as well use a database vs XML. But, if your storing configuration files I like to use (int;name lenght) (name as an ascii str) (int; element id) (int; data type) (int; data size) (data)

      It's low over head and easy to parce so you can store a tun of data, simple or complex data, with ease. It's also easy to check the syntax so you know you did not mess up when writing or reading the data. It's also easy to store list's or nest data. Ok now if you tell me how XML is so much better than this fine but other than being a little more readable by hand I don't see what the advantage is. As to data type's;

      0 = new tree
      1 = string ASCII
      2 = String Unicode
      10 = signed int
      20 = unsigned int
      30 = floating point number (format 1) 31 = floating point number (format 2) ...
      I basicly keep aything under 10,000 as uneversal format's and use stuff over that for odd adhock stuff which I don't have time to deconstruct.

    28. Re:Extensible? by conradp · · Score: 2, Insightful

      Thank you very much, I think you've just proven my point better than I ever could have!

      --
      "To be absolutely certain about something, one must know everything or nothing about it." -- Olin Miller
    29. Re:Extensible? by Decaff · · Score: 1

      At it's core XML is nothing. It's so generic, so basic, so flexible, whatever you want to call it, that it's completely pointless. Yes, you read that right, the structure is so flexible that it's not really structure any more.

      XML is certainly NOT that generic or basic. It's strength is in its rules. These rules give it enormous power. They mean that XML is a standard. My XML reader will read your XML file. It is extensible: If I have some data I want to add to your XML file I can do that without corrupting the meaning of your file, and without messing up your software. XML is self-documenting. It is clear where data starts and stops (you may think this is obvious, but take a look at an arbitrary text data file, which may or may not have commas separating items, and might allow newlines in strings, or might not, etc.). XML is easily transformed and manipulated by software. XML is structured to allow arbitrary data to be stored.

      The alternative is a mass of undocumented text or binary data files which are meaningless without external documentation or software to interpret them.

    30. Re:Extensible? by Simon+Brooke · · Score: 1
      This is just like writing Lisp. You have an s-expression like (+ 2 3) or (make-hash-table blah blah) that use functions from the language proper, and you have s-exprs like (render-cube blah blah) that are calling your own functions.

      Just so.

      XML is, and has always been, just a particularly prolix and awkward way of writing s-exprs. However, the great unwashed out there think that LISP is too difficult for them, so they have to have it bundled up into some form that they don't recognise as LISP before they can accept it.

      --
      I'm old enough to remember when discussions on Slashdot were well informed.
    31. Re:Extensible? by Anonymous Coward · · Score: 0

      Can I use an XSLT processor to transform your format into multiple other formats?

      Can I use an XPath expression to pull out individual pieces of information?

      Can I load your documents into a web browser on the fly and take information out of them with the DOM?

      Can I present your documents to people in a web browser, nicely styled with CSS?

      Do I have to write a parser?

      Can I automatically check documents I edit for syntax errors?

      What is the data element id? Number? String? What happens if I want to put a closing parenthesis in it? You haven't described any escaping rules. XML has well-defined escaping rules.

      What happens when I want to store non-ASCII text? XML uses Unicode.

      You mean I have to count the length of every string I store, and write that into the format as well? You have made the format unwritable for humans in practice.

      That's just off the top of my head. I could probably find dozens more reasons why XML is better than (your|anyone's) home-grown format if I tried.

      The problem is, you've given XML a cursory glance, decided it's too much effort for you to bother with, and not thought things through. Yeah, on the face of things, there's not much to XML. That's because it attacks a small, well-defined problem. But it's a small, well-defined problem that virtually every programmer has, and it solves it in a way that stops you from having to deal with a bunch of issues - some of which I guarantee will crop up *after* a product is launched (you can't even store somebody's *name* reliably with ASCII).

    32. Re:Extensible? by Decaff · · Score: 2, Insightful

      0 = new tree
      1 = string ASCII
      2 = String Unicode
      10 = signed int
      20 = unsigned int
      30 = floating point number (format 1) 31 = floating point number (format 2) ...
      I basicly keep aything under 10,000 as uneversal format's and use stuff over that for odd adhock stuff which I don't have time to deconstruct.


      If I had come across one of your configuration files, and did not have this key to the meaning, I would have had no idea how to interpret it.

      This is exactly the argument for using XML.

    33. Re:Extensible? by Retric · · Score: 1

      XML is not Human readable on anything ther than the most simple app. And do you want people to be able to mess with config files when they don't have the documentation?

    34. Re:Extensible? by kraut · · Score: 1

      If your C++ code is slower than your C code, you're doing it wrong, or your compiler sucks. That's all there's too it; there is no reason why C++ should be slower than C at all.

      --
      no taxation without representation!
    35. Re:Extensible? by SenFo · · Score: 1

      You took the words right out of my mouth. Very well said...

    36. Re:Extensible? by Decaff · · Score: 2, Insightful

      XML is not Human readable on anything ther than the most simple app.

      Having used XML extensively, I would disagree with this.

      And do you want people to be able to mess with config files when they don't have the documentation?

      But that is exactly why XML is useful:
      1. A configuration file will most likely have a DTD or schema, so that if you modify it, those modifications can be validated, as can the structure of the entire XML file.
      2. XML is extensible. It is perfectly acceptable to add your own tags, which give additional meaning to the file. Tags which aren't understood by a particular application will be safely ignored.
      3. XML IS human readable: Which would you feel more confident editing:

      <setting type="integer">123</setting>

      or

      10,123

      (Was the indication for integer 10? I don't remember. Someone might tell me that '10' means 'integer', but there is nothing else to indicate this)

      Good XML will be self-documenting, but even bad XML is better than

      10,123

    37. Re:Extensible? by cerberusti · · Score: 1

      The speed difference between C++ and C is real. It varies wildly depending upon the specific problem and the specific implementation but in my experience it is usually in the 10% - 50% range, with the occasional large difference.

      You can only really reduce it by not using objects, at which point you are basically writing C anyway (and on some compilers even this does not help.)

      The reason for this is not so much the difference in the implementation as you write it but, the difficulty with which a compiler can perform certain optimizations. This is especially true for compilers which support the C99 restrict keyword (which C++ does not have) as it allows a C compiler to perform certain optimizations which simply cannot be done with C++ code.

      The obligatory link to the Results from the Computer Language Shootout (with the default weightings.) It shows about a 30% difference over all of the programs, which seems about right.

      The reason people are constantly say that their favorite language is faster than C is that C is the fastest of the popular portable programming languages.

      --
      I'm a signature virus. Please copy me to your signature so I can replicate.
    38. Re:Extensible? by Retric · · Score: 1

      Ok first off it's raw data so there is no escape sequences and if the numbers are off the format's not valid.

      2nd You don't CAN"T edit config files manualy that's a feature not a bug. I have seen lot's of people edit config files in production and it's always causes problems.

      The Stored strings have no inharent meaning for the app there only used as debugging output so you can store random numbers and it would still work.

      As to the browser idea yea you can look at them though a applet. And while I have written a simple app that transform's this into XML so you can do anything that you can do with XML files to these. I have yet to find anything usefull to do with the XML output. The thing is looking at the data is not usefull out side of the aplication it's running in. Now there is a tun of system data in a database that needs to talk to the world but XML would be way to slow for storing that stuff. So I still want to know why people want to use XML for config files. I mean you still have to wite something that decodes the XML information even if you read in it's format.

      PS: ASCII is for the sytem to look at not for storing data. The File looks like looks like this 0100001F54 in hex, but I get to see "The user's name is stored here." ID 21, Unicode, "Mike" Checksum valid as debugging output. Hell when I look at it I get links that show me lot's of usefull info on the web site but then again I have a lot of usefull tools for working with this data what I want to know is if there is a good reason to switch to XML with some of my new code. When there is no way in hell I am going to let people edit the data in raw format.

    39. Re:Extensible? by Retric · · Score: 1

      Cuting and pasting this from another comment..
      PS: ASCII is for the sytem to look at not for storing data. The File looks like looks like this 0100001F54 in hex, but I get to see "The user's name is stored here." ID 21, Unicode, "Mike" Checksum valid as debugging output. Hell when I look at it I get links that show me lot's of usefull info on the web site but then again I have a lot of usefull tools for working with this data what I want to know is if there is a good reason to switch to XML with some of my new code. When there is no way in hell I am going to let people edit the data in raw format.

      Anyway, if your file is 123 you can read that. But what if your storing a tree. So that bill brances to marry (braches to mark) and steve (braches to david and sue (branches to linda)) while storing there user id's and passwords (it's a simple example config information would be window list's with there setting information) Now shure you can see that marry has id 31 if you stare at it for long enough but for anything that's not simple it's going to be a pain in the arse. So you might as well setup a GUI to look at the data while your making your app as these are all setings that your going to need to edit anyway. Now as to the schema idea that might have some merrit this just uses a checksum after the data to enshure that the element is not corrupt.

    40. Re:Extensible? by nahdude812 · · Score: 1

      Agreed, and I speak to this as someone who's had some exposure to XML based languages. For example, there's the open source Laszlo, which is actually a pretty slick way to render dynamic Flash, and does a lot of the gruntwork of providing a ton of complex standard elements (accordion boxes, tab bars, checkboxes, buttons, and many more) in a simple to use format, while also allowing you to build in the sort of simple interface animation that has tested so well in usability studies (such as clicking a calendar item expanding it to the screen rather than just blinking it up in a new window).

      Macromedia Flex serves the same purposes, but is proprietary (and expensive). It's also an XML based language.

      What a pain in the butt it is to write in these languages. They're even worse than ColdFusion. The biggest problem I have with my experience with XML based languages (or tag based languages such as ColdFusion) is the sheer amount of time it takes to code in them, measured in the number of keystrokes. I've never had a problem with carpal tunnel programming in languages such as C++, Java, or PHP, not even ASP/VBscript. One day of Laszlo syntax got my wrists a-hurtin'.

      Turns out I spent a much larger portion of my time actually writing the syntax instead of problem solving in my head. Characters such as < and > are found in great abundance, and these are actually characters that require two keystrokes. Compared to curly brackets { and }, you're guaranteed to see these at least half as often. Also, since < is almost half the time followed by /, realize that the combination of </ is harder to type than } and whatever comes immediately after it (usually a return, or space for things like "} else {"). It's harder because / doesn't require the shift, while < does, while failing to release the shift in time for a space or return has no negative impact on your code.

      To boot, it's harder to write out the full closing tag than a simple } mark just because it's quite a few more characters. I agree that a full closing tag is easier to debug, and easier to read, but it's hell on the wrists. </while> vs }.

      I realize these things seem trivial, but they really add up. A verbose language syntax such as is required in an XML language takes more time to code in than an equivalent syntax in a less verbose form.

    41. Re:Extensible? by Bozdune · · Score: 1

      Thank you for the excellent points. I was going to make many of them.

      However, XML can be silly overkill sometimes. Like, for some reason you decide you're going to go XML-happy and store all your customer's data inside weird-ass custom XML, when an ordinary database would have done just fine. Then the customer (a Fortune 500 company, a BIG customer) calls you up and says, "I want to write my own reports, so do a raw data dump for me, I need a flat file right now."

      Oops.

      By the way, this is a real-world (embarrassing) example.

    42. Re:Extensible? by Anonymous Coward · · Score: 0

      I have been doing this for years, I call it Digital DNA! Using XML to create perl programs, Html or whatever from a primordial soup of reusable components. It really does work!

    43. Re:Extensible? by Decaff · · Score: 1

      I want to know is if there is a good reason to switch to XML with some of my new code. When there is no way in hell I am going to let people edit the data in raw format.

      There are at least two good reasons that come to mind immediately:

      1. Why re-invent the wheel? Using XML means that you can use high-quality tools and libraries to process and edit the configuration files.

      2. Even if you are the only one using this format, XML gives you the ability to cleanly add new features and extend the format in the future, without disrupting the ability of legacy code to handle the data.

      So you might as well setup a GUI to look at the data while your making your app as these are all setings that your going to need to edit anyway.

      But with XML, the tools for doing this are already in existence. What is the point of doing all this yourself?

    44. Re:Extensible? by fitten · · Score: 1

      C++ can be as fast as C. You just have to know to avoid common pitfalls that slow it down.

    45. Re:Extensible? by Anonymous Coward · · Score: 0

      And while I have written a simple app that transform's this into XML so you can do anything that you can do with XML files to these. I have yet to find anything usefull to do with the XML output.

      XSLT doesn't work with your format. Web browsers don't have a built-in parser for your format. The DOM doesn't handle your format. XPath can't reference data inside your format. CSS can't style your format.

      If you want to do any of these things with your format, you are stuck reinventing the wheel by writing your own tools. Everybody who will ever process this data needs to have these tools or write some themselves.

      Do you invent your own programming language to write programs in? Do you write your own database to store data in? Do you write your own operating system to run the programs on? Do you design your own CPU to base your computer around? Then why would you design your own syntax for a file format?

      I mean you still have to wite something that decodes the XML information even if you read in it's format.

      No you don't. That's the whole point. You have to write code that uses the information from the parser, but you don't have to do any decoding yourself. It's like "SELECT * FROM TABLE" compared to reading in the database files yourself. It's moronic.

    46. Re:Extensible? by Taladar · · Score: 1

      I would like to have something like this:

      # The following setting describes the number of idle worker threads
      # Use caution with values higher than 100 as this might slow down disk access due to file locking issues
      # For further information see /usr/share/doc/example-0.1/README.openfiles
      # The default value is 10
      # idleworkers=10
      # Miminum Value is 1, maximum value is 255
      idleworkers=25

      The parsing is easy and you have enough documentation in place to decide between the reasonable values and info where you can find more information on issues concerning this setting.

      With your XML way you have no documentation directly in the file. If you have a config file all settings should be documented in there and if you have a data file you should be able to have one documentation for an example entry at the beginning of the file. The "name=value" syntax is a lot easier to parse than XML and allows you to store the settings in memory in the way you want.

    47. Re:Extensible? by fbjon · · Score: 1
      How about cutting this in half with the help of the IDE: every time you type a closing bracket on a starting tag:
      <while|
      the IDE automatically prints out a newline and the closing tag:
      <while>|
      </ while>
      ... of course keeping the cursor in place, as shown. Anything that doesn't require closing tags (?) is a simple exception, or it could be cancelled by pressing esc directly after. Also, completion can help: type
      <wh|
      and press tab, and it gets completed to
      <while>|
      </ while>
      Press tab again and it gets replaced by
      <wtf>
      </ wtf>
      (developer's comment), or whatever is the next most likely tag, or next most used (not the next alphabetical, which is totally braindead). It's all in the IDE.
      People, let's start designing IDE's using our brains !
      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    48. Re:Extensible? by Decaff · · Score: 2, Insightful

      With your XML way you have no documentation directly in the file.

      You mean like:

      <-- This is a note about the following settings -->?

      If you have a config file all settings should be documented in there and if you have a data file you should be able to have one documentation for an example entry at the beginning of the file.

      I think you are missing the point. With a configuration file like this, you HAVE to have the documentation in there to interpret the settings. With XML you don't.

      The "name=value" syntax is a lot easier to parse than XML and allows you to store the settings in memory in the way you want.

      Why should you care how easy the file is to parse? Don't bother to parse it yourself - use an API like SAX - and then you can store the settings in whatever way you like.

      Some other points:

      The name=value syntax isn't portable or expandable. Suppose the name or value contains '='? You will need to define what delimiter should be used for the name and value. XML is a defined standard for delimiting values.

      This syntax does not allow for trees. XML can do this.

      How do you handle strings that require non-printable characters, like newlines? XML has a standard for this.

      Suppose you have put in the documentation about what format is and what the parameters mean and then the software is dispatched to a foreign country? XML is an international standard.

      Suppose someone else wants to add new settings to the configuration file. Will this prevent your software working? With their names of properties clash with yours? These matters are handled in XML.

      Finally, there is nothing in the file that would allow any software to automatically detect that this is a name=value file. XML always starts with <?xml.

      XML is an easy-to-use standard solution to these problems, with many well-supported high-quality libraries and tools to handle it. It can be as simple or complicated as you like. What is the objection?

    49. Re:Extensible? by Anonymous Coward · · Score: 0

      And OOP is still slow. I use C due to the fact that I can get 100 extra FPS out of it compared to C++

      If C++ is good enough for Doom 3, it ought to be good enough for your 9 spinning cubes, asshole.

    50. Re:Extensible? by Anonymous Coward · · Score: 0

      You do know that java generics are just a pre-processing kludge? C++ generics are built into the system, but to avoid re-writing the JVM Sun opted for a pre-processing wart on their languange. Eventually Java generics will be folded properly into the language - until then they remain junk.

    51. Re:Extensible? by Anonymous Coward · · Score: 0

      >> And OOP is still slow. I use C due to the fact that I can get 100 extra FPS out of it compared to C++
      >> (OpenGL, ATI Radeon 9800 Pro 256 MB, 490 to 587 on a 9 spinning cube shaded render)

      Try running a profiler.

      Then you might have some idea what your C++ program is actually *doing* when it's running slower.

    52. Re:Extensible? by Myxorg · · Score: 1

      There's nothing wrong with your scheme if it works for you. The problem is there's like a zillion different developers who all have there own scheme for preference files, and some times it can be quite confusing to a user trying to figure out what changes can be made to the config file. At least xml will look familiar.

      My personal favorite way to do simple preference files is to have a Preference class with nothing but public properties, where each property is a preference like Rect LastMainWinPos. all the properties are assigned reasonable defaults. When I want to save the preferences I just serialize the prefs instance to xml and save it to a file. The next time the program runs it reads in the xml file and constructs a prefs object. I use this in C# and it's a really easy way to save prefs.

      Xml is not super fast, but it's not like I'm doing this in a tight loop, so speed is acceptable.

    53. Re:Extensible? by ph1ll · · Score: 2, Insightful
      The World does not need better programming languages.

      The World needs better programmers.

      --
      --- "We've always been at war with Eastasia."
    54. Re:Extensible? by rsheridan6 · · Score: 1
      Yeah, it's because Lisp was created in the MIT AI Lab, its users and creators were super-geek hackers, academics and AI people who had little in common with the average working programmer and weren't working on similar problems. If XML, Perl, or C++ had had the same origin and culture surrounding them they'd be about as popular as Lisp.

      XML isn't so much dumbed down as bloated up.

      --
      Don't drop the soap, Tommy!
    55. Re:Extensible? by cakoose · · Score: 1

      If the customer wants a raw dump, it's easy to transform the XML into plain text. Docbook can do do it, you can too!

      Ideally, your canonical data model should be losslessly representable in a relational DB schema or an XML schema. That way, you can convert between them whenever you need to.

      The reason for not using XML is that the data model is fundamentally broken:

      • Attributes are useless (making it hard to represent records).
      • The necessary distinction between type names and field names isn't made.
    56. Re:Extensible? by cakoose · · Score: 1
      This is in fact not a new construct in anyway, Sun just copied C++'s template classes which have been around for longer than I have been alive :P.

      They're quite different at the core, even though they use similar syntax and are used to do similar things.

    57. Re:Extensible? by nahdude812 · · Score: 1

      While (no pun intended) what you recommend works in some circumstances, it does first presume you're working with an IDE that recognizes the language you're coding in.

      There's quite a number of IDE's that do an excellent job of helping you save a few keystrokes if they recognize your language, and at least the GUI IDE's do it not by guessing which tag you want, and making you hit Tab to switch between the possible completions, but rather by popping up a submenu immediately above or below where you're typing with the possibilities, and allowing you to use the arrow keys to choose the one you want. One problem I have with these popups is that they frequently obscure nearby code that you may want to reference, such as that complex regex you just wrote and want to backreference (was it the 7th or 8th parenthesis set?).

      Also, most tags take arguments, and aren't just straight <tag> </tag>. Although a few such tags exist, they're the exception rather than the rule. So you end up with <while list.next()> or <while x gt 7> At what point should it automatically provide your closing tag? I guess you could say it should be <while|></while> with the pipe there being the cursor position, and that makes a lot of sense, though when you are done, you have to relocate your cursor, and if you already have the inner guts of the <while> loop or <if> block or whatever written, you have to relocate the closing tag since of course the IDE has no way of knowing where you want the closing tag. And if you're talking about an XML based language, what if you want to do nothing inside the block (such as a for loop that does all of its work within the arguments of the loop, you want to count how many times foo.bar() returned true before its first false [such as an iterator function on an object that fails to provide a count() method], you can do for (x=0; foo.bar(); x++){}). Although it's syntactically valid to write <foo></foo> it's prefferable to write <foo/>.

      It's true, this may be a little easier on the carpals, but I'd wager that it's harder to achieve deep code mode when you're babysitting the IDE instead of working on logic. Personally I can't stand the IDE ever doing anything I didn't explicitly tell it to. I have my IDE set up so that when I want tag insight, I hit Ctrl-Space, and the surrounding-code-blocking popup appears.

      I think people who rely heavily on their IDE's tend to be weaker coders too. Again, this is personal supposition, based on a too-small sample of watching developers around me who are heavily invested in a particular IDE. Periodically something happens that wipes out their IDE settings, and it's weeks before they're able to produce usable code. They tend to be the same guys who are frequently being called in the evening or on a Saturday when their code fails. And when they are, it takes them hours to fix the problem because they're VPNing in from home to fix it, where they don't have their IDE set up to do the speed coding they're accustomed to.

      There's a decided split in my group of the folks who are IDE heads (dependant on their IDE rather than using it as a tool) and those who are not. Those of us who are not have a lower average repair time on critical error fixes, and a lower incidence of critical errors, based on our helpdesk ticketing system. If you look at these figures, there's a double bell curve, where the guys on the left of the curve (good) are those who are not IDE devoted, and on the right (bad) are those who aren't. It's certainly possible that this is coincidental, I'll admit, but it's definatly a trend I've observed first hand at least within my group of 30 +/- developers.

      You made me think of another reason I don't like tag based languages. The < and > signs can't be used in boolean tests. You can't test <if x > 7> because what you've written is invalid XML, and as a code parser, which > sign is the end of the tag? Maybe it can make a good guess, but I g

    58. Re:Extensible? by Bozdune · · Score: 1

      Nice call! Because of the domain area of this application (a peculiar and very custom combination of document and process management), there is strong reason to suspect that they haven't thought through the data model sufficiently. I also understand that this app was cobbled together in hurry-hurry mode, which is further evidence for not a lot of profound thought.

      As you imply, if the vendor had stored the customer's data in an ordinary database, then no matter how crummy their data model was, they'd have been able to cobble together a flat file somehow. The fact that they find this difficult -- and haven't done it to date, under pressure and at the request of a customer for whom they ought to be bending over -- suggests that they have painted themselves into a corner from which it is either difficult or expensive to escape.

      I'm tempted to generalize from this that there might be lots of other situations where people are making similar mistakes.

    59. Re:Extensible? by fbjon · · Score: 1
      Lots of good points.. let's see if I can come up with some.

      There are other reasons why tags are bad too. Curly braces are easier to read, because you don't have to read them. I assume having lots of tags that look similar must be frustrating in the long run, because of the visual clutter, which means that one can't "visualise" the code, as in just reading the shape, not the actual code. (then again, curly braces become parentheses on a blurry monitor, heh) Same goes with

      gt,leq,neq vs. >,<=,!=,
      letters require reading, but a simple symbol can be seen even if you aren't looking at it. Also, my angled brackets are to the left of 'z', both on the same key. Along with |. Argh.

      When I said pressing tab and so on, I did mean that same kind of option box with all possibilities, but it sould be sorted in a sane order to minimize searching through it. But actually, I thought that come completion would be easy, but perhaps not. How about creating some kind of custom interface for writing a tag? After having written the plain starting tag, there are two places where you want to type next (probably), inside and between. At this point, an additional "cursor" could be introduced, pointing for example inside the start tag. Pressing right, moves to the outside, in between tags, but pressing backspace does a normal backspace with the original cursor. Also, trying to move further in the tag than what is possible would cause the main cursor to become active again. I think there are lots of neat little tricks that can be done when writing tags.

      Or maybe not, I don't know :). Anyway, I thought of a solution for bringing the advantage of tags to curly braces. Comde completion again: when a starting curl is typed, the ending curl is also placed (according to personal preference). Then, these curls become linked, so than whatever one does with them, they do it together. Pointing at one could show a name, and the ending curl has the same name (which aren't show in the code). If problems occur, the names switched on in the code, or a block of code, so that you get something similar to tags. Alternatively, deleting one could delete the other, and pressing a key right after would show what happened in the other end. Just to make sure, that is. Again there could be lots of little tricks that could be done. Now here comes the problem: how do you put that into the source code itself, without cluttering it up? I can think of three ways: XML, separate file, or some block of junk in the end of the file that contains the necessary formatting data.

      Although, supposing that code which is saved to disk is always free of curly errors, saving the curl data might not be necessary.

      Ok, [end rambling /]

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    60. Re:Extensible? by Retric · · Score: 1

      1. But, I already have the code to do this. I have code that reads / writes to this format in C, C++, Pascal, and Java as well as some great libraries to edit and display this format. It's faster than XML. I can write/read to this format at speeds that are limited more by the HDD than the CPU where the last time I checked XML was realy slow. I can even jump though the file with out parcing the whole thing. And there is some built it redundancy to show if the file format is valid. On the other hand I if you can tell me some usefull tools for use with XML I will look into it as I can already export this format to XML but then again it's been a while sence I looked at it so there may be some great XML tools out there.

      2. It's a data storage format that's designed to handle tree's and list's natively. It aslo has a little redundancy so I can notice if I fucked up when writting the data. What new features can XML give me when dealing with setting information for custom apps? I mean it's already vary extensible in that code ignores tag names and format id's that it does not understand while still being able to pass them along.

      As to the GUI a lot of this code does things like setup window locations and format's with drag and drop editing which you need a custom GUI for so I don't see how using XML will help with this. Now where I going to look at say a list of names and locations that would be one thing but things are a lot more complex than that. Hmm, I am starting to think I should just show you some of these tools so it makes more sence to you but I think we are not realy talking abou the same things. When you compare XML to some other format your saying "Look at all the tools for XML out there." Where when I looked into XML I was like "that's interesting but there are no usefull tools for working with it." Hell, my first thought was wow they reinvented STML and gave it a new name.

      I mean if you where to compare C to Pascal I would say Pascal wins hands down. Shure C has some great liburary's but you can use them from Pascal so there is little point. Which is the same thing with this format I can make XML code out of it where I ever to need to use some XML tool but I get a lot of use out of the native format so what's the advantage to the format?

    61. Re:Extensible? by Decaff · · Score: 1

      But, I already have the code to do this ...What new features can XML give me when dealing with setting information for custom apps?

      There is a general principle of good practice when developing code - don't re-invent the wheel. It doesn't matter if what you have done is as good as XML for you. The point is that XML is a documented standard, and it is portable. If you had used XML for your project, that what you had done would have been easily understood and re-used, and your data would have been portable to other applications with no effort.

      If you don't think there aren't many tools out there for XML, I don't think you have looked very far!

    62. Re:Extensible? by Retric · · Score: 1

      XSLT doesn't work with your format. Web browsers don't have a built-in parser for your format. The DOM doesn't handle your format. XPath can't reference data inside your format. CSS can't style your format.

      None of which is usefull. I think XML is great as a methiod of information exchange but it sucks as a methiod of information storage / retreavel. Simple example let's say you want to know what the capital for something is. So you search for Capital, USA, Ohio. Well in my format you do could setup your data so it's the outer layer is Capital, followed by Contry, Follwed by state's if there is any. Now as the outer layer lists the Capital you can search the outer layers skiping over any data that's not usefull because you know the size of the data that's stored in it. So you go though say 100 outer layer options then 200 contires then 50 states in a file of say 30,000 data elements you found just what you where looking for after parcing only 100*200*50 data elements vs the whole file ( chanes are you got lucky and found it on closer to 50*50*25 data elements. Now shure you could read the whole file into memory at startup and get the data into the format you want but that's can take a while and makes using XML even slower. As you have parse the while file even if you only realy need 50 or so data elements to work with.

      That's an advantage to this data format vs XML which gives you human readability and the ablity to look at the data but as a what's the point in looking at that much data at in a web browser?

      PS: And yes I do have well over 30,000 data elements in a setup file that my users don't want to store on a database. And yes my app reads the whole file into memory but only parces it as it needs to.

    63. Re:Extensible? by Retric · · Score: 1

      Thats: So you go though say 100 outer layer options then 200 contires then 50 states in a file of say 30,000 data elements you found just what you where looking for after parcing only 100+200+50 data elements vs the whole file ( chanes are you got lucky and found it on closer to 50+50+25 data elements.

  3. Is this guy serious? by FyRE666 · · Score: 5, Insightful

    ...programmatic entities -- like: record. Wacky, but perhaps wacky enough to be possible?

    Hopefully, no. Christ almighty, why is there this surge in interest for pointless layers of abstraction on top of the code? It seems some people are desperate to do anything to avoid actual implementation (work?), prefering to dance around the periphery of a project, adding needless fluff and speedbumps. Honestly, will the addition of XML markup in source code REALLY help to advance a project, make the code more readable or avoid bugs?

    1. Re:Is this guy serious? by lukewarmfusion · · Score: 5, Funny
      No, don't you prefer this:
      <invoke-expr method="myMethod"><evaluate>record</evaluate></inv oke-expr>

      over this:
      someObj.myMethod(record);

      ? I, for one, welcome the obscuring verbosity. It's a challenge. It's exciting. It's job security.
    2. Re:Is this guy serious? by cosinezero · · Score: 1

      It could actually enable one to script custom syntax parsers. You could write schemas to enforce all syntax and typing... Plus, when the new version of the language is released, you could just run one giant transform to bring all your source up to the latest version. But I'm with you... it seems a bit excessive. And sounds like a great potential for abuse.

    3. Re:Is this guy serious? by CJSpil · · Score: 1

      Badly written code is difficult enough to read, the thought of badly written code with embedded badly written XML makes me cringe!

      Maybe this makes me shudder just because I haven't caught the XML must be used for absolutely everything bug yet!

      --
      For people who like peace and quiet. A phoneless cord!
    4. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      It's job security.

      Now that's insightful.

    5. Re:Is this guy serious? by ShadeARG · · Score: 1

      Actually, perhaps it might. Follow me here. Imagine being able to comment a chunk of code, but leave it invisible until the coder decides to review the comment layer. It sure beats polluting the codes readability, regardless of what other IDEs do to fold them. Imagine the possibilities with being able to lock certain areas of the code that you might have intimate knowledge of in a workgroup setting. Do you really want Fred touching that code? Would he even know better? If you were able to add explicit notes as to why certain sections are locked down, then there should be no question. Furthermore, if you were able to keep XML along side the source, you might even be able to work on the same source file with a group of people at the same time. How would this be possible without an abstraction layer? I'm not saying this type of implementation will be easy, but it certainly is far from impossible.

    6. Re:Is this guy serious? by hasdikarlsam · · Score: 5, Informative

      You mean, like Lisp has been capable of for the last thirty years?

      I think you're looking for macros. Proper, Lisp macros, not the weak text-substitution nonsense C comes with. :D

      Ooh, this story is great. Next on, how to reinvent the wheel - in XML!

    7. Re:Is this guy serious? by Anonymous Coward · · Score: 3, Insightful

      Oddly enough, all the tools you mention are already possible and exist today, without XML.

      XML has no value in and of itself. Standardized data formats may well be valuable, but there's nothing magic about angle brackets and slashes. A standardized binary format would be just as useful.

      Programming languages already have a standardized syntax. Having them also conform to XML syntax adds nothing. Heck, programming languages are also even human-readable, for those that still think that's an important feature of XML.

    8. Re:Is this guy serious? by IO+ERROR · · Score: 2, Insightful
      No. This is just needless complexity. XML is great for some things, but it is not the silver bullet for every problem in the known universe!

      In this case, XML will probably make programming much more difficult and code far less readable -- to humans. The compiler might like it a little better, but the compiler is supposed to serve us, not the other way around. The tool serves us. At least in an ideal world.

      In the real world we use tools to get work done. If the tools are inconvenient to use or not suitable to the problem at hand, they don't get used. For the sake of humanity, this needs to be killed now before he comes up with a prototype, and drives future generations of programmers to madness.

      --
      How am I supposed to fit a pithy, relevant quote into 120 characters?
    9. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      Why would you ever want to hide code or comments?
      So you forget about them? You want to hide them, copy to another file.

      The rest of this, I can only say you should look at CVS/Subversion/CVS-like-app-of-the-month

    10. Re:Is this guy serious? by Jerf · · Score: 3, Interesting

      Actually, this is a potentially good use of XML.

      Bear with me.

      The primary benefit of XML is that as a standardized language, standardized parsers can be made available that are reasonably easy to use.

      The primary "oversell" of XML is to extend that claim to cover semantics. Human readability is great and should not be underestimated in some uses, but should not be oversold either.

      So let's say you want to write a tool to validate that some Java code conforms to something or other. What's the hardest part of that task, that shouldn't be hard? Parsing the Java code. I mean, it's not like it's impossible for someone skilled enough to even consider writing such a tool in the first place, but it is a legitimate challenge; it's very easy to get 90% correct but that last 10% can be a bitch.

      And let's not even talk about trying to parse Perl.

      Exposing the AST in XML is not a bad idea; it's a perfect match of the two technologies. You still have semantics to deal with, but we're a ways from being able to standardize those.

      Now, as LISP has shown, programming straight to the AST, while it has its advantages, is a historical loser. But that doesn't make exposing it in a standard fashion a Bad Idea. On top of it, you layer a more conventional language... and as strongly as I am defending an XML-exposed AST, I even more strongly believe it would be a stupid, fatal mistake to make that the human-exposed language that one actually programs in. I've worked with a couple of things that only come close (XBL and XUL Templates, where the primary flaw of the latter is that it should be a language and isn't) and a thing that is an XML language (XSLT) and I think it was a grave error on both counts.

      Even better if multiple languages could share one standard or at least semi-standard AST; sharing semantics has proven to be a non-starter I think but there's still hope at the syntax level. (.Net shows that trying to share semantics means you end up with five languages that are just different spellings of the same thing, only without the convenient AST in XML to work with.)

      This isn't a pointless abstraction, but it is something that will probably only be useful on big projects. I say "probably" because if a language with this capability ever got off the ground, there might be interesting things that could be done that we've not even thought of.

    11. Re:Is this guy serious? by mz2 · · Score: 1

      Exactly! Mixing XML, or any structured document markup languages, into program logic is just loony and just generally bad, bad, bad. The whole point of having a general, structured, hierarchial document structure is to make managing, exchanging and manipulating data easier, not to put your whole program in it.



      I think the most horrible example of how XML related technologies can go wrong is the FileMaker Pro XSLT publishing engine, more specifically Filemaker's own extensions. For example sending email via an XSL template has to be the most perverted, craziest idea anyone has ever gotten, not to mention the sites you create with it become cluttered and uncomprehensible after ten minutes of coding.

    12. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      I just skimmed the article a bit, but I believe the idea is that you write your code the way you want to but the code is translated into the xml format and stored that way. When you reopen it, it's translated back into your preferred syntax. You would also be able to create new syntactic structures as you needed. However, even with those new structures, you would be able to view the code at a more literal level when you want to.

      Or at least that's the impression of this guys ideas that I got.

    13. Re:Is this guy serious? by mpcooke3 · · Score: 1

      They're trying to make the XML-programming more powerful. what about:

      100101110111

      It's readable but, remains flexible.

    14. Re:Is this guy serious? by ad0gg · · Score: 1
      With the first version, you can convert it to any language out there with xslt. I know lot applications especially in the .net area are written in either vb or c#. And if you want to clip some code for your stuff, you have to run through a god awful converter or do it by hand.

      Also with XML you can easily do AOP type post processing, say add synchronization to certain methods that match your XPATH query.

      --

      Have you ever been to a turkish prison?

    15. Re:Is this guy serious? by mpcooke3 · · Score: 2, Funny
      They're trying to make the XML-programming more powerful. what about:
      <execute instruction="true">100101110111</execute>
      It's readable but, remains flexible.

      Matt
      Bah slashdot stripping away all the xml goodness
    16. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      Of course!
      that's some serious mental masturbation!

    17. Re:Is this guy serious? by Curtman · · Score: 4, Funny

      If the tools are inconvenient to use or not suitable to the problem at hand, they don't get used.

      Tell that to the Internet Explorer development team.

    18. Re:Is this guy serious? by ShadeARG · · Score: 1

      I'm not suggesting that the code should ever be hidden; far from it actually. When code is locked down, not only should it be visible, but extremely visible (i.e., grayed out or have a special background). As for hidden comments, they should stand out a similar fashion as well. If you have intimate knowledge of the code, the comments wouldn't need to be visible all of the time. I don't know about you, but I certainly like to see as much of the code at a time as possible.

    19. Re:Is this guy serious? by Coryoth · · Score: 4, Insightful

      I just skimmed the article a bit, but I believe the idea is that you write your code the way you want to but the code is translated into the xml format and stored that way. When you reopen it, it's translated back into your preferred syntax.

      So what we're really talking about is something like Microsofts CLR, Java's bytecode, or Parrot code, with the ability to de-compile it back into the language of your choice? We just get the added bonus that the "compiled" code is not actually compiled, and is stored in the most padded verbose unreadable format that could reasonably be arranged? Doesn't sound like a vast improvement.

      Jedidiah.

    20. Re:Is this guy serious? by Anonymous Coward · · Score: 0
      Hopefully, no. Christ almighty, why is there this surge in interest for pointless layers of abstraction on top of the code? ...

      I disagree completely. The problem is that text is a terrible abstraction layer for programming languages. The amount of effort that goes into making a grammar work for a language as text is huge. Often many compromises are made to ensure the grammar can work.

      While I don't like XML, I am using Argot( http://www.einet.com.au/ to do something similar. Argot is binary and allows much more expresiveness than any text based language will give. Its also extensible like XML, so for a language new concepts can be added as needed. It will also allow data and code concepts to be mixed easier.

      Of course this requires an editor which will be a challenge to get right. But thankfully projects like eclipse make this easier and easier. Even today eclipse plugins understand the concepts of java. Its not really that big a jump to change the format of the file and start doing more interesting things with a language.

    21. Re:Is this guy serious? by mevets · · Score: 1

      Dare to dream. This is the greatest opportunity to rewrite working code since Y2K! Remember BWM's as signing-bonuses? repeat history() until learned;

    22. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      I was working up a flamination over the typical slashdot stupidity regarding overcomplicating things, but it looks like you saved me the effort. I also was going to include the point about "stop finding a different way to do your job and just do it".

    23. Re:Is this guy serious? by interiot · · Score: 4, Funny
      In the begining (1954, according to my O'Reilly poster) was Cobol. People moaned and complained.

      Next came Lisp (1958). They had to literally invent garbage collection simply to be able to create the language. In 2005, garbage collection is finally starting to be found in almost every non-embedded language.

      1982 brought us Postscript. It's new! Exciting new syntax. Well, okay, Lisp thought of it first.

      1996 brought the world XML. Exciting new syntax! Again!

    24. Re:Is this guy serious? by Umbral+Blot · · Score: 1

      That is a good idea. And I can think of many other similiar features you might want for an editor / project development system. However I doubt XML will end up being the best solution. I would guess that the best solution would be a custom file format that was desgined for this reason.

    25. Re:Is this guy serious? by Anonymous Coward · · Score: 0
      The whole point of having a general, structured, hierarchial document structure is to make managing, exchanging and manipulating data easier, not to put your whole program in it.

      Ah, but programs are really just data after all. Still, if I really wanted this I'd be writing in Lisp.

    26. Re:Is this guy serious? by Anonymous Coward · · Score: 0
      I agree completely. I'm not a big fan of XML, however I think we are moving forward(or back) to programming the AST directly. While I agree that Lisp has been a historical loser, its ability to treat data and code the same is powerful.

      I'm currently attempting to design a lisp style language which has a binary grammar using Argot ( http://www.einet.com.au/ ) which is extensible like XML, but binary. It also uses a dictionary style schema system which allows schemas to be mixed more easily than XML which is great for this type of language design. The language is still at pencil and paper stage, but should be interesting when done. Infact the hardest part is not the language or runtime environment. The hardest part is designing an editor which makes the user feel comfortable editing the AST directly.

    27. Re:Is this guy serious? by psetzer · · Score: 1

      You can compress it using gzip, which I'd assume would be part of the process. I'd guess that you would have some file like foo.src.gz, and when you open it in emacs, it's automatically turned into the format you want. It's certainly an interesting idea, and even if it isn't compressed standard, any distribution of the source code certainly would do so.

      --
      "Anyone who attempts to generate random numbers by deterministic means is living in a state of sin." -- John von Neumann
    28. Re:Is this guy serious? by ShadeARG · · Score: 1

      Hey, if there is a better solution, then the idea of using XML should be thrown out the door. Metadata abstraction can be a wonderful thing, especially with flat files such as code.

    29. Re:Is this guy serious? by cyfer2000 · · Score: 1

      I'd like to buy some stock of keyboard makers, and give up programming. I am going to be rich quicker.

      --
      There is a spark in every single flame bait point.
    30. Re:Is this guy serious? by Jerf · · Score: 1

      Send me email, I'm interested in discussing your editor problem and may or may not be able to help.

    31. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      is english your second language?

    32. Re:Is this guy serious? by the_mad_poster · · Score: 1, Troll

      There is no such thing as XML goodness. XML is a stupid idea from stupid people who sell it to other stupid people. I have never once encountered a situation where there was any need to encapsulate data in XML in which the gains in flexibility weren't outweighed by the problems of unnecessary bloat and additional complexity in maintenance.

      If people were smart enough to document there data transmission procedures in the first place and modularize the components in their systems, it wouldn't take any more time to rewrite the transmission and storage methods of a system than it does to rewrite the stupid XML files and DTDs when you merge or change a system.

      --
      Alito: A vote for Alito is a punch in the eye to put that bitch back in her place!
    33. Re:Is this guy serious? by Frank+T.+Lofaro+Jr. · · Score: 4, Funny

      And if it fails to help you keep your job, you have yet another XML item to add to your resume. :)

      --
      Just because it CAN be done, doesn't mean it should!
    34. Re:Is this guy serious? by Lux · · Score: 1

      I just finished a tool that uses XML to describe and execute a process. It is much more like a runtime environment than a document format.

      The syntax I arrived at is much cleaner (though a bit weaker) than the syntax in the story.

      I don't see why people are having strong reactions to this idea. I guess the syntax is yucky in their example, but the distinction between code and data can get blurry at every level of abstraction.

    35. Re:Is this guy serious? by Coryoth · · Score: 4, Insightful
      That is a good idea. And I can think of many other similiar features you might want for an editor / project development system. However I doubt XML will end up being the best solution. I would guess that the best solution would be a custom file format that was desgined for this reason.

      Brilliant idea. Let's start by just using parentheses for delimiters instead of all that stuff, and just have the first word inside the parentheses define the operation, and the other (space delimited, why not?) words simply be the list of arguments to be processed. That sounds nifty. Now lets take that example from the article and convert it into this condensed format...
      <cond>
      <test>
      <compare-expr operator="less">
      <field-expr field="age">
      <evaluate>record</evaluate>
      </field-expr>
      <evaluate>threshold</evaluate>
      </compare-expr>
      </test>
      <body>
      <invoke-expr method="release">
      <evaluate>record</evaluate>
      </invoke-expr>
      </body>
      </cond>
      becomes something like
      (if (< (field age (record)) (threshold))
      (body
      (release (record))
      )
      )
      Hmm, that looks oddly familiar... if we just changed a few of the keywords a litte.. I wonder if someone has thought of something like this before...

      Jedidiah
    36. Re:Is this guy serious? by mpcooke3 · · Score: 2, Insightful

      I wouldn't say that. most of the companies i work with supply data in XML formats. generally they're very easy to read/debug and process and using standard libraries.

      Some companies on the other hand try to give us proprietary binary data streams over tcp or incremental relational data dumps over TCP. Guess which i prefer.

    37. Re:Is this guy serious? by BlackHawk-666 · · Score: 1
      May I have a toke on your crack-pipe? Comments are readibility. Having to dredge your way through the shite that most programmers consider code is like having to taste test syphalis for a living, do-able, but not something to share with your mates. The golden rule is "read the green, resort to the code when the green is missing or inaccurate". A programmer will be 10x more productive if they follow this rule and it's corrolorary, write the green.

      If your mate fred is so incompetent that he can't write good code you either need to train him or fire him. Programmers hoarding a code source to themselves is a sure sign that something is wrong, and they also need re-training or firing. If you can't read and maintain your mates code one of you needs to leave. If you don't trust your mate, one of you needs to leave.

      --
      All those moments will be lost in time, like tears in rain.
    38. Re:Is this guy serious? by Anonymous Coward · · Score: 0
      If it was anyone other than Guy Steele, I'd flatly dismiss him. Since it's Guy, I'll give it a little bit of the benefit of the doubt and say I think he's missing the mark.

      4th kind of let's you define the language as you go and it seems like the more seasoned Lisp and schemers use very controlled uses of the preprocesor to avoid abusing it.

      Honestly, I think there are a lot of really cool ideas and cool technologies out there but we're too in favor of a monoculture to exploit them. It's not the first time this industry has chosen poor tools for the wrong reasons; in fact that may be the epidemic of software. C over Pascal and other contemporaries back 20 years ago. Windows over UNIX and other more powerful platforms 15 years ago. X86 is an entrenched as ever, despite numerous other platforms that could do things better. once we bite, we want to use the singular tool for everything.

      Java is a great language, they did a good job with it. It has close to no real history in embedded or real-time though, so what do we as an industry do? We start trying to hammer java everywhere. It's hideous at some of those tasks, we could use erlang, C, or even Ada all with proven track records, well supported tool stacks and such, but instead we take the hard path, we're going to hammer java somewhere it was never intended. So what, we'll just add more memory to our embedded product, put a bigger processor in it, reduce our margins and increase the cost of the deliverable and since we're treading new ground, we won't ship it any faster and it probably won't be measurably less buggy. Nothing against Java, but what's wrong with the right tools? You ever written a JNI layer to talk to hardware? Rather than just outp? I mean shit, we could have a 1.5k C executable that talks to the hardware and does a little task but let's write a library and fire up java to do it. I've seen this a handful of times, now Java has a history in embedded (still no real time) and quite a few users of it in that space think it's ill-fitted for it.

      Likewise, I can't imagine writing something like Word in C, I could see really disciplined C++ but even then, it seems like a huge effort. Java seems perfect for that type of application, I'm not beating up java.

      We've got functional languages now that are amazing, the concept really help to prove correctness. Functional compilers are getting very advanced, almost to the point of outperforming all other types of compilers. Why don't we write critical code in Ocaml or haskell? Because we have to think in order to do it? There is research that shows that correctness is higher and more likely with certain tools and we routinely ignore that infavor of terrible tools for the job. As we put more computers out in the world everywhere, the correctness of the code is goign to matter more and more; ironically we have tools that can help us with this problem but we don't want to use them.

      I'm working with a group that wants to use maven for builds and not store any of our dependencies in a revision control system, we'll just get them from the internet. Ironically, I'm in the minority in thinking this is completely screwed (I don't know what happens if ibiblio stops hosting the ant jars? how do we get them? More than a few times we've lost internet connectivity, do we just stop working during that time?) "Oh but it's so much easier, it will just downlaod them for you and if we change it will automatically get the new ones"

      I've seen people dump SQL databases for XML. Put XML wrappers on top of SQL, so that you can keep enhacning the XML everytime you want to do another query, no need for perpared statments or anything like that.

      The more I think about this, it's completely assinine, programming languages are extensible by their definition, but they aren't explicitely called extensible like XML is (with an X cause we're eXtreme in the 21st century) There are some huge breakthroughs that are needed if we're trying to define a

    39. Re:Is this guy serious? by astebbin · · Score: 1

      I have listened to a member IE dev team about the IE source, and he was very friendly and talked to me about the fact that most of IE's current problems stem from legacy code from when IE and all browsers were new and inexperienced. As people on the IE dev team have come and gone, parts of the code have been forgotten as to their original intentions and how they work with other segments/modules. Trust me, the IE source code is huge and confusing, and it wouldn't be fair to blame the current dev team on mistakes made by dev teams of the past. All of this information was provided to me by a credible source, and if you doubt its validity... well, I have no way to verify the information, since its about MS's intillectual property :)

    40. Re:Is this guy serious? by BlackHawk-666 · · Score: 1

      Shade, if you don't trust a guy to be working on your codebase, why are you letting them work on it? You can't grey out all the code, your leadership abilities should be enought to stop them from making random changes, your source control enough to recover from insane mistakes. Coding is a professional game, not an amateur one, don't let incompetants work on your codebase, don't even hire them in the first place.

      --
      All those moments will be lost in time, like tears in rain.
    41. Re:Is this guy serious? by jez9999 · · Score: 1

      In the begining (1954, according to my O'Reilly poster)
      What the hell are you doing with that poster in your house? And, are you sure it didn't say that in the beginning was FOX?

    42. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      wheel

      I'm filing a patent right now!

    43. Re:Is this guy serious? by BlackHawk-666 · · Score: 0

      Shit, I don't know about you, but I spend most of my time writing code in languages, not writing languages. So what if a parser is moderately difficult to write, it's written once and that's that. Why make it easy for the 0.01% of programmers who code parsers, instead of the 99.09% who *use* that language?

      --
      All those moments will be lost in time, like tears in rain.
    44. Re:Is this guy serious? by iabervon · · Score: 1

      It makes a lot of sense to have a standard parser which will give an AST for a language (or a class of languages, if given a DTD-equivalent for the language). On the other hand, producing XML for it just means you have to reparse the XML. A better idea is to have something which acts like an XML parser except that it takes in a programming language instead of actual XML.

      I keep expecting this to show up in Java. I mean, there's a Java parser that javac uses, and it is used separately by javadoc, and even exports some of the content for use in javadoc extensions, but you still can't call it to just parse a file for you. It's much harder in C because the preprocessor and the parser don't use the same tokens, meaning that the parser's view of the code may have little in common with the programmer's view (while the preprocessor's view, which matches the programmer's view, isn't very useful).

    45. Re:Is this guy serious? by interiot · · Score: 1
    46. Re:Is this guy serious? by mikael · · Score: 1

      It seems some people are desperate to do anything to avoid actual implementation (work?),

      That reminds me of an industrial placement (intern) student we once had. His career goal was to become a a systems analyst, so we asked him to write a simple application plugin to process some third party data. Oh sure, he wrote a very concise specification for management approval in Microsoft Word, presentation summaries in Powerpoint, wrote all the class definitions in the header files, function implementations in the source files, along with well commented file headers. And inside each function?

      // TODO: Implement this - see specification

      Twenty neatly commented and documented source files of nothingness

      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    47. Re:Is this guy serious? by Curtman · · Score: 1

      most of IE's current problems stem from legacy code from when IE and all browsers were new and inexperienced

      But Mozilla/Firefox evolved from Netscape which has been around since the very early days as well. If they've got code-rot problems then perhaps they should just move toward a Gecko wrapper, and put their team to work making new themes or something. *grin*

    48. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      I think a lot of people fail to comprehend the value of a using XML in certain situations because they have not really tasted the true power of xpath.
      This ties in to the 'standardized parser' argument above.

      I for one *really* wish I had an OO language which used an XML syntax. I want to be able to transform my source code into other representations... with traditional languages, I have to know gory details about the parser etc.. with XML-syntaxed languages, I could write anything I need in a simple XSLt program.

      Yeah, you can do any of these things in other languages, but you wouldn't want to... and you'd probably reinvent XML in the process.

      Enhanced change control is another great reason. With an XML syntax, my change control product can tell me what *methods* have changed, rather than what *files* have changed. Certainly you can do that with other languages, and people have, but it requires your change control software (cvs etc) to have intimate knowledge of your programming language. With an XML syntax, it would be easy to do a 'best guess' or provide a standard whereby languages could flag methods etc.

    49. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      OMG its the COBOL nightmaere all over again!

    50. Re:Is this guy serious? by n6mod · · Score: 1

      You didn't look at that poster very carefully, did you.?

      Postscript owes a LOT more to Forth than to Lisp.

      --
      You have violated Robot's Rules of Order and will be asked to leave the future immediately.
    51. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      why is there this surge in interest for pointless layers of abstraction on top of the code?

      Because there are more things now that need to be coded than there are people with intelligence enough to code them in C, Fortran, or Ada. C or Ada for systems programming, Ada/Spark for proving code correctness, and Fortran 95 (surprisingly nice, if you've still got Fortran 66/77 tucked into your mind) for scientific coding.

      If you're not smart enough to do it in C, do it in Python instead! Never mind that Python has become a bloated caricature of itself, and is completely unsuitable for most problems, use it anyway!

    52. Re:Is this guy serious? by CrankyFool · · Score: 1

      The problem is that XML is just so damned attractive.

      I speak as one of the damned -- one of the first major tasks I undertook at my current position was to write an extensible testing framework. One of the requirements I wanted to adhere to was that the users of this framework should not need to know how to program in our preferred language (Python). XML seemed like an obvious solution -- hey, just write an XML file, feed it to my framework, and Good Things Will Happen[tm]! XML's an obvious choice since it's so easy to parse it (well, given the right language built-in stuff, which Python has) and you can make it be really nicely structured and stuff, right? RIGHT?

      The framework, overall, has been a great success. Originally, I wrote it just for my project, but it's been flexible enough that other projects are using it. But a few weeks ago, I had a conversation with the other QA people here -- all of whom are fluent programmers (and likely wouldn't have been hired otherwise) and I believe the sentence most representative of that conversation was "So ... if I hate writing XML, and you hate writing XML, and everyone else seems to hate writing XML, why the hell did we write this to take XML input?" Add to that obvious issue the fact that we were looking at XML and starting to write A PROGRAMMING LANGUAGE in it. How do we do loops? How do we do variable assignments (Look, ma, I came up with <globalvariable> and <localvariable>!)? HELLO, XML IS NOT A PROGRAMMING LANGUAGE. Not to mention Guido's already come up with some nice-looking language syntax. Perhaps we should just use his ideas.

      Umm.

      Thankfully, as it is, you can use the framework, mostly, without knowing having to use XML (you can just import the classes and play with them directly), but as soon as I get around to it, I'm going to refactor the bejeezus out of it and make XML entirely optional (I don't want to drop the XML stuff -- it can be just a thin layer of translation, and I've got a bunch of test cases already that I don't want to have to rewrite).

      I think I shall classify this as "That mistake I made once, but never again"

    53. Re:Is this guy serious? by astebbin · · Score: 1

      I never said IE was better than Netscape, I just said that IE had bad legacy code issues... but yeah, had Netsacpe not been stomped out by Bill & Co., it would doubtlessly be the browser that we'd be using to browse /. at this very moment. Because if IE hadn't killed of Netscape, there'd have been no reason to have a Firefox in the first place ;)

    54. Re:Is this guy serious? by mikael · · Score: 1
      becomes something like:

      (if (< (field age (record)) (threshold))
      (body
      (release (record))
      )
      )

      Better still replace the curved parenthesis with curly parenthesis and use infix notatation. We could also use the . to access object fields and functions();

      And use ; to terminate expressions

      Then it becomes:

      {
      if ( record.age < threshold )
      record.release();
      }

      I believe I may have read about a similar language somewhere in the national museum of ancient programming languages. I'll have to go through my history books for that one.
      --
      Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
    55. Re:Is this guy serious? by ggambett · · Score: 2, Funny

      I'm dying to know what the other 0.9% of programmers do!!!

    56. Re:Is this guy serious? by interiot · · Score: 1

      I excluded Forth because 1) Forth and Postscript are extremely similar as you note, and in terms similarity-to-Lisp, they're pretty much identical, so I just left the middle out, and 2) Forth lacks garbage collection, making it actually extremely cool for embedded applications, but IMHO, since we've had GC for a whole 46 years now, unless you're doing embedded/OS work, I'd prefer to just ignore such languages. I'm a GC-bigot, sue me.

    57. Re:Is this guy serious? by Curtman · · Score: 1

      I never said IE was better than Netscape, I just said that IE had bad legacy code issues

      I never said you did..

      Because if IE hadn't killed of Netscape, there'd have been no reason to have a Firefox in the first place

      If IE hadn't been bundled with Windows it never would have achieved the success it did. The only thing it has going for it is that it can't be uninstalled.

    58. Re:Is this guy serious? by Jerf · · Score: 1

      A better idea is to have something which acts like an XML parser except that it takes in a programming language instead of actual XML.

      Which would make it an XML parser.

      (Think about it. Think about what makes a parser, and make sure to separate "syntax" from "semantics" in your head, which is hard work.)

    59. Re:Is this guy serious? by Jerf · · Score: 1

      Why make it easy for the 0.01% of programmers who code parsers, instead of the 99.09% who *use* that language?

      Because it's those .01% of the programmers making our lives easier, indeed, even possible. If you don't support the guys writing the languages you work in, it will never be easy for the 99.99%. Does everything have to have a global payoff?

      To concretize this point, your "insightful" argument applies 100% identically to Bison and yacc et al. Do you seriously think 99.99% of programmers would be better off without them? No, they'd be worse, because the tools those programs enable either wouldn't exist or would be of a lower-quality due to being "one-off" POSs.

      Besides, think about what you're ultimately saying: "It won't directly benefit me, why the hell should it benefit anyone else?"

    60. Re:Is this guy serious? by nebaz · · Score: 1

      The only time I've seen XML helpful is in a config file that is non-"property" formatted, where properties need to be edited by hand. Sure some other config file type could be used, but the xml in this case was human readable, and modification of the config file easy.

      --
      Rhymes that keep their secrets will unfold behind the clouds.There upon the rainbow is the answer to a neverending story
    61. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      In the begining (1954, according to my O'Reilly poster) was Cobol.

      Check yer poster, it says Fortran in 1954 (which actually seems to have come from A-O), COBOL "flowed" from B-O and Flow-Matic.
      And I have to agree with the poster that Postscript emerged fairly directly from Forth. What is an amazing language (it is interesting to see that relatively many languages are basically one person's vision - Forth, Pascal, Perl, Ruby, Python, APL, D, SmallTalk, C (two people), SNOBOL (3 people), etc

      More here

      If people want pragmatic design of languages, I like the author of D he designed and wrote C/C++ compilers and realizes that programmers often just want to get things done w/out the language getting in the way.

      Another thing to contemplate is how few organizations the most useful languages emerged from - Bell Labs, IBM, the US Military, US Universities...

    62. Re:Is this guy serious? by rgmoore · · Score: 1
      But Mozilla/Firefox evolved from Netscape which has been around since the very early days as well.

      Not really. The Mozilla developers decided that the old Netscape codebase was so awful that they threw most of it away and started over from scratch. That's part of the reason that Mozilla took so long to reach 1.0, but also explains why it's developing so much faster than IE today.

      --

      There's no point in questioning authority if you aren't going to listen to the answers.

    63. Re:Is this guy serious? by TheGavster · · Score: 1

      No, this is a format for display. When you compile, I presume that the tagging is ripped out so it can be fed into a compiler. The idea is that if you prefer:

      void myfunc { //code
      }

      over:

      void
      myfunc
      { //don't laugh; I've had to deal with it
      }

      then it will be displayed that way (and consistently). Of course ... it kind of presumes that you don't make any syntactic errors. Just think a really fancy syntax highlighter, with buzzwords in it.

      --
      "Because Science" is one step from "Because old book". Try "Because of my experiment testing my falsifiable assertion".
    64. Re:Is this guy serious? by wirelessbuzzers · · Score: 1

      A couple friends and I were working on an Objective-C to Objective-Caml bridge, to enable Mac OS X-native applications to be written with O'Caml components. I hacked up in a day or two a working bridge core that's independent of header files, but to get reasonable performance and nice syntax out of it, I or one of my friends would have to either modify the O'Caml parser (which is possible through CamlP4), or better, write an Objective-C parser to generate per-class glue and O'Caml modules.

      We were doing it for fun, not for a job... and we decided that the performance and syntax of the independent bridge were too terrible for most purposes, and the complexity of writing even a C parser wasn't worth the effort, nor was stripping out gcc's parser. So it didn't get done.

      If instead of Objective-C it had been XML or Lisp, any one of us could have done it in a weekend or two.

      --
      I hereby place the above post in the public domain.
    65. Re:Is this guy serious? by FireBreathingDog · · Score: 1
      Some companies on the other hand try to give us proprietary binary data streams over tcp or incremental relational data dumps over TCP. Guess which i prefer.

      Hmmm...let me see...the proprietary binary data streams over tcp or incremental relational data dumps over TCP?

    66. Re:Is this guy serious? by tomhudson · · Score: 2, Insightful
      Well, some xml fanboy must be pissed to mod the parent as a troll ... but xml has some serious flaws in respect to data representations for code.

      Try to modely objects and their instances in a multiple inheritance hierarchy in xml w/o getting REALLY redundant.

      xml is for people who think that multiple inheritance (think C++) is a mistake (they prefer single inheritance a la delphi or java - both of which then had to add mechanisms to work around the flawed single-inheritance model).

      Me, I'd rather go back to coding in assembler than try to fit everything into an xml world (can you imagine representing assembler mnemonics in xml? What a waste of time).

    67. Re:Is this guy serious? by vegetasaiyajin · · Score: 1

      There is no such thing as XML goodness. XML is a stupid idea from stupid people who sell it to other stupid people. I have never once encountered a situation where there was any need to encapsulate data in XML in which the gains in flexibility weren't outweighed by the problems of unnecessary bloat and additional complexity in maintenance.

      I mostly agree with you. However, I have used XML together with data binding tools for complex configuration files. There might be some other uses, but it sucks for almost everything else, including simple configuration files.
      Especially crappy is the atrocity known as XSLT. There are many other better, more understandable technologies for achieving the same result.

      --

      My heart is pure, but make no mistake, it's pure evil
    68. Re:Is this guy serious? by rawgod0122 · · Score: 1

      That is really awesomely funny... but it scares me. :)

    69. Re:Is this guy serious? by putaro · · Score: 1

      Another thing to contemplate is how few organizations the most useful languages emerged from - Bell Labs, IBM, the US Military, US Universities...

      Well, two reasons for this.

      1) There aren't that many useful languages so there can't be that many sources.

      2) Most of the languages that we use have their roots prior to 1980. Prior to 1980 there weren't many computers you could just mess with outside of those kinds of institutions. Businesses didn't encourage you to mess around developing new languages and it was hard to even get information about computers if you were outside. I was interested in learning Pascal when I was in high school in the early '80's. I think the San Francisco public library had one book on it.

    70. Re:Is this guy serious? by tomhudson · · Score: 1

      Poster wrote:

      Enhanced change control is another great reason. With an XML syntax, my change control product can tell me what *methods* have changed, rather than what *files* have changed. Certainly you can do that with other languages, and people have, but it requires your change control software (cvs etc) to have intimate knowledge of your programming language. With an XML syntax, it would be easy to do a 'best guess' or provide a standard whereby languages could flag methods etc.

      If you're that worried, put each method or function in a file of it's own (use directories as appropriate to help reduce clutter), and the MTIME of each file will tell you when it was last changed. No need for a "best guess" then.

      Each file could then also be its own change history:

      #ifndef THIS_FILE_H
      #define THIS_FILE_H
      int foo(int a, int b) { /* DATE: 2004-01-14
      if (a>b)
      return a;
      return b;

      */ /*DATE: 2004-01-16 */
      a>b? return a: return b;
      }
      #endif // THIS_FILE_H

    71. Re:Is this guy serious? by ComputerSlicer23 · · Score: 2, Interesting
      You've never ever had to deal with an external company to get data have you? I deal with thousands (literally thousands). We have defined our own CSV format. Of which in the end, we have had to accomodate about 4-6 variations of it depending on the type of CSV (gotta love CSV, there are different variations on how to encapsulate/esape comma's and quotes).

      Then there are the 100 (it's probably closer to 250 formats, of which only 100 are still being used) other formats we accept in. Most of them had to be manually reverse engineered. We are exporting data out of a third party software. The people on the other end of the phone didn't write the software, they don't know how the software works. So we get to deduce all of that from them.

      The 10th time you come across a variable length record file, where the sample didn't have all of the record types that exist, you'll be more then a touch peveed about it. Okay, so *K records are 432 bytes, *M records are 345 bytes. Aggg! I've never seen a *I record before. Whoopie, I get to go add one line of code recompile and deploy the software to overcome the lack of file documentation. You'll think to yourself, you know, if this was in XML, I could just skip this whole sub-tree. All the data I need, I've already found, so just clue the parser in to read to the end of the data, and I'll start on the next record.

      In the end, I'm much rather throw a bit of RAM and some CPU at the problem and teach the software the semantics it needs to know to read XML DTD's to figure out how to extract data, instead of trying to reverse engineer a binary file format (gotta love people who use file formats for export but forget that Endianness exists so the same file format isn't portable across platforms). Figuring out the parsing of each file type is the part that is time consuming. Once you get the actual state machine to parse the data built, it's cake to actually extract the information I need.

      There's a reason everyone documents a file format. Why not just use a general case one until you see that there is in fact a speed problem. 90% of the time, speed of parsing the damn data, and the storage overhead it incurs is minimal relative to the amount of resources wasted dealing with writting efficient parsers for each file type. The documentation and validation of the data is built in to XML (yeah, no more error detection of the system that are newline oriented, and the input system accepts carriage returns in the fields, or just corrupted on particular row of a huge CSV file). The file format is well maintained and can express all data desired (I've seen more then my fair share of file formats that if you put the delimiter in a datafile, it won't bother to escape it, I love those).

      Just like I've learned to love the STL. The STL is better, faster, more memory efficient, and well organized then any code I'll probably ever write in my life. Your arguments sound very similar to the idiots I see expousing how they can out do the STL, right up until I make them benchmark their code against the most naive STL implementation you could imagine of their code.

      I'm fairly sure the same is true of the XML parsers. Sure the files themselves are overly verbose. However, barring just ludicrust constraints (either enormous files, or really limited resources on the device), does it make any difference?

      I'd never use XML internally to transport data around (in that case your arguments make some sense). My problem, is that there are thousands of people who might want data from me. I'd much rather use XML and tell them to use a stock XML parser then give them the EBNF to read my and some sample Lex/Yacc on how to process it. I would provide an XML export to any third party who wanted one. It'd be extremely simple, and it'd solve a ton of problems for me if I could just send and recieve data in XML. I'd have saved several man years here at my job if everyone who handed me data did it in an XML format. Sure, I'd have to have spent $5-10K extra on CPU and drive space (given that I've spent on the order of $250K-$500K it would have been no big deal).

      Kirby

    72. Re:Is this guy serious? by phasm42 · · Score: 1

      Java uses multiple interfaces instead of a multiple inheritance system (which leads to conflicts when the two inherited classes both override one function). The Java model is not flawed, it's cleaner.

      --
      "No one likes working in a hamster wheel, and your shop smells of cedar shavings from here." - TaleSpinner
    73. Re:Is this guy serious? by n6mod · · Score: 1

      Postscript has GC?

      I did a little hand-coded PS, but that was 20 years ago now.

      --
      You have violated Robot's Rules of Order and will be asked to leave the future immediately.
    74. Re:Is this guy serious? by ComputerSlicer23 · · Score: 1
      Well, I guess I'm not seeing the problem with modeling it. It shouldn't be that hard, you can represent the heirachy fairly straightfowardly in an C++ parse tree. It should be blazingly obvious to convert the C++ parse tree into XML for how to store an instance. (Which either still has the problem you describe, at which point, I'd guess it is a flaw in C++, or you have a natural non-redundant XML representation). It could be that getting teaching a datatype how to serialize itself at runtime doesn't naturally lead to encapsulating itself that way, but that is the obvious way that the XML should be structured.

      As an aside, I've seen very, very few cases where Multiple inheritence that wasn't of the "virtual base class that defines only methods" (a rough description of Java's single inheritance + the "Implements" model) type that made much sense. Multiple inheritance was fairly vile for a long time, especially before C++ was standardized. Personally, I never ever use it (for the problems I work on it's not terribly natural). Almost always, I can use templated derived classes, or implement some functionality in helper functions up and down the class hierachy and then pick the functionality I want in the classes you can actually create instances of. That generally eliminates all the uses of multiple inheritance I see people use, and makes the code easier to maintain (I've generally found that if you can eliminate multiple inheritance you have simplied the API and programming model, which is uniformily a good thing in my experience).

      Maybe I spent too much time writting Objective C, and just got used to designing code with Protocols, and single inheritance in my former life.

      Kirby

    75. Re:Is this guy serious? by Curtman · · Score: 1

      Regardless of what has been rewritten or why, the fact is that it has been done with Moz/Gecko, and remains to be done with IE apparently.

    76. Re:Is this guy serious? by complete+loony · · Score: 1

      Why not let the 0.01% write a code parser that outputs some XML format? then the rest of them can write simple XML parsers to check the code for different types of problems (remember y2k??).
      I think that's what the grandparent was suggesting. I'm not saying it's a brilliant idea, but it might be a useful abstration in a small amount of programming tasks.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    77. Re:Is this guy serious? by Unknown+Lamer · · Score: 2, Informative

      The original Lisp system didn't have a GC. See Communcation of the ACM, Vol 3 Issue 4 Page 184 "Recursive Expressions and Their Computation Machine, Part I" (McCarthy).

      The original Lisp had both S- and M-exps. It was a bit different than the Lisp we know. The important part is that it didn't have GC until later.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    78. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      One function per file? I think using an XML syntax language is a much simpler proposition. Plus, if you want to isolate changes further (perhaps within a loop inside a function) you would have to put *parts* of your function in a separate file.

      Yeah, you could do what you are talking about, but then you'd have to write a bunch of kludgy scripting to group your files containing the methods for a particular class... and from there it would just get worse.

      No... a language which anybody can parse with pre-existing tools is a great idea... I think it would blow the market for compilers, languages, and development tools wide open, making such software quick and easy to develop, without losing power.

      Worst case scenario, for each language, you could write a converter using whatever random parsing scheme used by that language... for example:
      void do_nothing(int c) {
      c;
      }
      would become:

      c

      or something like that...

    79. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      feh... slashdot stripped my XML tags... yay.. :-)

    80. Re:Is this guy serious? by coma_bug · · Score: 1

      It seems some people are desperate to do anything to avoid actual implementation (work?)



      People are avoiding not just work but also the effort of learning anything substantial (and therefore difficult). It is easy to learn this sort of fluff; it is not quite so easy to learn some interesting languages designed to solve real problems.


    81. Re:Is this guy serious? by x_codingmonkey_x · · Score: 1

      I, for one, welcome our very long method name calling overlords. *ducks*

    82. Re:Is this guy serious? by That's+Unpossible! · · Score: 1

      We just get the added bonus that the "compiled" code is not actually compiled

      Well, umm my C++ code is not compiled either. Until I compiled it into a program. I tend to like editing C++ code directly, not in binary. How is this any different? It is just storing your code in a different format.

      and is stored in the most padded verbose unreadable format that could reasonably be arranged?

      Unreadable? By whom? XML is designed specifically to be a format for storing structured text in a way that makes it (a) eXtensible, (b) easy for programs to parse, and (c) compatible across platforms that know how to read a schema.

      They are not trying to get you to program in XML here. I think the point is that they are decoupling the view of how your code looks to you from the logic behind it. This seems like a cool idea.

      Doesn't sound like a vast improvement.

      Unlike you, I will wait to see it in action.

      --
      Ironically, the word ironically is often used incorrectly.
    83. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      It's called university, my friend. When a domain reaches a certain point of maturity and ease-of-entry, and a lot of the hard work has been done by the pioneers, there's not much left to do. Instead of relaxing and enjoying life, people have this lunatic desire to work even harder than before, even though we are surrounded by machines and technologies that are called "labor-saving". Instead of saying 'that's enough', we make things ever more complex. Good thing too, what else can we do with the millions of kids in university?

    84. Re:Is this guy serious? by Mr.+McGibby · · Score: 1

      1982 brought us Postscript. It's new! Exciting new syntax. Well, okay, Lisp thought of it first.

      Postscript was designed so it could be implemented on underpowered processors in printers, not because it's a great language. It's a comprimise. As a language, it really isn't that great.

      --
      Mad Software: Rantings on Developing So
    85. Re:Is this guy serious? by Tablizer · · Score: 1

      Now, as LISP has shown, programming straight to the AST, while it has its advantages, is a historical loser.

      Lisp fans should rework a Lisp parser to use angle brackets instead of parenthesis, and then tell PHB's that it is XML, an in-style buzzword. That is how you get it thru the door.

    86. Re:Is this guy serious? by oliverthered · · Score: 1

      Ever tried to program in visual basic?

      'coding' in xslt isn't too bad, and sometime's it's really useful, jsut look at struts.

      --
      thank God the internet isn't a human right.
    87. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      Why is this modded up? Jedidiah didn't RTFA and misunderstood the point entirely, and you idiots modded him up to +5 insightful?

      Right, I must be new here.

      Sigh.

    88. Re:Is this guy serious? by SunFan · · Score: 1


      It's just proof that the good ideas never die, but that people will always come up with stupider syntax for them.

      (yes, I know what I misspelled, spelling trolls)

      --
      -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
    89. Re:Is this guy serious? by SunFan · · Score: 1


      I just remembered a scheme compiler from one of my textbooks. It was one page of code, written in scheme.

      --
      -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
    90. Re:Is this guy serious? by Duct+Tape+Pro · · Score: 1

      write more languages to overwhelm the .01% who write the parses for them?

      --
      i hotdog.
    91. Re:Is this guy serious? by xgamer04 · · Score: 1

      (Missing excerpt from the bible)

      And on the seventh day, God saw that the humans couldn't handle one label used to describe two things, but he was tired, so he said "aw, screw it", and he saw that it was okay...

      --
      When you look at the state of the world, how can you not become a radical, liberal anarchist?
    92. Re:Is this guy serious? by killjoe · · Score: 1

      If you were coding in java you'd of course have to say it three times or so.

      SomeType mySomeType= (SomeType) someOtherThing.makeSomeType()

      It's no use just saying it once you know.

      --
      evil is as evil does
    93. Re:Is this guy serious? by killjoe · · Score: 1

      Or

      Those that don't know lisp are doomed to reinvent it (poorly).

      There was no need for XML. We already had lisp.

      --
      evil is as evil does
    94. Re:Is this guy serious? by Anonymous Coward · · Score: 1, Funny

      Now that's just being silly. Good XML style would write code like this:

      <instruction opcode="100000">
      <source_register_1>00100</source_register_1>
      <source_register_2>00101</source_register_2>
      <destination_register>01010</destination_register>
      </instruction>

    95. Re:Is this guy serious? by QuantumG · · Score: 1

      No, what we're talking about is the fucking article which you didn't even bother to read. You're that asshole who used to come to philosophy class and rant for 40 minutes before the tutor said "dude, did you even do the required reading or what?" Now fuck off, and that goes double for all you other assholes who didn't even bother to read the article yet have plenty to say about how ugly XML syntax is. If you don't know how a compiler works, you are not qualified to have an opinion on this story. If you don't know what you're talking about, shut the fuck up. I hate having to scroll through 400 uninformed comments to find the 5 people who actually bothered to read the article and have done any compiler development in their entire life.

      --
      How we know is more important than what we know.
    96. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      Yes, PostScript has garbage collection.

    97. Re:Is this guy serious? by m50d · · Score: 1

      No, if it is de-compileable then that is a huge advantage. I'd love to be able to get a program and edit its source in whatever language I choose. As someone else said, if it's really idiomatic perl it won't work, but most straightforward programs can be done in every language. If I get a Java program and can edit it in Python, that's much more enjoyable for me. If I get a C program and can edit it with the Python code structure, all the code the same but indentation showing grouping and no semicolons, that's still a lot more fun for me. This could mean that everyone can write their own programming language, suited to what they like doing, and use it on every program they work on.

      --
      I am trolling
    98. Re:Is this guy serious? by QuantumG · · Score: 1

      Well done. You have posted the only sensible useful comment to this story that I have found (and I'm reading every one of them). The whole story is about standardizing the internal representations of a compiler and other source manipulation tools. Hopefully those of us who develop these kinds of tools can learn to talk to each other better than the majority of morons who post on Slashdot.

      --
      How we know is more important than what we know.
    99. Re:Is this guy serious? by QuantumG · · Score: 1

      A build tool could recompile things on a function by function level, even a tree-node by tree-node level instead of these obscene chunks we call "files". It would even be possible for todays computers to compile the code as you are typing it in. That way when you execute the app to debug it you would have a zero-second delay before it started. This can already be done with some languages in some IDEs, but it should be able to be done with all languages!

      --
      How we know is more important than what we know.
    100. Re:Is this guy serious? by QuantumG · · Score: 1

      Wow that's a great idea! Maybe then we could have a smart editor that shows you a class view of your project and when you double click on a method you'd open that one file. Genius! Oh wait, this is a god damn big hack which doesn't address the fundimental issue that the editor, change control and build tools don't understand the language, even though we've already written parsers for all our languages and the only thing that is missing is a common exchange format for the AST.

      --
      How we know is more important than what we know.
    101. Re:Is this guy serious? by Anonymous Coward · · Score: 0
      You still have semantics to deal with, but we're a ways from being able to standardize those.

      No we aren't, its just to hard for non-specialists to understand the standardization. If you want to read about the most common way currently to standardize semantics, read up on operational semantics.

      For studying, I'd recommend the chapter "Structural Operational Semantics" by L. Aceto and W. Fokkink and C. Verhoef, published in "Handbook of Process algebra", editors J.A. Bergstra and A. Ponse and S.A. Smolka, Elsevier, 2001, ISBN 0-444-82830-3.

    102. Re:Is this guy serious? by Viol8 · · Score: 1

      "Because it's those .01% of the programmers making our lives easier, indeed, even possible. If you don't support the guys writing the languages you work in, it will never be easy for the 99.99%. Does everything have to have a global payoff?"

      Don't be an ass. Thats like suggesting all roads should be made out of cobbles because , hey , its a lot quicker to build them then but people can still drive cars along them (ok , slower , but who cares right? The road builders are having an easy life now)

    103. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      What's the hardest part of that task, that shouldn't be hard? Parsing the Java code. I mean, it's not like it's impossible for someone skilled enough to even consider writing such a tool in the first place, but it is a legitimate challenge; it's very easy to get 90% correct but that last 10% can be a bitch.

      How does XML make the "last 10%" any less of a bitch? All you're doing is taking a parse tree and translating it from a usable binary representation to a human unreadable format, and then you're going to parse that, feed it into DOM and get... another binary representation!

      What have you accomplised besides making the last 10% 10 times harder?!

      And let's not even talk about trying to parse Perl.

      XML doesn't solve that because part of Perl is eval. There is no sense converting my Perl source to XML if it says:

      <function-call name="eval" parameter="raw perl code here" />

    104. Re:Is this guy serious? by lachlan76 · · Score: 1

      Lisp! ;)

    105. Re:Is this guy serious? by Tarwn · · Score: 1

      Unfortunatly, that may not be the case. Take, for example, Microsoft's XAML that is a more complex markup langauge than standard HTML. They are basically going to use this as the foundation for how UI elements are defined/made/etc in Avalon. Granted it is not an actual programming language, and it will act similarly to ASP.Net with HTML and it's extra bucket of XML tags (asp:Label, etc), but I can't help but wonder how long it will be until they bundle in common functionality as extra attributes (like click events and stuff, but without the Javascript/VBScript fallback in HTML).
      XAML will basically be a compileable interface layer for any code you have embedded inside CDATA sections or behind the scenes in a C# class or the like.

      My point is that, though XAML is not what I would specify as a programing language, it is typed in XML (though with MS it will probably be drag and drop and put useless line breaks all over the place as well as replace any compliant tags with non-compliant versions). If MS can do it, I'm sure it won't be long before someone else does.

      Do I think XAML and it's ilk have a future? Yes. Being able to define displays in a common language that is parseable and at least partially open (since it is all text ad they can't very well tell us to imagine the interface without putting down tags) is handy. I doubt it will be very long before other interface "languages" become common for other platforms.
      Do I think writing "programs" will happen in XML? No, not even approaching the level of early VB. In order to create an XML based programming language that is as simple as lining up your object hierarchy, etc (not just wrting code with tags), someone will have to write all the chunks of code that go behind every tag call. And yes, I know that happens now, but think about how much more highly the limitations will be when you have a tag-based language that will invariably end up with drag and drop displays. At it's best I think I could see it being a glorified scritping language, at it's worst a programming language that has nothing to do with programing, where each tag you drop is a small process that has nothing to do with programming concepts but instead represents several lines or paragraphs of code.

      Then again, I coudl be wrong. Perhaps someone will make a useful language based on XML. Maybe programmers will flock to it in the millions despite the existence of languages like Lisp (just keep tacking on parans till it works). I somehow doubt it. Give me a } anytime to close a function.

      -T

      --
      Whee signature.
    106. Re:Is this guy serious? by mattpalmer1086 · · Score: 1

      Yeah... and I've heard the same arguments advanced about why it's so great that xslt itself is also encoded in xml - so you can automatically transform it using more xslt technology. How recursive! How uber-geeky!

      I suppose it's one way of getting around limitations in the abilities of xslt itself, at the expense of making what it does even more utterly opaque.

    107. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      I agree.

      I've played around a fair bit with Mathematica, which allows you to view a mathematical expression in either a code like format (ie. all ascii), or in a traditional format (matrices appear as || delimited values, divisions appear as a fractions, etc.) - it makes it a lot easier to view the maths notation in something we're all more familiar with.

      Now I work in the games industry (on imbedded systems, so no coprocessor for us ;) so we often have to take a bunch of matrix concatenations, maybe combined with euler angles, etc. and produce a formula that's as simple as possible. I'd love to have a compile-time traditionally-viewed math/simplification library for example. How you arrived at the solution is just (sometimes more-so) important than the solution itself. Or plug-in a state machine visualisation tool straight in our code for our AI (perhaps even inter-operating with it), etc.

      But the main advantage is when looking at someone elses code. Each time we decide to use someones library we have to wade through their header files. If you've seen a header for propietary GPUs, they are often a mangled mess of #defines that compile out to the microcode their GPU uses. I would love my compiler to have the knowledge of which bit of the header file is the interface and only show me those relevent parts. If I want to delve into it I can right-click and see what it's doing internally. Makes sense.

      This is something that is easier in C++, unless of course, for speed reasons you end up using templates. Then you have a file filled with multiple interfaces that should actually be private to the client, and specialisations that are actually thin wrappers for external assembly routines - eeeew. Never mind that fact that I usually only have a VERY short amount of time to integrate any of these libraries - I need all the information available straight away :(

      These are all things that would be possible with a more verbose source file format - it's not about smarter compilers, it's about smarter IDEs.

      This is all regardless of whether this is written in XML of course. Something human-readable, sure (We already have to read what #defines are doing so I wouldn't be surprised if we had to delve into what the IDE is doing too). And you can still diff, etc. human-readable text. We've used XML for our all the entities on our maps before (any text-style file would be suitable). And the beauty is that if something isn't supported by our editor, it's quite easy for a programmer to do a regexp search'n'replace for our artists.

      I'd love to say that I want all this because I'm lazy (as is usually pointed at programmers wanting new features in their compilers/IDEs ;) but the truth of the matter is that I have to do this because our project timelines don't allow us to muck around.

    108. Re:Is this guy serious? by maxwell+demon · · Score: 1
      They are not trying to get you to program in XML here. I think the point is that they are decoupling the view of how your code looks to you from the logic behind it. This seems like a cool idea.

      Actually I prefer if the view of how my code looks to me is coupled strongly to the logig behind it. That is, I want to see the logic, instead of having to figure it out the hard way.

      I guess that XML stuff could even get into a security risk, if you could convince the editor to show things differently that the compiler sees that (if the editor supports CSS, then just <statement style="visibility:hidden">(malicious code)</statement> will be enough; but I guess damage could also be done if the XML information says something different than the actual program). That is, you read the code in your editor, it looks safe, you compile and run it, and you lost, because the actual code was not what you've seen.
      --
      The Tao of math: The numbers you can count are not the real numbers.
    109. Re:Is this guy serious? by heretic9 · · Score: 1

      Easy...

      <array type="bit-array">
      <bit n="1">1</bit>
      <bit n="2">0</bit>
      <bit n="3">0</bit>
      <bit n="4">1</bit>
      <bit n="5">0</bit>
      <bit n="6">1</bit>
      <bit n="7">1</bit>
      <bit n="8">1</bit>
      <bit n="9">0</bit>
      <bit n="10">1</bit>
      <bit n="11">1</bit>
      <bit n="12">1</bit>
      </array>

    110. Re:Is this guy serious? by RulerOfCardboard · · Score: 1

      Using XML this way makes more sense in a functional language like Scheme or LISP. It becomes completely reasonable to have a document like:

      In fact, there are already XML tools for Scheme that will parse XML directly into Scheme lists and back again.

      --
      --Andre
    111. Re:Is this guy serious? by the_mad_poster · · Score: 1

      You completely missed that statement in there about the problem being that people don't document their data transfer models, didn't you?

      Explain to me, please, how a tagged system is any better than a smaller, simpler format that is properly documented? It's not like you don't have to write the DTD to explain the XML that explains the data. How is that any different than having to write a small app to parse the config file that sets the data? I really fail to see what the allure of XML is over any other documented format.

      What really aggravates me, however, is the morons that want to make "XML Databases" and "XML Language Modeling" and all other manner of assinine things that can have "XML" prepended.

      --
      Alito: A vote for Alito is a punch in the eye to put that bitch back in her place!
    112. Re:Is this guy serious? by Anonymous+Brave+Guy · · Score: 1
      You've never ever had to deal with an external company to get data have you?

      I have, and as a result I know that if your project is trying to read a data file without a clearly specified format then nothing will really help. Sure, in XML you can skip to the end of the enclosing tag block if you don't recognise a tag, but what if the information in that tag was actually critical to the meaning of the other data, and you've just silently ignored it? The problem is the unclear requirements, and the only acceptable fix for that is to clarify the requirements.

      If your customer can't do that, well, that's what time and materials contracts are for. You write the code so you can change that one line and rebuild if and when it becomes necessary, and they pay you to do it if you have to. If you need to research some more on their behalf, they pay you to do it. They'd have exactly the same problem if it were some critical XML tag that was missing/misunderstood.

      Just like I've learned to love the STL. The STL is better, faster, more memory efficient, and well organized then any code I'll probably ever write in my life. Your arguments sound very similar to the idiots I see expousing how they can out do the STL, right up until I make them benchmark their code against the most naive STL implementation you could imagine of their code.

      I'm a professional C++ programmer, and a strong advocate of using the best tool for the job, including various under-used parts of the standard library. However, what you wrote there is just way off the mark. The STL, as implemented in C++'s standard library (which is the only actual implementation of Stepanov's original concept in mainstream use, AFAIK) is a mess.

      The language lacks support for the functional programming concepts necessary to make it powerful, as a result of which most of the STL algorithms are glorified (and obfuscated) loops. Most of the advantages of using them as originally claimed are as illusory as the claim that OO designs allow extensive code reuse: in the real world, it just don't happen, boss. They have their place, but a lot of the time, it's easier just to write the loop, and you get cleaner code as a result.

      Similarly, there are fundamental and unnecessary limitations in the STL architecture. The explicit use of iterators where the concepts you really want are sources, sinks and ranges makes it almost impossible to support some data structures sensibly. Circular lists are a simple example that doesn't quite "fit" the system.

      In fact, the arguments against over-using the STL and the hype generated by the C++ in-crowd to support it are remarkably similar to the arguments about XML and its evangelists throughout this thread.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    113. Re:Is this guy serious? by bjk002 · · Score: 1

      Obfuscation through XML must be there goal. Obfuscation of their work that is... I see no other real purpose for XML in MOST real world enterprise apps. I cannot understand why someone would ever WANT to use XML for ANYTHING if they didn't HAVE to. Other than data packaging and in some instances SOAP implemetations for web services for delivery to INET consumers, XML is an effort in BLOAT. Even then, if you data is strictly for proprietary use, never to be shared with the world (which 90% of the products out there are), then I would never BLOAT my designs by implementing XML. What purpose does it serve? If you are not implementing SOAP for a multi-platform system, and you are not sharing your data with the world, it makes no sense to use XML AT ALL. Give me Beans or COM objects any day, easier to read, write, and understand. TYVM!!!

      --
      Opinion:=TMyOpinion.Create(Me);
    114. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      With the first version, you can convert it to any language out there with xslt. I know lot applications especially in the .net area are written in either vb or c#. And if you want to clip some code for your stuff, you have to run through a god awful converter or do it by hand.

      Why would the converters be any less godawful for using OMG XML!!!! as an intermediate format? Language conversion == unsolvable in the general case. That is a simple and provable fact. XML won't, indeed CAN'T, change it in the slightest.

    115. Re:Is this guy serious? by technomom · · Score: 1

      Meh.

      Seems like a lot of rework for IDEs to essentially solve a problem that is akin to rolling the toilet paper from the top versus the bottom.

      JoAnn

    116. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      choose. As someone else said, if it's really idiomatic perl it won't work, but most straightforward programs can be done in every language.

      Great. Show me your wonder-translator that can convert a recursive program into an iterative program for use in broken languages without tail-call optimisation?

      Oh, you mean it can't be done?

      But that means that a "perfect" 1:1 translation might introduce bugs, due not to differences of syntax, but to limitations in the underlying semantics of the language!

      Oops. I don't see XML helping there.

    117. Re:Is this guy serious? by Anonymous Coward · · Score: 0

      Which would make it an XML parser.

      (Think about it. Think about what makes a parser, and make sure to separate "syntax" from "semantics" in your head, which is hard work.)


      Uhh... no, it wouldn't make it an XML parser, any more than the fact that GNAT (the GNU Ada compiler) uses the same internal representation as G++ makes it a C++ compiler.

      You're the confused one. Think about what makes something XML as opposed to LaTeX or C++ source code, and make sure to separate "input" from "output" in your head, which is apparently hard work, though I've never had any difficulty doing it myself.

    118. Re:Is this guy serious? by schmidt · · Score: 1
      Parsing the Java code. I mean, it's not like it's impossible for someone skilled enough to even consider writing such a tool in the first place, but it is a legitimate challenge; it's very easy to get 90% correct but that last 10% can be a bitch.
      If I understand the proposal correctly, all editors would be required to parse the Java code, assuming the editor allows you to edit the code as it were Java instead of requiring you to enter the XML directly. So it really only moves the burden from the people who wants to manipulate their code as XML (whoever that is) to the people making editors.
    119. Re:Is this guy serious? by tomhudson · · Score: 2, Insightful
      The *big* deal is why any serious programmer would even *want* to be able to transform his code. I've got better things to do with my time.

      If I disagree with how someone else formats their c code, I can always pass it through a "pretty-print" filter, or write my own, so no big deal there.

      If I want to code using c-style or c++-style syntax and then translate it into, say, java, again no big deal.

      But to even think that any tool I use has to "understand" the language is wrong. The only tool that has to have an understanding of the language is the compiler for that language (and me - but I'm a "tool" too :-).

      All this will lead to is (even more) sub-optimal code, as people try to "leverage" the supposed value of xml.

      In other words, when coding, keep in mind the general case (for future expandability/maintenance), but always program for the specific case. This whole "store your code as xml" thing has NO benefits over the original source, which you can always shuffle around and manipulate as you see fit. If you want to store it as xml, you can always either write your own converter, or use one that someone else has written.

    120. Re:Is this guy serious? by microTodd · · Score: 1

      I wish I could mod you up +1000000000. This was my thought exactly.

      --
      "You cannot find out which view is the right one by science in the ordinary sense." - C.S. Lewis on Intelligent Design
    121. Re:Is this guy serious? by m50d · · Score: 1

      Why does it matter if there is no tail-call optimisation? OK, this technique may make your code a bit slower. Or even a lot slower. But it's worth it if you can program faster. But to answer the question, this technique means you can use any compiler for anything, so all languages now have tail-call optimisation.

      --
      I am trolling
    122. Re:Is this guy serious? by Jerf · · Score: 1

      Riiiiiiiiiiiight...... I'm not sure if I should recommend a good rhetoric course or reccomend you stay away from them.

      By the way, since you're such a "real man" and an ass, I'm banning you from using any tools other than an assembler from the 60s. You shouldn't take advantage of tools built that you don't respect the builders of.

    123. Re:Is this guy serious? by ComputerSlicer23 · · Score: 1
      No I saw it. Conceptually, you are correct. In order to solve Social Security, people should just save money. In order to solve homelessness, people with spare rooms should take people in. In order to solve viruses, no one should open mail from people they don't know. In order to solve the middle east problem we should just declare a rotating schedule of who get access to what religious sites. Wouldn't it be lovely if I could enforce my will on the world. I'd solve all sorts of problems quickly and easily.

      I hate to beat you with reality, but declaring "XML has nothing over a properly documented file format", is fairly akin to my above solutions. NASA worlds most anal retentive organization, has lots large amounts of data because they lost the documentation. I deal with lots of companies that didn't originate their data export. They have no control over it, and no documentation. There's nothing anyone involved can do about it (sometimes because the vendors are out of business, othertimes because the vendors feel that giving out their documentation for the export gives up a competitive advantage).

      XML has beauty two ways. First off, you'll never have to write a proper parser every again in your life. Yeah! Second, the documentation should exist in the DTD. The DTD should wander around. Even if the DTD doesn't exist, the file format is still easy to parse, even the portions you have never seen before, because it is a well specified format. Unlike CSV. Unlike the most of the 250 odd file formats I have had to deal with in real world situations. On top of all that, why on earth do you want everyone and their brother to make up their own silly file format. Dedicate the resources to make one good one that can cover 90% of the cases. (I know there are cases where XML won't fit).

      Next, I agree with you, "XML Databases" and "XML Language Modeling" are silly constructs. Unless you know the data could end up with someone you'll never meet or do business with, it shouldn't be in XML.

      Kirby

    124. Re:Is this guy serious? by ComputerSlicer23 · · Score: 1
      If the data inside the tags is an important modifier (which in my case it won't be, but I'll consider it as the theoretical possibility), I can still parse 99% of the data correctly, and I might get 1% wrong until I realize it's a problem (further more, I could just completely skip the records that have sections I don't understand and import the rest that do have records I understand, the skipped records get logged and investigated).

      The problem is I can't extract the documentation, either because said documentation doesn't exist, or because the vendor involved feels that the documentation is a propritary and won't give it to us. They want to get into the business we are in, and thus won't help their clients help give data to us. If it was just standard to get data in XML format, I could easily get that done.

      I really don't need clear documentation. Honest, what I deal with is fairly simple. I need to extract roughly 10-15 fields of information. I know what they are up front. 95% of the time, I get way, way, way more data then I ever needed. It's not like I have to parse every last bit. I just need to extract the 10 fields I need out of the up to several hundred I was sent. My problem is never that I can't find the data in the file. My problem is always, that the export didn't handle the case where a delimiter was in a data field. (I have an amazing number of people who give us data that have commas in comma delimited data who failed to use quotes or any other escape). XML if you use a simple off the shelf library will solve all of those problems. I have a lot less to worry about if the idiot who designed the export file format, was an idiot.

      Next, sure, the STL isn't the end all be all of data structures. I hate some of the limitations you mentioned. I'm a professional C++ programmer, and I see a lot of what you are saying (I don't use a lot of STL algorithms, or other things, precisely because implementing a class to write a functor so I can avoid writing a three line for loop seems like overkill). However, if you need a linked list, a dynamic resizing array, a simple dictionary, or a simple set. 90% of the things I work on those semantics are exactly what I need. Writing your own linked list, binary tree, or resizing array is just stupid. The STL code will take your code and eat it for lunch speedwise, and when you realized you needed an extra feature, it will already be implemented. Yes, it can't do circular lists.

      I've seen an amazing number of people who think: "Linked lists aren't hard, I can write my own that's at least as fast the one in the STL, and I can debug it easier". Uh huh. Sure. Right! Take the one that is already speed tested and well tuned, and really well debugged. When it comes right down to it, the only thing you'll need to customize to make it go faster is the allocator can make a large difference. About the only thing that drives me nuts about the STL is that it can segfault if you have a bad "operator less than".

      Kirby

    125. Re:Is this guy serious? by Viol8 · · Score: 1

      No one forces parse writers to do what they do , they do it out of choice like all of us in IT do. I'm not going to weep for them if they're having a hard time, they can always go do something else.

    126. Re:Is this guy serious? by Taladar · · Score: 1

      XML is unreadable compared to today's programming languages because of it's verbosity. You simply can't fit the relevant information in a space small enough to get a good overview of your statement or expression. In addition you have to constantly filter out all the irrelevant tag-bullshit. It is not un-interpretable but you simply can not read it without staring on it for a few minutes like you could most normal code.

    127. Re:Is this guy serious? by Taladar · · Score: 1

      It is irrelevant how easy or hard compiler development gets (as long as it is still possible). You simply don't make work easy for 1% of the people at the cost of making it hard for the other 99%.

      I didn't RTFA but I recognize a programming language I don't want to work with directly and I know I hate UML-Editors and other Tools that move me further away from the actual code so I as a programmer don't want to work with XML as a programming language syntax, neither directly nor through some kind of IDE.

    128. Re:Is this guy serious? by johnnyb · · Score: 1

      XML is actually a great idea for structured documents. That's about it, but it's great for that. Combined w/ DSSSL is pure sweetness.

    129. Re:Is this guy serious? by QuantumG · · Score: 1
      I didn't RTFA

      I'm going to try to be as polite as possible. You're out of line. You have no right to come in here and spout off your own opinion without having read the article. That's what we're all here discussing and you can't even show the common courtesy to do the required reading. Would you go to a reading group and interrupt the conversation without even reading the book that is up for discussion? Would you go to a public lecture and grab the microphone during question time to tell the room that you don't agree with the presenter even though you havn't read any of his work?

      We're not having a private conversation here. This isn't a coffee house. There are 100,000 people trying to learn something new about the article from this comments section and you're filling it up with your unqualified ignorant opinion.

      I'm sorry if I've hurt your feelings, I just want to make sure you're aware that your behaviour is not acceptable. If you want to have a private conversation with me, click on my email address (it's in every post that I make) and we'll have a private conversation, but this is a public forum and if there's 1000 uninformed comments for every 1 informed comment, how is anyone going to find those informed comments?

      --
      How we know is more important than what we know.
    130. Re:Is this guy serious? by Anonymous+Brave+Guy · · Score: 1

      I guess we're just coming from different backgrounds. In my line of work (mostly scientific, technical, engineering, telecomms, etc.) it's very rare to have "expendable data" lying around. Consider importing a physical quantity from another application. These might well come with units, precision information, error bounds and the like, as well as the raw value itself. Losing any of this information could critically affect the meaning of the remaining data: forgetting whether or not you were using SI units has crashed space probes into the moon, after all...

      I think we probably agree about the STL. The data structure parts are quite useful, particularly things like vectors and maps, but the algorithms are mostly... not particularly useful. And I know what you mean about trying to convince people not to reinvent the linked list wheel! :-)

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    131. Re:Is this guy serious? by cakoose · · Score: 1

      This isn't possible for languages that differ in any significant way. What happens to the variable declarations when you convert between Java and Python?

    132. Re:Is this guy serious? by m50d · · Score: 1

      They switch between implicit and explicit, I imagine. The .net compilers manage issues like this well enough.

      --
      I am trolling
    133. Re:Is this guy serious? by cakoose · · Score: 1

      The .Net compilers don't handle this at all. They convert source code to CLR bytecode. They don't convert between source languages.

    134. Re:Is this guy serious? by m50d · · Score: 1

      But if you can convert c/C#/Perl/whatever source to bytecode, surely you could then convert it back to source in one of the other languages? Not necessarily the best source for doing the algorithm, but some source that does it.

      --
      I am trolling
    135. Re:Is this guy serious? by cakoose · · Score: 1

      Disassembly is not trivial. It's hard enough to go C# -> IL -> C#. It'll be much harder to go Python -> IL -> C#. For example, the bytecode for a Python method call is very different from the bytecode for a C# method call.

    136. Re:Is this guy serious? by m50d · · Score: 1
      For example, the bytecode for a Python method call is very different from the bytecode for a C# method call

      Really? Since the whole point of .net is that you can call a Python method from C#, and subclass a C# object in Python, etc., I assumed the bytecodes for objects and functions would have to be the same across languages, and if that much of the language is going to come out the same, with luck loops and variables would look the same in bytecode too. I know going c#-IL-same C# program is very hard, but I'd have thought C#-IL-C# code that is obviously machine generated but nethertheless does the same thing and could be edited by a human was reasonably doable.

      --
      I am trolling
    137. Re:Is this guy serious? by cakoose · · Score: 1
      Really? Since the whole point of .net is that you can call a Python method from C#, and subclass a C# object in Python, etc.,

      You can still call any IL method from any language. It's just that the bytecode for the invocation (at the callsite) will be different because with Python you might have to look up the method at runtime.

      I know going c#-IL-same C# program is very hard, but I'd have thought C#-IL-C# code that is obviously machine generated but nethertheless does the same thing and could be edited by a human was reasonably doable.

      This thread was about being able to take a program and "edit it's source in any language I choose". The output of an IL disassembler is not good enough. Besides, going C# -> IL -> C#, while hard, isn't as difficult as going Python -> IL -> C#.

  4. shhhhh by Neil+Blender · · Score: 3, Funny

    Larry Wall might be listening.

    1. Re:shhhhh by jonadab · · Score: 1

      > Larry Wall might be listening

      Yeah, but he's looking for *good* ideas. (And finding them. Perl6 is getting
      ideas from a wide assortment of languages, including Scheme, Smalltalk, Ruby,
      Python, ... but somehow I don't see this one making it in. Perl6 will get
      its extensibility from such things as grammars, roles, continuations, and
      the Parrot cross-language calling framework.)

      --
      Cut that out, or I will ship you to Norilsk in a box.
  5. I don't understand by filmmaker · · Score: 1

    What's wrong with an OO paradigm for extensibility? XML is certainly more portable than binary code, as will be any plain text, but I just can't reckon why everything needs to be XML based these days. Will this allow multiple languages to use the same libraries transparently?

    1. Re:I don't understand by Homology · · Score: 1
      XML is certainly more portable than binary code, as will be any plain text, but I just can't reckon why everything needs to be XML based these days.

      XML is not suited to everything under sun, though some people mistakenly thinks so. It's just one of those famed Silver Bullets.

    2. Re:I don't understand by Viking+Coder · · Score: 4, Insightful

      XML is certainly more portable than binary code

      That's a huge fricking lie that I wish would die.

      Your TCP/IP packets don't all start and end with < and >, and they seem to be fairly portable.

      Endian-ness and packing are not rocket science.

      --
      Education is the silver bullet.
    3. Re:I don't understand by filmmaker · · Score: 1

      I guess I mean binary code compiled to a particular machine's architecture. That executable code simply won't run in a foreign environment. But XML is XML is XML. Java and the idea of a virtaul processor or virtual machine is another attempt at "silver bullet" cross compatibility, and another not-so silver bullet.

    4. Re:I don't understand by Coryoth · · Score: 1

      I guess I mean binary code compiled to a particular machine's architecture. That executable code simply won't run in a foreign environment. But XML is XML is XML. Java and the idea of a virtaul processor or virtual machine is another attempt at "silver bullet" cross compatibility, and another not-so silver bullet.

      This XML idea is essentially just recreating Java bytecode with the disadvantage of being incredibly verbose and bloated and not actually executable, and the minor gain that it is easily decompilable.

      I don't really know, not being a Java guru, but how good are the Java de-compilers if any?

      Jedidiah.

    5. Re:I don't understand by sketerpot · · Score: 1
      Well, this lets you do transformations of your code in a standard way. You can write special XML-y ways to do unit testing frameworks and such.

      Aw, hell. Here's an example from Lisp, which has something a lot like this. It counts from 20 to 30 by 2 and sums up those numbers:

      (loop for x from 20 to 30 by 3 sum x)
      Now, that's a list of symbols (things like "for") and numbers, and if we just get the language to dispatch on "loop" to a special function at compile time which is passed the unevaluated arguments, we can transform that into optimized looping code. If you want to get even fancier you can even add an object system to a language that isn't object oriented, or accomplish similar amazing feats.

      The important thing is transformation. If you want other examples of this sort of thing, there's a language called MetaL which is a pretty straightforward transformation of Java to XML, and there's MS's CodeDOM, which sounds similar but overly complex.

    6. Re:I don't understand by Anonymous Coward · · Score: 0

      Your TCP/IP packets don't all start and end with , and they seem to be fairly portable.

      When did IP packets become binary code? On what machinese does it run?

    7. Re:I don't understand by MSBob · · Score: 1
      I don't really know, not being a Java guru, but how good are the Java de-compilers if any?

      Actually, near perfect. The java decompilers can even work on the fly. There used to be an Eclipse plugin that would decompile .class files on the fly and show you the code in a normal eclipse editor window. It worked flawlessly every time I tried. Of course variable names were generated and comments were not there but other than that it was 100% successful and the resulting code was very readable.

      --
      Your pizza just the way you ought to have it.
    8. Re:I don't understand by Anonymous Coward · · Score: 0

      This XML idea is essentially just recreating Java bytecode with the disadvantage of being incredibly verbose and bloated and not actually executable, and the minor gain that it is easily decompilable.

      Actually, it's more of a use of XML as a source code translator from one language to another. I can code my project in Python. If you prefer C and neither of us have access to a direct Py2C translator (as if one exists), then I can have my IDE tag Python with XML, and you can have your IDE load the XML and translate it to C or Lisp or Fortran or whatever you want, even if your IDE doesn't natively support Python source conversion.

      The idea of tagging code has been in use for a long time, as with PHP modules that autotag source code snippets for coloring/styling in HTML with CSS stylesheets.

    9. Re:I don't understand by Coryoth · · Score: 1

      Actually, it's more of a use of XML as a source code translator from one language to another.

      Actually, that's what it's not, because it's not very good at that. See my post here as to why. Translating between languages is hard because translating between languages is hard. XML doesn't magically make the difficulties go away.

      Jedidiah.

    10. Re:I don't understand by Decaff · · Score: 1

      Your TCP/IP packets don't all start and end with < and >, and they seem to be fairly portable.

      Not beyond TCP/IP! They are of no use on a IPX or SMB network.

      Endian-ness and packing are not rocket science.

      Right, so I give you an arbitrary binary data file, and you tell me the endian-ness without having access to the software that can read it.

    11. Re:I don't understand by Seahawk · · Score: 2, Insightful

      How on earth is an argument like that "insightful"?

      "Getting milk from the store is more convenient than having your own cow" is the biggest lie ever!

      Lots of farmers gets their milk from cows without a problem.

      But for the topic:
      When I write a binary format that is basicly just a filedump of som c-struct, how compatible is that with c#?

      Sure - I CAN read it - but it takes effort.

      If I wrote the same file in xml, it would be pretty effortless to read it in php, c#, java, VB, you name it.

      And with the binary file i get the added bonus that extending the file WHILE maintaining backwards compability is a bitch.

      Can this be overcome by a smart developer - sure, but it would take effort.

      Extending the xml-file would be pretty simple.

      There are other bad things about xml - why not focus on these, instead of pulling things out your behind?

    12. Re:I don't understand by Viking+Coder · · Score: 1

      As with any encoding, binary is a representation of other things - integers, floating-point values, characters, strings...

      --
      Education is the silver bullet.
    13. Re:I don't understand by Viking+Coder · · Score: 1

      The fact that anyone thinks that XML is "text" instead of "binary" is cute, but it's meaningless in all but the most exaggerated terms (or the tightest constraints).

      So, when someone claims that "XML is certainly more portable than binary code", then they're wrong.

      It so happens that XML is a very bloated binary code which humans can read unassisted by an XML-savy viewer most of the time.

      If XML had originally been written as a tighter binary code, everyone would have been perfectly happy with it. In fact, if XML had been written to be multi-byte character only from the first day, it would have taught people more quickly that 8-bit characters are almost useless, in a large enough audience.

      I still say that for small amounts of data, a good binary representation is probably better, and for large amounts of data (for out-of-core processing), a good binary representation is certainly better. Yes, and more portable. Because if I give you 17 gigabytes of arbitrary XML and you need to process it in real-time, I think you'd rather have the 11 gigabytes of binary data with intelligently-written index tables.

      --
      Education is the silver bullet.
    14. Re:I don't understand by dustmite · · Score: 1

      This XML idea is essentially just recreating Pascal P-Code with the disadvantage of being incredibly verbose and bloated and not actually executable, and the minor gain that it is easily decompilable.

      Have some respect for history ... most "cool new" "revolutionary" ideas are not only old, they're usually even older than you think. People have short memories though so every few years everyone gets excited when the wheel is re-invented yet again.

    15. Re:I don't understand by Viking+Coder · · Score: 1

      Well first your analogy is poor, but clearly for some people it is more convenient to walk out to the farm and milk a cow.

      If C#, PHP, Java, or VB can not read a filedump of arrays of structs then they're not capable of handling any binary data. This isn't rocket science.

      Backwards compatability doesn't come for free, in any encoding. If I decide that I want to normalize some data in my XML, then when you and I move back and forth between our programs, we are going to get out of synchronization. I'll make some edit you're unaware of, or you'll make some edit that I'm unaware of.

      The idea of edit-in-place is like a virus that moves into my code, making it extremely inefficient, just for the sake of you being able to inject data for me to drag along. And most people don't even do it that way (they recreate the output, instead of injecting changes into the original XML structure), thus completely obliterating the "X" from XML.

      Can this be overcome by a smart developer - sure, but it would take effort.

      In *any* forward-looking project, you will have *major* revisions, and minor revisions. XML doesn't help you move between major revisions (with enough hard work, XSLT might be able to help you - just like any portable programming language which is capable of transforming data). The fact that XSLT is a de facto standard is what makes it useful - not any intrinsic property of XSLT itself. C++ is clearly inferior to other programming languages in several details, but it is the de facto standard. Claiming that it's "portable" has always obfuscated the real point - yes, with work. You have to be careful what you do, and how you do it.

      I was focusing on the one and only one comment that gets repeated a billion times as the ultimate defense of XML for the use in some project - portability.

      I guarantee that for a specific problem, a binary representation is as good or better than XML. (I'm cheating with this argument, since XML itself is actually binary - you don't go creating XML without using at least UTF-8, do you?)

      Domain knowledge always wins. Injecting "portability" and "extensibility" as top-level requirements absolutely makes sense in some areas, and is absolutely brain-dead in others. TCP/IP doesn't need to be extensibile - it works. If it were extensibile, it would be a dog, and it would be significantly more expensive to process.

      If you want to express a floating point number, I'll chose IEEE Standard 754 for binary floating point representation every day of the week and twice on Sunday. It seems pretty portable to me. I don't know though, maybe I'm an idiot.

      --
      Education is the silver bullet.
    16. Re:I don't understand by Chembryl · · Score: 1

      No, Rocket Science is just a question of Conservation of Momentum.

      --
      - This and all my posts are public domain. I am a Physicist. I am not your Physicist. This is not Physically advice
  6. Early Post by Anonymous Coward · · Score: 0

    Sounds like a great idea to me.

  7. Yea, Good Idea by the_mad_poster · · Score: 3, Funny
    Oh, that would be just wonderful. I was just thinking about how I could take my nicely modularized source files and bloat them into 450kb monstrosities without actually adding any value along the way.

    Wait, I have an idea, why don't we all just run this script before we start a new job and then paste bits of the junk output randomly throughout the source files?
    perl -e "print pack 'c*', rand(255) for(1..$ARGV[0]);" 2500
    Dumbest. Idea. Ever.
    --
    Alito: A vote for Alito is a punch in the eye to put that bitch back in her place!
  8. Possible. by cbrocious · · Score: 1

    Possible? sure. Practical? No.

    Unless you're trying to build a VB-like system, XML would not be practical at all.

    I tried designing an XML-based programming language long ago and failed miserably. It just doesn't work out well. I do think that languages are ready for a revolution, though. I love C syntax, but it's stale and there are many things we can improve upon.

    --
    Disconnect and self-destruct, one bullet at a time.
    1. Re:Possible. by jonadab · · Score: 2, Interesting

      > I love C syntax, but it's stale and there are many things we can improve upon.

      The problem with C is not the syntax; it's the semantics of the language that
      are stuck in the twentieth century. Sure, there are improvements that could
      be made to the syntax, but good syntax doesn't make a language good. C needs
      semantic things: automatic memory management, dynamic length strings, garbage
      collection, numeric types that automatically promote as needed, context-aware
      functions, mixins, unicode strings that automatically keep track of their
      encoding and know what a grapheme is, that sort of thing.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    2. Re:Possible. by Curtman · · Score: 1

      I tried designing an XML-based programming language long ago and failed miserably. It just doesn't work out well.

      XUL, or something like (lib)Glade is about as far as XML should be taken as a programming language IMHO. It's great for laying out widgets, and defining callbacks, that kind of thing. Beyond that, it just gets in the way.

    3. Re:Possible. by Anonymous Coward · · Score: 0
      C needs
      semantic things: automatic memory management, dynamic length strings, garbage
      collection, numeric types that automatically promote as needed, context-aware
      functions, mixins, unicode strings that automatically keep track of their
      encoding and know what a grapheme is, that sort of thing.


      Look, if you want Java then write in Java. Leave C alone, dammit.

    4. Re:Possible. by jonadab · · Score: 1

      > Look, if you want Java then write in Java

      I tend to prefer Perl.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  9. That's just silly... by Vaevictis666 · · Score: 1
    And really, it can be done right now with pretty much anything.

    Just run the code through the tokenizing phase of the compiler, and output it as XML. Teach the editors to work backwards that one step for display, and run forwards when saving, and you're done.

  10. Wha? by bburton · · Score: 1
    "Wacky, but perhaps wacky enough to be possible?"
    Take a look at BF and ask that question again. I think you'll find the answer is.... YES!
    --
    Slashdot = ((Technology + Politics) / Trolls) % Grammar Nazis
    1. Re:Wha? by jonadab · · Score: 1

      BF isn't wacky. BF is just extremely minimalist. You want wacky, you look
      at Unlambda or Threaded Intercal.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  11. Ewww by kiddygrinder · · Score: 1

    That code example is enough to put anyone off even considering it.

    --
    This is a joke. I am joking. Joke joke joke.
  12. Programmable Programming languages? by sleepingsquirrel · · Score: 1

    Programmable programming languages? I'm sure it'll make the lisp-macro master Paul Graham smile.

    1. Re:Programmable Programming languages? by 14erCleaner · · Score: 1

      Of course! It was proposed by Mr. Scheme himself, Guy Steele. Who should know better...

      --
      Have you read my blog lately?
  13. Damn... by ackthpt · · Score: 5, Funny

    They should have put the < and > keys in the middle of the keyboard.

    --

    A feeling of having made the same mistake before: Deja Foobar
    1. Re:Damn... by SharpFang · · Score: 1

      Whoever designed the angle brackets as delimeters for XML certainly didn't read the sacred Long Options manuscript.
      Shame and Sin.

      --
      45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    2. Re:Damn... by Anonymous Coward · · Score: 1, Insightful
      What we really need is a level of abstration on the keyboard, allowing each programmer to put the keys exactly where they want them!

      Insert picture of programmer popping the key tops off a keyboard and clipping them back on in different places.

    3. Re:Damn... by xgamer04 · · Score: 1

      They should have put the keys in the middle of the keyboard.

      I have the solution: Foot pedals. As an added bonus, pudgy XML/HTML coders get to run a marathon every day!

      --
      When you look at the state of the world, how can you not become a radical, liberal anarchist?
    4. Re:Damn... by Anonymous Coward · · Score: 0

      Addendum:
      Foot pedals not only for , but also for [ and ], { and }, and ( and ). It could be like DDR for programmers.

  14. Syntactic Sugar by Viking+Coder · · Score: 1

    There should be precisely the amount of syntactic sugar to consisely express a programming construct.

    Any more than that, and you're just typing because the editor is too stupid to do it for you - and you're making it harder to scan. ("Read" or "Grok")

    "begin" and "end" look pretty silly compared to { and }, and <bizarre-programming-construct-that-means-the-same -thing-as-an-open-paren> is retarded. Maybe as an intermediate language for easy translation, but not for my fingers to be typing or eyes to be reading.

    --
    Education is the silver bullet.
    1. Re:Syntactic Sugar by emurphy42 · · Score: 2, Informative
      It is being proposed as an intermediate language for easy translation. From TFA:
      Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors. For example, a program stored on disk like this:
      <doc>Only replace below threshold</doc>
      <cond>
      <test>
      <compare-expr operator="less">
      <field-expr field="age">
      <evaluate>record</evaluate>
      </field-expr>
      <evaluate>threshold</evaluate>
      </compare-expr>
      </test>
      <body>
      <invoke-expr method="release">
      <evaluate>record</evaluate>
      </invoke-expr>
      </body>
      </cond>
      would be viewed and edited like this:
      // Only replace below threshold
      if (record.age &lt; threshold) {
      record.release();
      }
      Crucially, code will not be stored as uninterpreted CDATA within XML documents and programmers will not see (much less type in) XML tags. Such a representation would have all the disadvantages of JSPs, Ant, and other hybrid systems, without bringing any tangible benefits. Instead, XML will represent the program's deep structure.
  15. Short answer, no by Anonymous Coward · · Score: 4, Funny


    <content="N0!!!!!!!!!!!!!">
    </answer>

    1. Re:Short answer, no by shogun · · Score: 4, Funny

      You left the DTD off, we'll unfortunantly have to ignore your reponse.

    2. Re:Short answer, no by Anonymous Coward · · Score: 0

      This post should be modded insightful as well as funny, since it (unintentionally?) shows how so many people abuse XML.

      i.e it would be more fitting written as:
      <answer type="long">N0!!!!!!!!!!!!!</answer>

    3. Re:Short answer, no by mortonda · · Score: 1

      Exactly! This post, while intened to be funny, actually shows exactly why XML is so stupid.

      XML is written for people who like to type. In this way, I think they are related to JAVA and COBOL.

      OTOH, if you like easy to read, efficient code, look at Ruby or Python. ( I don't use either currently, but I can at least read them )

      Don't get me started on XSLT...

    4. Re:Short answer, no by legirons · · Score: 3, Funny

      Think you missed some punctuation...

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <answer type="long" xmlns:h="http://www.w3.org/TR/slashdot/answer">
      <content="![CDATA[N0&exclamation;&exclamation;&exc lamation;&exclamation;&exclamation;&exclamation;&e xclamation;&exclamation;&exclamation;]]" />
      </answer>

    5. Re:Short answer, no by vadim_t · · Score: 1


      <post>
      <quote>
      &lt;answer type=long&gt;
      &lt;content="NO!!!!!!!!!"&gt;
      &lt;answer&gt;
      </quote>
      <content type="reply" length="unnecessarily long">
      <font family="Sans Serif">
      <pedantic>
      Actually it would probably look more like this:
      <scream pitch="high">NO!!!!!!!!!!</scream>
      </pedantic>
      </font>
      <hack type="avoid lameness filter">
      sohghogheis7cohquetueMohaeyaizee
      ohh9kaithahNgueghohbiezahgaihuvu
      iag0Ezishaibukoovuishaicawaechae
      Oothusitia8tikochobomiphahghogei
      eeX1eetioxaehiquahbaidaupuacepah
      Iniem9quietoonguudaiqueibahceing
      quoh0eoYeisohsohpouvouxekulaenga
      aCh1iacheeroataevaileifozaiqueic
      aelaikuNe0sailaetheephoomoateehu
      </hack>
      </content>
      </post>

    6. Re:Short answer, no by bladesjester · · Score: 1

      Actually, with a good IDE, Java's not so bad to code (Eclipse does quite a good job of name completion, and I don't have to constantly screw with ant files).

      XML, on the other hand, is still a pain in the ass even with a decent IDE (XMLspy is nice, but it doesn't cut out the typing *that* much).

      Even C/C++ can be overly verbose if coded poorly, and there is a lot of cruddy code out there that's being maintained.

      --
      Everything I need to know I learned by killing smart people and eating their brains.
  16. On the Microsoft front... by sH4RD · · Score: 1

    Microsoft is implementing an XML based language into Longhorn. I forgot what it is called though, but I can assure you it exists. I find it kinda funky myself, but maybe it works.

    --
    WASTE - The Secure P2P
    1. Re:On the Microsoft front... by adlaiff6 · · Score: 1

      Probably just so they can buy time to advertise/hype while their programmers translate Windows Me into the new XML, and so they can brag about their newfangled "trillion-line-OS".

    2. Re:On the Microsoft front... by HeadDown · · Score: 1

      You're probably referring to XAML, and the XML part only covers GUI specification.

    3. Re:On the Microsoft front... by davegust · · Score: 1

      Microsoft is implementing an XML based language into Longhorn. I forgot what it is called though, but I can assure you it exists. I find it kinda funky myself, but maybe it works.

      It's called XAML and it's a desclarative language for UI elements - not procedural. Kinda like WinForms for Avalon.

    4. Re:On the Microsoft front... by grennis · · Score: 1, Interesting

      It's called XAML. It is not a programming language, it is a declarative way to control the user interface of a client application. It's nothing new conceptually, just jumping on the XML bandwagon. You can read more about it on this MSDN Blog.

      Oh, and there are already commercial clones of it out, even though it won't be released until Avalan/Longhorn timeframe.

    5. Re:On the Microsoft front... by Sepper · · Score: 1

      I forgot what it is called though

      <C:\DOS> Maybe

      --
      I live in Soviet Canuckistan you insensitive clod!
  17. Oh, yeah, *that*'ll fly... by jonadab · · Score: 2, Insightful

    We all know how programmers like languages that require typing a lot of
    verbose and lengthy expressions. Y'ever notice how *popular* COBOL is?
    Did you notice how many more languages have copied Pascal's style of
    delimiters BEGIN/END versus the C style {/} or the lisp style (/), and
    how popular those languages are?

    It's different for data, because you don't type them in by hand most of
    the time; you write a program that generates them.

    --
    Cut that out, or I will ship you to Norilsk in a box.
    1. Re:Oh, yeah, *that*'ll fly... by SoupIsGoodFood_42 · · Score: 1

      How about reading the fucken artical next time?

  18. KISS by Anonymous Coward · · Score: 0

    There's a certain beauty and robustness to simple text files, but on the other hand XML stored code would enforce earlier code analysis, which could lead to cleaner code. I for one would also love to get rid of the mixture of whitespace conventions in "grown" code. Let's give it a try.

    1. Re:KISS by Jesus+2.0 · · Score: 1

      How does XML help "get rid of the mixture of whitespace conventions in grown code"?

      After all, this:

      <x>
      <y><z>

      </z>
      </y> </x>

      is just as well-formed XML as is:

      <x>
      <y>
      <z>
      </z>
      </y>
      </x>

    2. Re:KISS by Anonymous Coward · · Score: 0

      Since there is no inherent formatting in the XML representation, editors supporting this way of storing code would have to be able to dynamically reformat code to various standards. It's certainly possible to write an editor which can do this with plain text files, but it's a lot easier to add this feature when you need to parse the code structure anyway. It's basically a way of suppressing complaints about messing with other people's whitespace because whitespace style would become a function of the editor, not an inherent information in the code.

  19. WebLogic workshop by freedom_india · · Score: 1
    Weblogic workshop 8.1 has a XML-driven JPD Process.

    You define your program visually and internally it's stored as XML.

    Really easier to maintain.

    --
    "Doing what i can, with what i have." ~ Burt Gummer
    1. Re:WebLogic workshop by snoyberg · · Score: 1

      But all that does is abstract away coding from the programmer. Sounds like something I'd give my sister if she decided she wanted to code a simple app.

      I've noticed this XML trend in the Java world big time, and that's why I finally left. I've been big-time into Java since v1.1, and I just realized as I was trying to develop a web-app using 15 (exageration) different XML files defining the template structure, the Javabeans, and configurations, that I could write the same site in PHP before I even finished Hello World in Java!

      I'm proud to say that I'm finally coming back to my roots in C/C++ and realizing that you don't need to use XML for everything.

      --
      Thank God for evolution.
    2. Re:WebLogic workshop by freedom_india · · Score: 1
      I'm proud to say that I'm finally coming back to my roots in C/C++

      So you go back to the world of headaches, heartburns and acidity once again...To each his own i suppose...Have Fun!

      --
      "Doing what i can, with what i have." ~ Burt Gummer
  20. CRAP !!!! by Anonymous Coward · · Score: 0

    Must everything be OO and XML ???

    I am disgusted

  21. already have this by CastrTroy · · Score: 2, Insightful

    Most good IDE's already support autoformatting a document to fit the indenting and bracketing to the user. I don't see how putting formatting as a core part of the language will really help the language at all.

    Not to mention the fact that programming languages (not assembly) by definition, are extensible. Most programming languages provide loops, if statements, and ways to define classes, methods, and variables. Some programming languages provide standard libraries so you don't have to do everything from scratch. I don't see anything new that this will offer.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    1. Re:already have this by d1v1d3byz3r0 · · Score: 1

      Most good IDE's already support autoformatting a document to fit the indenting and bracketing to the user. I don't see how putting formatting as a core part of the language will really help the language at all. Ever program in Python?

    2. Re:already have this by rhizome · · Score: 1

      yeah, or COBOL?!

      --
      When I was a kid, we only had one Darth.
    3. Re:already have this by Tom7 · · Score: 1

      Well, did you read the article? One idea is that if the code is stored in a more abstract format, then it can be displayed different ways to different people.

      Extensibility of the language is not what you seem to think it is. (For that matter, why isn't assembly language extensible in your sense? Almost every assembler these days has a complex macro system, which is how anyone can bear to use them!) Extensibility means modifying the syntax and semantics of the language, not writing programs in it.

    4. Re:already have this by C+Joe+V · · Score: 1
      Not to mention the fact that programming languages (not assembly) by definition, are extensible. Most programming languages provide loops, if statements, and ways to define classes, methods, and variables.

      How is that the definition of extensible? Those aren't mechanisms for extending a language, they're just programming constructs. They illustrate only that programming languages (by definition!) can be programmed in.

      CJV

    5. Re:already have this by CastrTroy · · Score: 1

      Assembly is not really extensible, because you have x number of commands and all you can really do is type these commands in a different order and do different things. In other programming languages, you can type in certain things, which define a new command. You can now use this command in different parts of your program. In assembly you can jump around to different parts of the program, but thats about as far as it gets.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
    6. Re:already have this by Tom7 · · Score: 1

      Like I said, just about any modern assembler has a macro system that lets you define new constructs. Actually, the macro systems of assemblers are usually much fancier than the ones in languages like C because assembly is so painful without them.

  22. An amazing acheivement! by Anonymous Coward · · Score: 0

    For years scientists having been working on a language less readable than perl.

  23. This crap already exists... by HeadDown · · Score: 1

    albeit in a somewhat limited form. It's called XSLT, and it's a HORROR to program in. Un-fucking-readable. XML is an INTERCHANGE format, people.

    1. Re:This crap already exists... by Morden · · Score: 1

      Yep, I hear you.

      I left my old job over being forced to move to Cocoon instead of PHP.

  24. Opposite by zm · · Score: 1

    Guess the guy wanted something opposite to Brainfuck, eh?

    --
    Sig ?
    1. Re:Opposite by XMyth · · Score: 1

      Don't see how it'd be so different in its effect on the programmer.

    2. Re:Opposite by geminidomino · · Score: 1

      Shattered mind PLUS carpel tunnel.

  25. I think its just a natural progression by stratjakt · · Score: 1

    The linux kernel should be rewritten in XML.

    --
    I don't need no instructions to know how to rock!!!!
  26. Great by Epistax · · Score: 1

    I've always wanted my "Hello World" source to take 10k.

    1. Re:Great by LiquidCoooled · · Score: 1

      no, you would write "import com.blah.Foo;"

      The editor would save it as exploded xml.

      When I view it inside my editor, I would see #include "com.blah.foo.h";
      or whatever the correct syntax is.

      You could code exactly the same way you do currently, it just adds flexibility to the backend.

      --
      liqbase :: faster than paper
    2. Re:Great by Trejkaz · · Score: 1

      The point was that it's not making the language any more extensible.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
  27. Water: easy as Basic, powerful as LISP by Anonymous Coward · · Score: 0

    I think it's lame, but if you're interested then check out the Water programming language at waterlanguage.org

    1. Re:Water: easy as Basic, powerful as LISP by Anonymous Coward · · Score: 0

      Wonderful language: I have to try it (instead of just plain old download), I guess I'll have to buy it later (kinda like Rebol, another shitty language that tried to be intelligent). Then I have to GIVE my name, email and address to a bunch of guys I don't know to DOWNLOAD a program written in JAVA!!!

    2. Re:Water: easy as Basic, powerful as LISP by Anonymous Coward · · Score: 0
      It appears that the reason you have to give them your email and address is that they seem to be looking for dates, check out the bottom of this page Favorite Book, etc.

      The one that gets me is least favorite "language" and the one guy, Hall, I think (or was it Oates, can't remember) says XSLT - and yet they are writing an abmoination of a programming language _in_ XML.

      This site is hilarious.
      Plusch is an MIT and Sloan School graduate, whose drive for speed is well balanced by Fry's more cautious approach. Originally from Ohio, he had a particular dislike for programming, until Water came along. Plusch's business drive is a good foil for Fry's arts and sciences orientation.
      Both Plusch and Fry are authors and oft-requested speakers on the technical conference tour. Fry has been published numerous times in the Communications of the ACM. Plusch has several books under his belt including, "Water: Simplified Web Services and XML Programming", published by Wiley.
      Plusch was asked just how committed he is to the Water language. He responded, "I would not be surprised if I end up doing Water related work for the rest of my life. I'm considering getting my first tatoo -- the Water logo."
  28. Almost like lisp by Anonymous Coward · · Score: 0

    From TFA

    <invoke-expr method="myMethod"><evaluate>record</evaluate></inv oke-expr>

    Hey, that's almost as good as

    (invoke (method . "mymethod") (evaluate "record"))

    1. Re:Almost like lisp by hasdikarlsam · · Score: 1

      Wouldn't that be more likely to look like
      (mymethod record)?

      *grin*

  29. Buzzword compliance to the table! by CharAznable · · Score: 1

    Yes, because it will be easier to sell a project to your boss:

    "Hey, it has XML!!"

    This will trigger memories from a IT management journal that your PHB read but didn't understand and will become enthused at the prospect of your product being even more buzzword compliant.

    --
    The perfect sig is a lot like silence, only louder
  30. Silly article by photon317 · · Score: 4, Insightful
    This article argues that next-generation programming systems can accomplish this by combining three specific technologies: -> Compilers, linkers, debuggers, and other tools that are frameworks for plug-ins, rather than monolithic applications. -> Programming languages that allow programmers to extend their syntax. -> Programs that are stored as XML documents, so programmers can represent and process data and meta-data uniformly.

    1 - Compilers with plug-in architectures - GCC anyone? I know, he probably means something quicker and easier than writing new front- and back- ends for the Gnu Compiler Collection, but the concept is already out there.

    2 - Just about any modern language does this to some degree depending on your definition. Under even the most rigorous definition of this, the good old language LISP does it with flair. Users can extend LISP syntax with ease, and user-added extended LISP syntax is virtually indistinguishable in style and functionality from the built-in elements of the language.

    3 - Since existing languages have a well-known syntax which is easily machine parseable (in fact, that's what the parser and compiler do every time you use them on your source code), existing computer languages are already in a format which allows easy conversion into other formats and representation, and the gathering of metadata. Converting semicolons, whitespace, and parentheses (or whatever your language of choice uses) to xml tags doesn't really change anything, except to make things uglier and harder to type.

    --
    11*43+456^2
    1. Re:Silly article by Ooobles · · Score: 1
      1. How about a plug-in architecture to the VM which takes code specifically designed for graphics primatives which have been put in the code. The idea of plug-in is a lot more fine grained than what you're saying.

      2. LISP is a great example. It is the first example that people present. Ashame that LISP has such terrible syntax. Wouldn't it be nice to have an editor that displays code at a higher level, but the low level language is like LISP. Putting code in a different form allows that. I'm looking at doing a language in Argot ( http://www.einet.com.au/ ) which is binary. It will probably act a lot like LISP but will look like a format that the user is comfortable.

      3. I disagree. Grammars and parsers are a pain to write. And grammars are especially hard to develop and get right. A format which is closer to AST is easier to parse. If we're going to get rid of this tower of babel we've developed for ourselves, we need to develop more flexible formats to describe code.

    2. Re:Silly article by pla · · Score: 1

      and user-added extended LISP syntax is virtually indistinguishable in style and functionality from the built-in elements of the language.

      ...You call that a good thing?

      No offense, I actually do like Lisp (well, Scheme anyway; haven't done much in pure Lisp), but I consider its "style" one of its biggest drawbacks - Reading Lisp feels remarkably like trying to beat a 2 year old child at the game of "why?".

    3. Re:Silly article by Anonymous Coward · · Score: 0

      You got everything but the point of the article.

      The vast majority of people would never touch the xml directly. They would however, have a single language with multiple representations. This would be somewhat like Microsoft is doing with .Net, but potentially more flexible.

      The idea would be to take the extensibility of LISP along with the ability to relatively painlessly generate code to languages much different from LISP. The idea is that although C is parseable, it is not easy to generate. XML is easy to parse and generate.

      This isn't a terribly radical idea, but it is a proposal for a mechanism to generalize some things that already exist.

    4. Re:Silly article by pfdietz · · Score: 1

      Lisp has a wonderful syntax. The real shame is the people who slander it.

      And, no, grammars and parsers are not hard to write, compared to the real hard part of a compiler (the optimization and code generation.) Grammars and parsers are goddamned *trivial* in comparison to those parts, particularly if you want good code.

    5. Re:Silly article by Anonymous Coward · · Score: 0

      Bitch, shut up about your fucking Barf-got project. You astroturfed as AC already in this discussion about it and are posting with your uid now. Your programming language/vaporware has nothing to do with this.

      Work on your shit, then submit an article so it can be ignored because you are not going to release your shit under a FOSS license.

      BTW, all programming languages are "binary" aren't they? Or are you talking about data structures?
      Nevermind, I don't want to know.

    6. Re:Silly article by Anonymous Coward · · Score: 0

      Wouldn't it be nice to have an editor that displays code at a higher level, but the low level language is like LISP.

      Great idea. So why not just use something like LISP rather than this XML stuff?

    7. Re:Silly article by Anonymous Coward · · Score: 0

      And, no, grammars and parsers are not hard to write, compared to the real hard part of a compiler (the optimization and code generation.) Grammars and parsers are goddamned *trivial* in comparison to those parts, particularly if you want good code.

      Depends greatly on the language. LISP is trivial to parse (recursive descent). C++ is very, very hard to parse (I gather it can be done with LALR(1), but it's not easy to get there).

    8. Re:Silly article by m50d · · Score: 1

      That third one is where this makes the difference. Sure, the compiler can parse it, but that doesn't make it easy to parse. Crucially, there's no easy way for me to parse it in a new program. If it's converted to XML, I can write a five line script in just about any modern programming language to, say, change all floating point constants to 1.5, something which is a nightmare to do for C code at the moment.

      --
      I am trolling
    9. Re:Silly article by arose · · Score: 1
      Ashame that LISP has such terrible syntax.
      I know, replace it with XML!
      --
      Analogies don't equal equalities, they are merely somewhat analogous.
    10. Re:Silly article by angel'o'sphere · · Score: 1


      1 - Compilers with plug-in architectures - GCC anyone? I know, he probably means something quicker and easier than writing new front- and back- ends for the Gnu Compiler Collection, but the concept is already out there.



      In the sence of the article GCC has no plugin architecture.
      Extensible languages expect the source code to be able to interact with its compiler. Asume the compiler is compiling only a part of the source code and interpreting the rest. Interpreting means the sourcecode calls functions in the compiler executeable or in "plugins" pulled from a library.

      Basically you have a single sourcefile containing base lavel language constructs yielding teh final executeable program and meta level language constructs instructing the compiler how to translate/parse/generate the executeable.


      3 - Since existing languages have a well-known syntax which is easily machine parseable (in fact, that's what the parser and compiler do every time you use them on your source code), existing computer languages are already in a format which allows easy conversion into other formats and representation, and the gathering of metadata. Converting semicolons, whitespace, and parentheses (or whatever your language of choice uses) to xml tags doesn't really change anything, except to make things uglier and harder to type.


      Short answer: you did not RTFA.
      Medium long answer: you are right.
      Longer answer: Well, the language stays like ordinary Java or C, only the internal representation for the IDE and toolchain is XML.
      Further: write me a C++ ompiler ... erm Parser ... or just write me the parserdefinition in cUPS/bison or what ever.

      Thrre are programming languages, I would count there even APL and COBOL or Fortran, which are not easy parseable.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
  31. lord, please no... by kendoka · · Score: 1

    XML is so verbose, it puts Pascal to shame. I guarantee you, if that language ever came out, a bunch of C guys would have a complete macro language for that in a day... =)

  32. I was at the OLE devcon in 1993 in Seattle ... by JMZorko · · Score: 1
    ... and someone posed a very cool question that I had not thought of:

    "So, we're going to be making all of these neat components that people can use, right?"

    "Right."

    "And this will allow them to call our components from about any language that has a COM bridge, right?"

    "Right."

    "Um ... why do they get to have it so good?"

    (long pause)

    Regards,

    John

    --
    Falling You - beautiful
  33. Clearly you haven't thought this through... by Anonymous Coward · · Score: 0

    If the grader can't understand what you're doing, which appears to be valid, how can they mark you wrong?! They can't. A person for every language and a language for every person. Muwahahaha. Egalitarianism is about to arrive, first one to name their son Harrison Bergeron wins, sort of, but not really. Have a back up.

  34. Hahaha... lisp all over again... by Vaevictis666 · · Score: 1

    Heading 3 from the article: Programs as Data. Yep, lisp was doing that decades ago :P

    1. Re:Hahaha... lisp all over again... by imbaczek · · Score: 1

      I was going to write that, but I peeked at TFA and I actually *saw* Lisp code in there used as an example.

  35. Nooooooooo! by BoRictor · · Score: 1

    Dear god no! If I was forced to code in a language like that I would beat down everyone around me with my keyboard. Seriously, XML is not a new paradigm. It is a way to describe data. A bit bloated IMO but good for what it's designed to do. Why are people trying to shoehorn it in everywhere else? I've heard of plans to put XML into DNS! ArghhhHH!!!

  36. COBOL coming back? by SharpFang · · Score: 1

    XML has one serious disadvantage: It's awfully verbose. You may argue what is more readable,

    i++;

    or

    myIndex.math.increment();

    but it's hard to argue about

    <math operation="increment"><variable type="integer">i</variable></math>

    Sorry. I don't see future for that.
    Yes, writing your own syntax rules with XML, okay. But as an editable compiler abstraction layer. Not as a part of the program itself

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
    1. Re:COBOL coming back? by yabos · · Score: 1

      Dear deity that would be horible.

    2. Re:COBOL coming back? by LiquidCoooled · · Score: 1

      What difference does it make?
      You will still type "i++;", the editor will quietly save the xml exploded version of it for you.

      Then, as an example of expansion, sometime when your documenting the code, you can put as much as needed inside xml sub-branches seen only with the correct filters - the comments may be targeted at a developer, or at an end user, or could be examples of usage, or related links.

      You won't have more work, and by default, you won't ever see the raw xml, but with it, you can do whatever you need, and parse it out as required.

      Another use of the filters would allow me to see the program YOU wrote in c with a Pascal or basic front end, i = i + 1. I could even choose to see the assembler, or Binary compiled view.

      It adds flexibility to the mix.

      --
      liqbase :: faster than paper
    3. Re:COBOL coming back? by SoupIsGoodFood_42 · · Score: 1
      Yes, writing your own syntax rules with XML, okay. But as an editable compiler abstraction layer. Not as a part of the program itself

      Perhaps you need to read the artical?

  37. Nothing new about extensible languages by AndroidCat · · Score: 1

    Just someone wanting to try out their shiny new XML hammer on all those nails. (The custom reformatting would be nice. After a while those 64x16 Forth pages got old--not that they were manditory.))

    --
    One line blog. I hear that they're called Twitters now.
  38. Return to our roots! by astebbin · · Score: 1

    People need to go back to using lower-level assembler code and other such near-machine-code basic (but not BASIC basic) languages and master those before they try to create a whole bevy of new languages that are so far removed from the binary that it takes the computer 5 minutes just to render "Hello World" in a pretty-looking XML formatted stlye. C, in particular, has been abandoned by many teaching institutions, including my own (we learned JKarel using Java). This is a dangerous trend that teachers bad programming habits and needs to be stopped before it becomes widespread.

    1. Re:Return to our roots! by jonastullus · · Score: 1

      yep, the technical background of programming is important and maybe every programmer should know his C/assembly in order to understand the pipelining, cacheing and the different costs of basic operations.

      but as more and more complex software is demanded from designers and programmers, i see the future in languages that abstract from the von-neumann-style of programming towards a style in which you can actually hold the solution to a complex problem in your head instead of micro-optimising your solution, pointer juggling, and so forth.

      you should be able to construct sensible abstractions for a problem in a very short time so that you can then concentrate wholly on solving the problem at hand and not whether this operation costs more than that operation. and languages like C don't "allow" fast/prototype-like abstractions and instead force the micro-optimisation approach on you.

      Premature Optimisation is the root of all evil and in my eyes C is the root of premature optimisation.
      of course for low-level problems like operating systems every microsecond counts and one doesn't necessarily have the luxury of wasting valuable cpu time on garbage collection, BUT for mission critical software some kind of proving that the solution conforms to the specification would be nice to have, and functional languages like haskell make those kinds of proofs much easier than side-effect-maniac languages like C.

      finding a bug in bad C code is nearly impossible (believe me, i have written my share of horrible C/C++ code) due to the side effects and manual memory management. finding a bug in pure functional languages is far easier because the bug only has a local effect instead of a global fandango-on-core.

      so much for my rant; feel free to flame back ;-))

      jethr0

    2. Re:Return to our roots! by astebbin · · Score: 1

      Nah, no flaming on Slashdot, some of us are actually caring and considerate people :)

      Yes, I recognize what you say and I know it to be true. I am still just a lowly comp sci student who has had minimal coding experince on a large scale, but I do know that XML is a pain and that my C/C++/Python apps run *way* faster than their Java equivalents... my programs generally aren't too challenging to debug, but I guess a thousand-line app would be pretty impossible to debug using a language such as C. However, I do believe that if you are taught C early on in your education, any object-oriented language that you learn later (such as C++ or Java) will be a breeze.

    3. Re:Return to our roots! by daijo78 · · Score: 1

      I think that for every different programming paradigm you push into your head you become a better programmer. When I started my CS studies we learned Java as a first language but also made a brief encounter with Haskell. Our professor wanted to show us that computer programming is more profound then any certain languge. Made a big impact on me. Next semester we used assembly and C and got a feeling of the low level stuff and that also was very useful.

    4. Re:Return to our roots! by BlackHawk-666 · · Score: 1
      finding a bug in bad C code is nearly impossible

      Try using a debugger, it makes it an absolute doddle. Not as easy as finding a bug in well written C, but easier than modelling all theat data in my head like I used to do. They have fancy features like the ability to inspect variables without using printf, and the ability to pause the code without a getc ().

      Meh, bad code sux arse badly, but C is not as bad as you make out once you learn it.

      --
      All those moments will be lost in time, like tears in rain.
    5. Re:Return to our roots! by BlackHawk-666 · · Score: 1

      My current project is 300,000 lines of C / C++ / C# / XSLT (2 programmer team, written over 12 months), and although it is now what I would consider unwieldy, it's not hard to debug or maintain. The hardest problem is finding the code we want to work on, since it is made up of 13 projects and maybe 800-1000 source files it's hard for us to navigate the code to where we want to debug / change. Sigh, I dream of 1,000 line projects, we have single files with twice that number of lines in them, and it's complicated derivative valuation code too. Hang in there, it will all become simple to you in time.

      --
      All those moments will be lost in time, like tears in rain.
    6. Re:Return to our roots! by Tsiangkun · · Score: 1

      a thousand-line app I smile. I found a bug in someone elses 121,827 line perl program before my holiday break. But only because I had to find the Bug before I could go on Holiday.

    7. Re:Return to our roots! by Anonymous Coward · · Score: 0

      I couldn't agree with you more. My sequence of learning languages was BASIC (GW-BASIC then Quick Basic), then assembler (including linking assembler with QB), then Pascal, then C. I have yet to learn Java, but it's on my to-do list.

      People and corporations always want the quick and easy way out. As high-level languages add more functionality and get farther away from the hardware, it becomes quicker and easier for the programmers to accomplish their tasks. However, as you pointed out, this comes at a cost. A very great cost, in my opinion. Typically, the farther you get from the hardware, the worse the performance will be. Most people don't care. I've seen people on here saying it doesn't matter how fast or slow an app (such as a word processor) runs, as long as it's faster than the user. I disagree. Let's take that app and put it on a terminal server serving 100 clients. Suddenly it becomes a very big deal.

      It makes me long for the days of the demo scene, where coders (not programmers, but coders) would pour their hearts and souls into their work and took pride making magnificient creations whose performance put today's apps to shame. I understand the notion that optimizing to perfection is extremely time-intensive, but nowadays all-too-often people don't bother to optimize at all. As long as their program runs and does what they want it to do, they're happy. Which, to me, is one of the biggest differences between a programmer and a coder.

    8. Re:Return to our roots! by jonastullus · · Score: 1

      sure, i am no stranger to the debugger...
      but when you have pointer running wild the debugger ain't of much help because the segfault will occur at a different place in the code than the original mis-allocation!

      jethr0

    9. Re:Return to our roots! by Anonymous Coward · · Score: 0

      My current project is 300,000 lines of C / C++ / C# / XSLTHave you tried any SCC other than CVS, or what are you finding works for project/source code management at that level - Maven? Sorry just kidding...
      But I am curious about darcs (http://abridgegame.org/darcs/) and others in that size env.

    10. Re:Return to our roots! by BlackHawk-666 · · Score: 1

      I use DevPartner for wild pointers. It's just another debugger to me, an expensive debugger, but that's essentially what it does - find bugs.

      --
      All those moments will be lost in time, like tears in rain.
  39. LISP by shuane · · Score: 1

    Um, doesn't LISP achieve the same thing in a far better manner?

    --
    This signature intentionally has just seven words.
    1. Re:LISP by ari_j · · Score: 1

      Yes, it does. I haven't found anything that a hyped-up new language brags about that Common Lisp hasn't done better for a decade or longer.

    2. Re:LISP by nkh · · Score: 1

      but if people were simply introduced to one of these languages early on, ...

      I'm sorry but I have to blame people on this: there are actually more than a thousand good free books on the Internet to learn such languages. All these books almost reach the quality and depth of dead tree versions. If you're too lazy to learn (or at least be curious about) new languages, I predict a dark future for you...

      Here is a link for all the CS n00bs: Google (a very good site ;)

  40. XML information content is too low by Shimmer · · Score: 1

    XML has even less entropy (number of keystrokes required per statement) than COBOL. It's the anti-Perl. Good luck to anyone who chooses to write a program in XML. (Those of you with experience in XSLT already know what I mean.)

    --
    The most rabid believers in American Exceptionalism are the exact same people whose policies are destroying it.
    1. Re:XML information content is too low by SoupIsGoodFood_42 · · Score: 1
      I use a XSLT/XML editor to write my XSL files. It makes it much easier. And I never make typos or get syntax errors as a bonus.

      Besides. You did of course read the artical, didn't you? Because I'm just a bit confused as to why you're assuming that this new idea would require programmers to write in XML-like syntax all the time.

  41. What the hell for? by Fulcrum+of+Evil · · Score: 1

    Seriously, what does this offer over current stuff? If I want to extend my application, I'll embed a script host. Extending the language just aadds the potential for the same code doing different things and giving rise to a whole new raft of bugs.

    --
    "We returned the General to El Salvador, or maybe Guatemala, it's difficult to tell from 10,000 feet"
  42. It's a LISP I tell you by ebunga · · Score: 2, Insightful

    S-expr's and xml are interchangeable, for the most part. Congratulations, you can now be a total degenerate and program in xmlisp.

  43. XML in Java and .NET by Eyah....TIMMY · · Score: 1

    As far as web app development is concerned, XML is more and more present in the two domains, either natively or via open source projects.

    On the Java side, the struts framework provides logic to the front end so developers can use an XML style language to go through lists, create variables, set objects, etc. You can also make all your build scripts using ANT, which allows for function calls, variable assignments, and other simple tasks.

    On the .NET side, ASP.NET pages are in the form of controls, which similarly to the struts framework allow server side logic to be defined through an XML language. You can use NANT also to make builds. Similar to ANT, it allows for many simple programming language tasks including listeners.

    I have yet to see exception handling and OO but I'm sure it's not far away.

    --

    It is not enough to have a good mind. The main thing is to use it well. - Rene Descartes (1637)
  44. "Coming"? by Anonymous Coward · · Score: 0

    Representing code in a structured data form so that languages can have user-extensible syntax and can easily host programs that manipulate other programs as data? Sure, it's not like we haven't had that for nearly FIFTY years now!

  45. Please give me LESS typing, not more by Brento · · Score: 1

    As somebody who loves the speed and elegance of hand coding, the thought of having to hand-code XML is horrifying.

    When designing programming languages, try to relieve your users from carpal tunnel, not contribute to it.

    --
    What's your damage, Heather?
  46. XML is lame by Anonymous Coward · · Score: 0

    XML is lame in the first place and this is the lamest use of it I've ever seen.

    Back to the loch with ye, Nessie!

  47. Uh? by Unknown+Lamer · · Score: 1

    Lisp.

    Heard of it before?

    --

    HAL 7000, fewer features than the HAL 9000, but just as homicidal!
  48. LISP by jonastullus · · Score: 1

    for all those yammering about the many brackets in lisp: how exactly is polluting your code with xml-tags better??

    LISP/scheme is an incredibly extensible language and after having spent the last days learning the basics of haskell, i really wonder how on earth an inferior language like "C++" could ever become this popular!

    for low-level stuff, C is a great language but when it comes to prototyping complex algorithms or simply trying out some whacky ideas, imperative languages like C++ keep your mind so very busy with memory allocation, pointer arithmetic and weird segmentation faults that the chance of finally implementing some intricate algorithm in such a language is really slim (and will definitely produce a HUGE headache).

    i am not saying that LISP/scheme/OCAML/haskell (to name just a few [very different] functional and multi-paradigm languages) are so much better for all tasks, but if people were simply introduced to one of these languages early on, this might have a very beneficial effect on their programming style in any other language.

    and as for extensibility, LISP is seriously unbeatable with its powerful macros and the duality of code and data!

    well, you do your thing with patched-on xml tags in your code and i'm just gonna stick to the languages that were actually thought through!

    jethr0

  49. *sigh* by jmb-d · · Score: 1

    Ever heard of FORTH?

    Geez, it's only been around since 1970...

    And LISP has been around since the 1950s...

    --
    In walking, just walk. In sitting, just sit. Above all, don't wobble.
    -- Yun-Men
  50. Mommy make the bad man go away by Anonymous Coward · · Score: 0

    The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well. -- Phil Wadler, POPL 2003

  51. Great by Trejkaz · · Score: 1

    So we'd have...

    ... xmlns:Foo="urn:code:com/blah/Foo" ...

    Instead of...

    ...
    import com.blah.Foo;
    ...

    Big improvement.

    --
    Karma: It's all a bunch of tree-huggin' hippy crap!
  52. srcML by atmos · · Score: 1

    Don't know how closely related this is, but a professor I used to have is into this kinda stuff. srcML basically builds a parse tree of your code and preserves all sorts of information about it. The idea is to be able to configure your IDE to display the code in whatever format you'd prefer and increase program comprehension among other things.

  53. XML Lisp! by acidrain · · Score: 1

    Trying to get this past the lameness filter...

    a

    b

    --
    -- http://thegirlorthecar.com funny dating game for guys
    1. Re:XML Lisp! by Anonymous Coward · · Score: 0

      You could have showed the "code fragment" in TFA as a lisp expression to get around the lame filter as well.:

      <invoke-expr method="myMethod">
      <evaluate>record</evaluate>
      </invoke-expr>

      vs

      (invoke-expr (method . "myMethod") (evaluate "record"))

    2. Re:XML Lisp! by OffTheLip · · Score: 1

      Oh, that lisp. Give me the old lisp atoms anytime. What could be more clear than : (defun evallist (list env) ;evaluate list (cond ((null list) nil) (t (cons (finkel-eval (car list) env) (evallist (cdr list) env)))))

    3. Re:XML Lisp! by Umbral+Blot · · Score: 1

      I know you kid, but with reasonable numbers of carriage returns and indentation lisp can be about as readable as any other language. I am a C++ man myself (or used to be), but even I would cringe at List* evallist(List* env) {if (!env) {return env} else {return new List(finekl-eval(env->pop), evallist(env))}

    4. Re:XML Lisp! by wirelessbuzzers · · Score: 1

      Extrans is your friend here.

      And that should be a <comma/>.

      --
      I hereby place the above post in the public domain.
    5. Re:XML Lisp! by tallbill · · Score: 1

      HTML escape codes:

      < , or less than is lt;
      >, or greater than is gt;
      and , or amperstand is AMP;

      But I am guessing htat you figured that out. I had the same exact problem ; )

    6. Re:XML Lisp! by bloggins02 · · Score: 1

      Try making a joke in XML, you're screwed

      If you're trying to make a joke in XML, I'm guessing you're screwed to begin with. :)

    7. Re:XML Lisp! by uhlume · · Score: 1

      If you're the sort of person who tries to make jokes in XML, trust me, getting screwed shouldn't even make your list of immediate concerns: it ain't about to happen. ;)

      --
      SIERRA TANGO FOXTROT UNIFORM
    8. Re:XML Lisp! by Anonymous Coward · · Score: 0

      Whoever thought this up must have "markup language" and "programming language" confused

    9. Re:XML Lisp! by Anonymous Coward · · Score: 0

      Cool. Using your C snipet and the tiny little bit of LISP I had heard of, this was the very first time I've ever been able to read LISP and understand it.

    10. Re:XML Lisp! by Soporific · · Score: 1

      Maybe, but not in the literal sense. ;)

      ~S

    11. Re:XML Lisp! by Reverend528 · · Score: 1

      error: cannot have comma outside of a backquote.

  54. possibility? by d1v1d3byz3r0 · · Score: 1

    of course it's possible, and some would say it already exists with languages like Lisp. But it wouldn't look anything like the code example provided. Why would anyone want to program in XML. IMHO, XML syntax is not appropriate for a programming language, it's appropriate for data representation. It's like having a whole language made completely of nouns and adjectives. It's incomplete if you're trying to do anything beyond writing a grocery list. Great languages require nouns and verbs and descriptors. XML-type languages aren't adequate for something like this.

  55. No! by Daimaou · · Score: 1

    The first example in the Slashdot blurb would be the functionality of an editor or IDE, not a language. I can actually see this as being handy; especially if you are working with a bunch of other curly-brace-positioning zealots. The second example just looks stupid though.

    I use XML for some things and it is very useful in some cases, however, I find it more a pain than it's worth in most situations.

    XML has its uses and has its place, but I don't think this is it.

  56. XSLT by Anonymous Coward · · Score: 0

    I've done lots of programming in XSLT, which is an XML-based programming language.

    It's annoying as heck.

    As you use it more and more, you find that there are lots of situations that you can deal with in a "normal" language that have no equivalent expressibility in XML. The problem comes in the strict matching of open/close tags. The easiest way to explain it is in terms of the English language, but code flow is similar. A simple liguistic example is as follows.

    Consider the sentence: The dog walked. This might end up as the following XML: <sentence>The dog walked</sentence>

    But now suppose you have the sentence: He said, "Hello." You CANNOT do: <sentence>He said, <quote>Hello</sentence></quote> Instead, you have to do: <sentence>He said, <quote>Hello</quote></sentence> And then your period ends up on the wrong side of the quote.

    The same thing happens with logic flow statements, and you end up having to copy and paste code or create all kinds of extra functions. For example, suppose you are writing a simple "program" that puts either "<b>...</b>" or "<i>...</i>" around some text depending on whether it is to be bold or italic.

    You can't do this:

    <if bold==true><b></if>
    <if italic==true><i></if>
    Complex code here for inserting text
    <if bold==true></b></if>
    <if italic==true></i></if>

    Instead, you have to do ...

    <if bold==true><b>Complex code here for inserting text</b></if>
    <if italic==true><i>Complex code here for inserting text</i></if>

    It's a big pain because you end up having to break your code into lots of small, unnatural functions that are called a bunch of times from the same small section of code, but nowhere else.

    XML has its place, but as a programming language, it's pretty cumbersome.

    1. Re:XSLT by KnightStalker · · Score: 1

      And then your period ends up on the wrong side of the quote.

      Why should it? In that case, since you're trusting the rendering software to place the full-stop mark, then that software has the flexibility to place the period either before or after the terminating quotation mark. That's a controversy, by the way; apparently it's common in British English to put punctuation outside of a quote in some circumstances if it doesn't belong to the quote, and it's becoming more common in American English, too. In your scheme, you could encode that meaning:

      [sentence]He said, [quote][sentence]The dog walked[/sentence][/quote][/sentence]

      and the rendering software should be smart enough to recognize that the outputted text should end with { ." } and not { .". }. Or, if the nested sentence tags aren't there (as you have it), either { ." } or { ". } according to locale rules or other preferences.

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
    2. Re:XSLT by Anonymous Coward · · Score: 0

      the rendering software should be smart enough

      Everything should be smarter, but some poor bastard has to make it that way. The guy has a point - please tell me when your "rendering software" accounts for every level of natural language grammar.

    3. Re:XSLT by Luke-Jr · · Score: 1

      I refuse to do that anyway. Logic suggests a period should be outside the quotation marks unless it is actually part of the quote.

      --
      Luke-Jr
    4. Re:XSLT by KnightStalker · · Score: 1

      some poor bastard has to make it that way.

      Oh, we'll just not expect software to have any features, then. AFAIK this is not an example of a real system; I think it's reasonable to expect software that places periods after sentences to have some heuristics or criteria for where to place them.

      --
      * And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
  57. just because you can do something by gdulli · · Score: 1

    Doesn't mean you should. Jesus christ, this is silly.

  58. You mean... by wan-fu · · Score: 1

    ...they want to take Lisp and replace all the parenthesis with < and > symbols?

    The article itself clearly states: "Yes, this could all have been done 20 years ago using s-expressions."

    C'mon, LISP has already done this stuff and then some. This "new" idea deserved a publication on ACM AND front page Slashdot? If everyone flocks to this because of s#(#<#, etc. it will be a sad day in programming language history.

  59. Are Extensible Programming Languages Coming? by Anonymous Coward · · Score: 0

    No, it's just the way they're sat.....

  60. XML coding? by Zekaric · · Score: 1


    /* The real code.*/
    ...
    </C_Code>

    It might work.

    Personally, it's the dumbest thing I've heard. Doable sure but who would want to code in it when there are many other languages out there that are nicer to code in (Not just C).

    Lead balloon I think.

  61. Read "On Lisp" by Paul Graham by treerex · · Score: 1

    Paul Graham's outstanding book On Lisp is what you want to read if this interests you at all. Indeed, pretty much anything he has written about Lisp is relevant. Lisp's macro system allows you to do this: you can define your own language constructs.

    The book is out of print but can be downloaded from Paul's site,

    http://paulgraham.com/onlisp.html.

    XML is not God's Gift. XML has had delusions of grandeur pushed upon it. A nice simple representation has morphed into a horrible monster. Ugh.

  62. To the man with an XML solution... by nagora · · Score: 1

    Every problem looks like it needs a factor of ten bloat.

    As with all XML applications I find myself asking "what problem does this solve?" and find the answer is "one in the creator's head".

    I've never understood what the point of XML is. Beyond the purpose of documenting any file format, that is, because that seems to be all it does. And it does it very very badly.

    TWW

    --
    "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    1. Re:To the man with an XML solution... by ErikTheRed · · Score: 1

      While I would agree that XML is usually a solution looking for a problem, there are a few areas where it really, really kicks ass. Specifically, when you are sharing very loosely structured data (structures with lots of optional fields, arbitrary field counts, etc.) between vastly dispate systems. The best example is Electronic Data Interchange (EDI). Everyone I know who has wrestled with ANSI X11 EDI specs sees XML as a godsend. Another good example is (obviously) XHTML.

      --

      Help save the critically endangered Blue Iguana
    2. Re:To the man with an XML solution... by realdpk · · Score: 1

      I used to be very anti-XML. I'm starting to appreciate some parts of it, however. In particular, being able to validate an XML file against a DTD is pretty sweet for finding typos or other weird errors.

    3. Re:To the man with an XML solution... by nagora · · Score: 1
      Specifically, when you are sharing very loosely structured data (structures with lots of optional fields, arbitrary field counts, etc.) between vastly dispate systems

      BNF parser, anyone? A formal bit of documentaion (which you have to do to make an XML schema anyway)? How does XML help?

      Another good example is (obviously) XHTML

      XHTML is the classic example. It adds nothing to HTML 4.01 except the fact that the W3C validator now complains that it doesn't understand what document format an HTML tag indicates! What use is the XHTML spec that makes it better than the HTML spec?

      XML has become useful, but entirely because it has been taken up by so many people that it has an ecosystem. I just can't, and didn't at the time it came out, see any reason to take it up in the first place.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    4. Re:To the man with an XML solution... by nagora · · Score: 1
      In particular, being able to validate an XML file against a DTD is pretty sweet for finding typos or other weird errors.

      That's fair enough, but that's IT. And that's only because you have a DTD. If you'd had a BNF definition, or any formal definition, you could have done that without having to bloat your SOURCE document with all the human-readable, inhumanly-editable, XML chuff. And that chuff goes into EVERY source document.

      I'e used GIS files which had less than 50% data to XML formatting in them and when you're looking at gigs of data that's a criminal waste of space and time.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
    5. Re:To the man with an XML solution... by 91degrees · · Score: 1

      I'e used GIS files which had less than 50% data to XML formatting in them and when you're looking at gigs of data that's a criminal waste of space and time.

      Perhaps, but to be fair, XML compresses well, and if you're using that much data, there's usually no good reason not to use some sort of compression.

  63. This is already old hat by Anonymous Coward · · Score: 0

    There are already XML based programming languages

    ANT for example, and it is indeed extensible
    http://ant.apache.org

    Possible, yes. In fact actual.

  64. How about... by Anonymous Coward · · Score: 0


    Hello World!
    </write>
    <format statement="10">20A</format>

    ??

    Goodness I am rusty!

  65. Like rain on your wedding day by jvalenzu · · Score: 1

    One of the great ironies of the early 21st century is that the programmers who build component systems for others are strangely reluctant to componentize their own tools.

    That's not one of the great ironies of the early 21st century. It's minor and uninteresting. Let's wait until the end of the 21st century before we employ this sort of hyperbole.

  66. Meta Language by LetterJ · · Score: 2, Informative

    For those that haven't seen it, there's a guy who's done something similar with MetaL, his meta programming language in XML that generates several existing languages out of it.

    http://www.meta-language.net/

  67. This whole idea is crazy. by christopherfinke · · Score: 1

    I don't get it.

    1. Re:This whole idea is crazy. by Anonymous Coward · · Score: 0

      obviously

  68. I built this a while ago... by calistoga_water · · Score: 1

    this already exist with server side systems; cause i built them using reflection in 1999. One major problem...its too slow and you have to type into too much just to get something done and xml is like lisp with all the tag crap. jsp works better; its a happy medium between total programming and xml-script-programming. xml alone does nothing except stir the imagination to build another un-needed format.

  69. Anybody that's completed a CSCI by Jhawkeye83 · · Score: 1

    Will know does this already.

    --
    Quality over Quantity.http://www.virusgaming.com/
  70. XML Lisp! by acidrain · · Score: 3, Insightful

    Wow, I never had this much trouble posting on slashdot before. Try making a joke in XML. Your screwed... First it rejects repeated tags and then silently deletes the tags it doesn't like.

    <parenthesis>
    <parenthesis>
    a
    <comma>
    b
    </parenthesis>
    c
    </parenthesis>

    --
    -- http://thegirlorthecar.com funny dating game for guys
  71. xml? programming language? by p2sam · · Score: 1

    Am I the only one who is wincing: "ewwww ...." ?

  72. o:XML - Object-Oriented XML by Anonymous Coward · · Score: 0

    http://www.o-xml.org/

    Oh yeah...

  73. Holy mother of all that is good, NO! by Mirk · · Score: 4, Interesting

    Three and a bit years ago, as a satire on the absurd over-enthusiasm for all things XML that was then taking over the world, I invented a parody language, XMC. Guess what? The over-enthusiasm for XML has continued unabated and now has taken over the world. And so life imitates art.

    Herewith, a sample XMC program:

    <?xml version="1.0" encoding="ISO-8859-1"?> <program language="c" xmlns="http:miketaylor.org.uk/xms/1.0/"> <include type="sysfile">stdio.h</include> <function type="int" name="main"> <params> !-- No parameters --> </params> <statement> <expression> <fncall fnname="printf"> <arguments> <argument> <constant type="int" value="0"/> </argument> </arguments> </fncall> </expression> </statement> <statement> <return> <constant type="int" value="0"/> </return> </statement> </function> </program>

    Exercises for the reader:
    1. What does this do?
    2. Is it easier to read than the corresponding C program?

    --

    --
    What short sigs we have -
    One hundred and twenty chars!
    Too short for haiku.
    1. Re:Holy mother of all that is good, NO! by Piquan · · Score: 4, Funny

      At a guess, it segfaults when printf tries to read its formatting string and gets (on most platforms) a null pointer instead.

    2. Re:Holy mother of all that is good, NO! by Mirk · · Score: 1
      At a guess, it segfaults when printf tries to read its formatting string and gets (on most platforms) a null pointer instead.

      Arrrghghghhghg!

      You are completely right, of course. Here is the fixed version:

      <?xml version="1.0" encoding="ISO-8859-1"?> <program language="c" xmlns="http:miketaylor.org.uk/xms/1.0/"> <include type="sysfile">stdio.h</include> <function type="int" name="main"> <params> !-- No parameters --> </params> <statement> <expression> <fncall fnname="printf"> <arguments> <argument> <constant type="string" value="Hello, world!\n"/> </argument> </arguments> </fncall> </expression> </statement> <statement> <return> <constant type="int" value="0"/> </return> </statement> </function> </program>

      Thanks for spotting my oversight.

      --

      --
      What short sigs we have -
      One hundred and twenty chars!
      Too short for haiku.
    3. Re:Holy mother of all that is good, NO! by malakai · · Score: 1

      1. Nothing. "printf 0" I doubt would compile.
      2. It's not easier to read for a human. But the purpose of this article was that it would be easier to read for a program. And the reader/parser would be far more language agnostic, which allows more reuse of Testing, AOP, and Security Auditing tools against different codebases written in different languages.

      Either way, this is slashdot. It's only a matter of time until someone post how coding in machine specific binary is the only way to code, blah blah blah, xml is fat, blah blah blah can you make an xml schema for xml schema, blah blah SGMIL blah.

    4. Re:Holy mother of all that is good, NO! by malakai · · Score: 1

      If your IDE/Editor of choice, had outputed all your code in that XML fashion, a very simple XSL transform that compared the function signature of the 'stdio.h' lib to all your 'fncall' tags, could have easily warned you of such an impending failure.

    5. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 3, Interesting

      I think just about all the posters on this thread are mostly missing the point. The goal is not to have programmers writing XML. The goal is to provide a "programmer -level" -language-independent way to represent programs in both conventional (brittle) languages like C++, and in extensible languages like Lisp.

      Why would anyone want to do this? Programmer A writes a piece of code that has a confusingly-named identifier, say xglorp. Programmer B, doing maintenance on that code, wants to do a global search and replace on the bad identifier; not a replace of the string-form of that identifier -- not something like %s/xglorp/EventExitStatus/g in vi -- but on all the occurrences of that actual identifier in the code. To do this, your editing tool needs to be able to look at the parse tree; hence you need some cooperation from your compilers + linkers + editing environments, all working together.

      The idea is not to have people writing XML. You would write in your own real language, and your program would be translated into XML, and saved that way. The next programmer asks to have the program represented in his language-de-jour. If his language and your language are semantically similar, this can work. If they're not, it won't work, since you are trying to solve the UNCOL problem (the holy grail for the universal intermediate representation, which does not exist).

    6. Re:Holy mother of all that is good, NO! by gmplague · · Score: 1

      the line:

      !-- No Parameters -->

      would probably not compile, as you're missing the left angle bracket.

      --
      __________________________________________
      Take comfort in your ignorance.
      Grandmaster Plague
    7. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0

      [sorry readers, my english is not too good]

      2. Xml is the best format for text exchange because, -- when serialized -- it's a superset of plain-text with common ways of expressing hierarchy, attributes, etc.

      It's more standard than c syntax (because each has it's own variation on "function name() ".

      So because of this I think it might be useful for language interchange. Perhaps people continue to write c#, java, and it's converted to an xml structure and then the library.

      Although the .Net IL achieves abstraction it's at a different level and is too low, losing necessary structure such as names and comments.

      Being Xml at an intermediate stage rather than another text format also means more parsers, validators, and time-tested software.

    8. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0

      If I had points I'd mod you up, dude. Excellent post.

    9. Re:Holy mother of all that is good, NO! by Minwee · · Score: 1

      No, I think the original was better. It gave a more detailed example of what the language was capable of.

    10. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0

      Not only could it enable smarter interactive search/replace, but also a more powerful diff and patch mechanism. Useful, for example, in the next generation of source control systems.

    11. Re:Holy mother of all that is good, NO! by schmaltz · · Score: 1

      1. It generates a compiler error, thanks to the missing ''?

      2. Well, your choice of formatting without newlines leaves it a visual mess. However, as a veteran of a number of systems built around XML's bastard child programming language, XSLT, I haertily put forth that tersity is grossly undervalued in the XML world.

      XSLT seems to come from a place lacking in full pragmatism: a) We gotta type all that code, b) Yeah, some editors make the task easier, but c) Something about programming languages built in XML makes me think of Eiffel Towers and Brooklyn Bridges built of toothpicks: brittle and difficult to assemble.

      It seems a product of academia (dock me if I'm wrong on this. ;)

      --
      Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
    12. Re:Holy mother of all that is good, NO! by schmaltz · · Score: 1

      Whoops, that first line should've been-

      1. It generates a compiler error, thanks to the missing '<' in front of the !--?

      --
      Big Daddy, Johnny, Burp, Aunt Zelda, Scott, Slurp, Big Momma ... where's Siggy?
    13. Re:Holy mother of all that is good, NO! by kjamez · · Score: 1

      first and foremost, it is a lot easier to read in a tabbed type viewer/editor, where open tags start and end on that same tab and everything beneath is tabbed one more ... surely you've seen this primitave method of formatting code (althought i admittingly have no set method of start/stop tags i prefer/use) ...

      i agree that xml has no place even beginning to start to replace compiled binary type programs (just cutting the parser out gives it that much less a fingerprint), but it's uses as a replacement for html (xhtml...) and the portability as far as output formatting/layout/etc are limitless. eg: stuff that *already* has an interpreter. php powered xml has limitless possibilites ...

      i especially like the arbitrary nature of xml, where i can name things whatever i like whenever i feel like naming it that.

      nevermind, i've been drinking. i'll stop talking.

      --
      you can't have everything, where would you put it?
    14. Re:Holy mother of all that is good, NO! by adamfranco · · Score: 1

      The next programmer asks to have the program represented in his language-de-jour. If his language and your language are semantically similar, this can work. If they're not, it won't work, since you are trying to solve the UNCOL problem (the holy grail for the universal intermediate representation, which does not exist).

      Even better, think about internationalization of the language constructs themselves. Take a loop through an iterator for example:

      while (iterator.hasNext()) {
      object = iterator.next();
      }

      An Argentine programmer, for instance, could open the same source in his editor with the Spanish pack for that language and be able to read the code as something like:

      mientras (iterator.tienePróximo()) {
      object = iterator.próximo();
      }

      Non-english speakers get by currently, but their lives could be made much easier with the language abstracted a level.

      Additionally, I'm really hankering for in-code diagrams, links, and other non-"pure text" as part of the in-line comments. That sort of thing makes maintaining a separate manual for libraries/frameworks either unnecessary or simply a matter of translating the source comments into a full manual -- like JavaDoc on steroids.

      --
      "When ideology and theology couple, their offspring are not always bad but they are always blind." -- Bill Moyers
    15. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0
      At a guess, it segfaults when printf tries to read its formatting string and gets (on most platforms) a null pointer instead.

      On all platforms. At least all of them that meet the C standard. If you have K&R 2nd edition, look at p. 102, where it says this:

      Pointers are integers are not interchangeable. Zero is the sole exception: the constant zero may be assigned to a pointer, and a pointer may be compared with the constant zero. The symbolic constant NULL is often used in place of zero, as a mnemonic to indicate more clearly that this is a special value for a pointer. NULL is defined in <stdio.h>.

      So basically, NULL is just defined with a
      "#define NULL 0", and nothing more complicated than that. (In fact, defining it as
      "((void *) 0)" is tempting, and does occur in some C header files, but it's wrong!)

    16. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0

      Probably easier to read than the corresponding PERL script. (Granted the PERL script would be smaller by a factor of a billion or so).

    17. Re:Holy mother of all that is good, NO! by Piquan · · Score: 1

      Thanks for the info. While you did qualify this with "the C standard", I was mostly thinking of obscure systems when I qualified this. For example, on a system that predates prototypes, the value will generally get pushed onto the argument stack as an integer 0, but read off as an all-bits-zero pointer, which isn't necessarily a null pointer (but you already knew that).

      "((void *) 0)" is tempting, and does occur in some C header files, but it's wrong!

      Actually, it is allowable under ANSI C; see the comp.lang.c FAQ, sec 5.6, or the Rationale, sec 4.1.5.

      Of course, in this case whether or not printf sees a null pointer here is academic anyway; the actual behavior of printf under these circumstances is, I believe, undefined.

    18. Re:Holy mother of all that is good, NO! by term8or · · Score: 1

      Only on slashdot would someone write code in an imaginary language, get told that it would crash, and then post a revised version.

      --



      "As a writer / novelist you might want to spellcheck your sig. :) " - AC
    19. Re:Holy mother of all that is good, NO! by SoupIsGoodFood_42 · · Score: 1

      Exercise for the poster: Read the article.

    20. Re:Holy mother of all that is good, NO! by 91degrees · · Score: 1

      On all platforms. At least all of them that meet the C standard. If you have K&R 2nd edition, look at p. 102, where it says this:

      Does K&R (or any other standard) state what printf should do in terms of input checking? It's possible that there is at least one implementation that has a NULL pointer check.

    21. Re:Holy mother of all that is good, NO! by Anonymous Coward · · Score: 0

      1) What does this do?

      Fails to compile.

      Parse error in line 2, character 86: unexpected token "!-- No parameters -->", missing "".

      2) Is it easier to read than the corresponding C program?

      Define easier. It'd be a heck of a lot easier for me to write a parser for it...

      But seriously, I'd much rather maintain a pile of crappy C code over a pile of wonderful XML.

      In my experiences, the top 2 challenges as a professional developer are a) effectiveness -- getting the code out correctly and quickly, and b) maintaining other developers code. Both of these are made more difficult by the XML code concept.

    22. Re:Holy mother of all that is good, NO! by REggert · · Score: 1

      Well, first of all, it won't compile, since printf expects as const char * as its first argument, not an int.

      Secondly, not that I'm advocating writing all our code in XML, but your example isn't really fair from a readability standpoint. You didn't provide any whitespace (especially indentation)!

      The equivalent C program would look like this:

      #include <stdio.h>
      int main(){printf(0);return 0;}

      Hmm... well, that really isn't too hard to read, but if you through some newlines and tabs into your XMC version, that really isn't that horrible to read either (just excessively long).

      In any case, as was pointed out in other comments, the point of the article is to provide a standardized format for storing and internally representing source code within editors, which will convert it into a more human-friendly representation.

      I agree that XML is overhyped, though. Automake kicks ant's butt any day of the week.

      --

      cp /dev/zero ~/signature.txt

  74. ASN.1 and XML by Anonymous+Cowherd+X · · Score: 5, Insightful

    Programs are written by humans and they should stay easily legible and comprehensive to humans. Going to such extremes as to use XML as the author of the article suggests would defeat that purpose, it's a common trap that people who get too deeply involved with something fall into - they want to make everything use the object of their obsession. I don't recall any ASN.1 zealots trying to push for something that extreme, but with XML there are more and more people who are pushing for XML to be where it should not.

    1. Re:ASN.1 and XML by nezroy · · Score: 1

      You miss the point. Your editor would make the code easily legible and comprehensive to humans. Your editor would understand the specific XML markup, and display the program to you in the same way that you see source code now. In fact, because of the markup, your editor could display the code to you in an even simpler and more intuitive form. This is no different than what your editor does now, which is to take a string of bits and turn them into ASCII characters -- it is simply another level of abstraction.

    2. Re:ASN.1 and XML by Anonymous+Cowherd+X · · Score: 2, Interesting

      Your editor would make the code easily legible and comprehensive to humans.

      Such an editor introduces an unnecessary layer of abstraction which only makes coding more complex and error-prone. The real experts will need to know how to at least read if not write the underlying XML code because there will be cases where just using your abstract higher-level editor will be insufficient to track down a bug. There is no need for this, parsers are not going to be more efficient because of it and humans will not be able to do their jobs better because of it.

    3. Re:ASN.1 and XML by Anonymous Coward · · Score: 0
      I disagree. Using a *different* form to express a language can actually remove abstractions. Often artifacts are found in languages which make the language less expressive. A huge number of people talk about LISP as being a great and expressive language. The problem is that LISP is nearly impossible to read and write. The problem is that LISP trades of readability with expressiveness.

      Using an editor could allow the expressiveness of LISP with a much easier to manipulate language. It can also handle mixing data with code a lot easier than currently. This makes the parser/compiler's job easier and makes the developers job easier. Everyone wins. Just don't try and edit the code yourself by hand.

    4. Re:ASN.1 and XML by Anonymous+Cowherd+X · · Score: 1

      I disagree. Using a *different* form to express a language can actually remove abstractions.

      But encapsulating the core, underlying language like that only masks the real problems with the underlying language. In time people will be totally unaware of those inconsistencies and peculiarities of the underlying language and when things go wrong they will not know how to fix them. This would be just a workaround for problems that should be fixed where they were introduced - in the underlying language itself.

    5. Re:ASN.1 and XML by m50d · · Score: 1

      No, this makes sense. It doesn't have to be XML, but the whole point is to make it easy to parse in any language. What else would you suggest? You're trying to make a way to represent a programming language that it is as easy as possible to write scripts and programs to modify. Go on.

      --
      I am trolling
    6. Re:ASN.1 and XML by Anonymous Coward · · Score: 0

      I don't recall any ASN.1 zealots. Full stop.

  75. Only 40 years late by s1234d · · Score: 1

    Sounds like Lisp to me, only more inefficient.

  76. why the hell not? by monkeyboy87 · · Score: 1
    I don't think its being suggested that we program in xml directly but use a better editor to read/understand xml markup and present it to us in a better way. I for one would welcome having source files be more like word processing files. I would like to be able to embed a real image or bitmap in the document instead of tab-damaged ascii art showing things like bit map layouts our being able to click on embedded http links in comments. Let the editor give me a view that I can use and be friendly and let my 3ghz machine extract the raw .C or .cpp etc to feed to the monolithic compiler and take advantage of its raw computational power

    By having the code in a structured format, it would be far easier to do things like static analysis, metrics, or reverse engineering of code, without resorting to hand to LEXX/YACC combat. simply understanding the sequence of nodes and we would be good to go to write some nice tools.

    1. Re:why the hell not? by SteeldrivingJon · · Score: 1


      Code *is* in a structured format.

      --
      September 2011: Looking for Cocoa/iOS work in Boston area Cocoa Programmer Quincy, MA
  77. What a revolutionary idea! by Theatetus · · Score: 1

    An extensible language whose syntax can be manipulated programmatically? Why has nobody thought of this before?!

    --
    All's true that is mistrusted
  78. CFML by ignipotentis · · Score: 1

    Anyone seen CFML lately?

    --
    Don't waste time... procrastinate now!
  79. Great idea.. and very practical. by Anonymous Coward · · Score: 0
    I don't see anyone using a text editor to edit languages in the future though. I'm currently looking at using Argot( http://www.einet.com.au/ of which I'm a developer ) instead of XML as the language format. Using a plugin for eclipse, the user doesn't even need to know the format of the file.

    The language I'm develolping is currently looking like a "scripting" language built on java with many lisp type concepts. The nice thing about Argot is that I can add new concepts into the language dictionary whenever I want.

    In the future I hope to develop a browser that allows mixing data and code seamlessly. The Argot dictionary concept allows this to happen easily. The fact Argot is binary also makes it compact.

    Even further into the future it would be nice to see virtual machines with dynamic byte code. I've got ideas of using Argot for this too, but that can wait. :)

  80. You missed a key point in the article... by malakai · · Score: 3, Informative
    From the article:

    We believe that next-generation programming systems will most likely store source code as XML, rather than as flat text. Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors. For example, a program stored on disk like this:

    <doc>Only replace below threshold</doc>
    <cond>
    <test>
    <compare-expr operator="less">
    <field-expr field="age">
    <evaluate>record</evaluate>
    </field-expr>
    <evaluate>threshold</evaluate>
    </compare-expr>
    </test>
    <body>
    <invoke-expr method="release">
    <evaluate>record</evaluate>
    </invoke-expr>
    </body>
    </cond>

    would be viewed and edited like this: // Only replace below threshold
    if (record.age > threshold) {
    record.release();
    }

    Crucially, code will not be stored as uninterpreted CDATA within XML documents and programmers will not see (much less type in) XML tags. Such a representation would have all the disadvantages of JSPs, Ant, and other hybrid systems, without bringing any tangible benefits. Instead, XML will represent the program's deep structure. Only time and experimentation will tell whether this turns out to be something like an annotated syntax tree or something more abstract.


    It's not that big of a deal to implement. Just get the major IDE's to play along, all will no doubt retain the ability to persist or convert to ASCII tokens when needed. The benefit comes when your in a very large enterprise project and you want to write some automated code testing or style checking, or even security audits. Being abstracted from the specific languages TOKENS lets you write a relative language neutral code auditor with ease.

    I'd easily use XSL + XPATH to do some major change over using a big ass regex.
    1. Re:You missed a key point in the article... by Tackhead · · Score: 2, Funny
      > We believe that next-generation programming systems will most likely store source code as XML, rather than as flat text. Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors. For example, a program stored on disk like this:

      Slashdot: IT/Security: Tuesday, January 18, 2006:
      "New MyDOOM.OOP virus attacks programmers"

      A new virus has been unleashed against developers. The new virus exploits an XML parsing vulnerability in /usr/local/vi and /usr/local/bin/emacs...

    2. Re:You missed a key point in the article... by Calroth · · Score: 1
      The parent has exactly gotten the point.

      You would never edit the raw XML of your source code, in fact, you would never even see it, any more than you would see the raw HTML of your web pages. (OK, so some people use notepad.exe to edit their web sites, but I ain't that hard.)

      Advantages:
      1. Formatting. As mentioned in the article. The days of 4-space vs 8-space tab debates are over. The days of curly-braces-on-the-same-line vs next-line debates are over. You view your source the way you want to, other developers view it the way they want; the underlying XML stays the same.
      2. Changing stuff. As mentioned by the parent. If (for example) variable names are well-defined, then the IDE can go and rename them all at will.
      3. Validation. Suddenly, parsing all that code becomes much easier, because we have a well-established XML validation mechanism.
      4. Smarter editors. Drag an if-then block into your source code. Drag a for loop block into your source code. Your editor can collapse or expand blocks. Your editor only allows you to use declared variable names in assignments. Your editor makes it so that any code you write is, by definition, well-formed.

        OK, not everybody will like this last idea (this is Slashdot, where half the population likes Emacs, and the other half likes vi), but it makes sense to me.



      And, of course, for anybody who doesn't like XML, it's just a simple XSLT transform to get your original source code back.
    3. Re:You missed a key point in the article... by Anonymous Coward · · Score: 0

      This is another example of Slashdot recoiling in horror in response to an idea that they haven't devoted two seconds to trying to understand.

    4. Re:You missed a key point in the article... by SunFan · · Score: 1


      Hmmm...the summary of the article was terribly written, causing the understandable recoil, but if your summary is accurate, there are much fewer things to complain about. The things I can think of are:

      - CPU power. IDEs tend to need a fast computer to work well, which is why vi is still so appealing to programmers. The "computers are so fast..." arguments always break down it seems.

      - Using XML requires that the complete grammar of the language can be captured accurately by an XML schema. Would this always be possible?

      - What happens when XML or its related standards change (again)? Plain ASCII or UNICODE storage is very stable.

      However, I really like the display-independence (because 4-space tabs and braces on the same line are wrong ;). Also, compiling might be faster, because the parsing is less complex.

      I dunno. If I never have to see the XML, I might be able to tolerate it.

      --
      -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
    5. Re:You missed a key point in the article... by Lusa · · Score: 2, Insightful

      I'm not certain I see any real benefits listed, for 2, 3 and 4 this currently exists without using XML. This is because of something very simple... languages have formally defined syntax. Thats so the compiler can do its job without becoming a mind reader to work out what the programmer really meant. I'm not even sure how its possible using XML as a storage mechanism (whilst still editing something that looks like normal source code) will force well defined variable names. That comes down to the discipline of the programmer in question, I could still use i, j, k and l if I wanted to.

      If 4 was ever implemented, you would be welcoming in maybe the slowest programming language on the planet. Besides, drag and drop already exists (VB anyone?) not to mention most IDE's will have templates which provide what you want at a quicker rate and I wouldn't even want to think of how big the dnd pallete would need to be for all the possible language constructs out there.

      If I were to pick one example of where this already exists I'd pick Eclipse, though Visual Studio has similar features. It creates in memory AST's of the source being edited so that most refactoring operations are a breeze (2). This also means it validates the code as its being typed (3). Templates allow dropping in most common language constructs and it can automagically fill in what it thinks are the most appropriate variables for method calls (4).

      So far, besides the first point the rest already exists..

    6. Re:You missed a key point in the article... by tomhudson · · Score: 3, Informative
      I'll believe it when I see it (and maybe not even then :-)
      1 Formatting. As mentioned in the article. The days of 4-space vs 8-space tab debates are over. The days of curly-braces-on-the-same-line vs next-line debates are over. You view your source the way you want to, other developers view it the way they want; the underlying XML stays the same.
      You can already do that with a simple script on any source. No nead for xml.
      2 Changing stuff. As mentioned by the parent. If (for example) variable names are well-defined, then the IDE can go and rename them all at will.
      Again, no big deal for a simple script (which is what a lot of code obfuscation scripts do).
      3 Validation. Suddenly, parsing all that code becomes much easier, because we have a well-established XML validation mechanism.
      Just because something parses ok doesn't mean it's valid code ... look at how much stuff parses ok, compiles ok, but doesn't run as expected.
      4 ... Your editor can collapse or expand blocks.
      ... both vi and kate already do this ...
      Your editor only allows you to use declared variable names in assignments.
      Not a good idea for languages that auto-vivify unpredeclared variables ... or languages that allow the creation of new variables and/or new types of variables at runtime, or for anonymous variables (and anon. functions/methods) ... or for dynamically-generated runtime code.

      I doubt I'll be using it any time in the next decade.

    7. Re:You missed a key point in the article... by Brandybuck · · Score: 3, Interesting

      You would never edit the raw XML of your source code...

      Call me an old fart, but why couldn't I edit the raw source code? My PHB can't understand why I don't use MSWord to write C++ code. He can't grok the concept of plain text. "Puh-lane tekst" I keep telling me, but he keeps complaining that he wants my local variables in a different font. Now you come along validating his insanity!

      The days of 4-space vs 8-space tab debates are over.

      Here's a clue: those days were over decades ago. Some people still argue over it, but they're the type of people who argue over nothing. Just ignore them and move on. If you cater to their quirks and foibles you only encourage them. Here's the answer to that debate: it doesn't matter because it's too trivial to bother with.

      Suddenly, parsing all that code becomes much easier, because we have a well-established XML validation mechanism.

      Thank goodness! I don't know how many more years I could have put up with stupid compilers not being able to validate my code.

      Drag an if-then block into your source code. Drag a for loop block into your source code. Your editor can collapse or expand blocks.

      Since when did you need XML for this? Correct me if I'm mistaken, but doesn't Kate/Kdevelop do this already? I understand that many of you use that leprous shit of an editor that comes with Visual Studio. But that's no excuse to eliminate plain text source code. Get a real editor and stop dragging the rest of us down to your level.

      --
      Don't blame me, I didn't vote for either of them!
    8. Re:You missed a key point in the article... by Jeremi · · Score: 1
      It's not that big of a deal to implement. Just get the major IDE's to play along


      You'll have to pry my vi out of my cold dead hands you commies!

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    9. Re:You missed a key point in the article... by Calroth · · Score: 1

      I should clarify.

      You can already do all of the above. This is simply formalising it and saying, hey guys, this is the baseline from which to work. It also makes things trivial and lets you do things in a way that's not "the hard way".

    10. Re:You missed a key point in the article... by Calroth · · Score: 1

      Since when did you need XML for this? Correct me if I'm mistaken, but doesn't Kate/Kdevelop do this already? I understand that many of you use that leprous shit of an editor that comes with Visual Studio. But that's no excuse to eliminate plain text source code. Get a real editor and stop dragging the rest of us down to your level.

      Sigh.

      The point is that editors like Kate or Kdevelop would use these behind the scenes, and as a developer, you wouldn't know any better. It would still look like a text editor. It would still work like a text editor. But underneath, in the bits you don't ever consider, it would be more sophisticated.

      Do you think you're typing text into the Slashdot comments text box? That's certainly what it looks like, but underneath, your web browser is translating character entities and doing other mind-numbing encodings that you don't know about. Heck, underneath, your web browser is sending a stream of numbers to the web server. But you don't care about that, nor should you. The same goes for XML code. Should be completely transparent.

    11. Re:You missed a key point in the article... by Calroth · · Score: 1

      CPU power. IDEs tend to need a fast computer to work well, which is why vi is still so appealing to programmers. The "computers are so fast..." arguments always break down it seems.

      It would require about as much CPU power as an HTML editor, since that's essentially what it would be. Less power, in fact, since you're probably not doing all this fancy formatting.

    12. Re:You missed a key point in the article... by mario_grgic · · Score: 1

      What if your editor of choice is VI, then you will be forced to view the XML yourself.

      Remember, even though it is 2005, there are still good programmers out there using VI.

      --
      As the island of our knowledge grows, so does the shore of our ignorance.
    13. Re:You missed a key point in the article... by Brandybuck · · Score: 1

      It doesn't matter what happens underneath the surface of a text editor! Emacs is Lisp underneath, but I can still use it despite my complete ignorance of all things Lisp. But when I save my file I've been editing in Emacs, it had damned well be plain text and not Lisp!

      This article isn't about what editors and compilers and other tools will use underneath the surface in the future. Instead it's about the actual DATA they will be manipulating! Call me a neanderthal, but I want my C++ code to remain fully and completely C++. When I save the file I want it saved as C++. When I check it in to the code base I want it checked in as C++. When I print it out for a code review I want it printed out as C++. When I attach to an email I want C++ sent.

      And dammit I don't want to have to use an Export dialog to make it behave!

      --
      Don't blame me, I didn't vote for either of them!
    14. Re:You missed a key point in the article... by QuantumG · · Score: 1

      Yep, and the people who have grasped it are spending their time explaining it to the morons who havn't grasped it, rather than talking about what has been presented and sharing information about which projects are trying to implement it.

      --
      How we know is more important than what we know.
    15. Re:You missed a key point in the article... by Anonymous Coward · · Score: 0

      It also brakes diff.

    16. Re:You missed a key point in the article... by vally_the_poo · · Score: 1

      Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors

      So you will be able to program in MS-Word. I hope that the clip will remain...
      Wouaw, that's progress !

    17. Re:You missed a key point in the article... by Anonymous Coward · · Score: 0

      In other words, it's exactly like any other language, except it's now XML so it's COOL DUDE!

    18. Re:You missed a key point in the article... by Chembryl · · Score: 1

      Wow, you are lucky. My PHB wants me to stop writing classes and write VB Modules because 'OO is too complex' to understand. Want to swap?

      --
      - This and all my posts are public domain. I am a Physicist. I am not your Physicist. This is not Physically advice
    19. Re:You missed a key point in the article... by Taladar · · Score: 1

      Creating a script to change 4-space-tabs to 8-space-tabs is 1 (short) line of shell-script (sed actually) without XML. I don't think your XML code for that would be simpler...

      Don't create problems where there are none: KISS

    20. Re:You missed a key point in the article... by Calroth · · Score: 1

      Creating a script to change 4-space-tabs to 8-space-tabs is 1 (short) line of shell-script (sed actually) without XML.

      Right. Now create a script to do it when the coder has forgotten to put any tabs in it at all, when the spacing is inconsistent, when there is a mixture of tabs and spaces. Create a script to move all curly braces onto their own lines. Create a script to remove all spaces before and after brackets. Create a script to rewrap long parameter lists onto new lines.

      With XML, these are not issues, by definition. Not only are they not issues, they simply can never be. XML gets rid of this entire class of problems. It's like memory management... garbage collectors came along, and an entire class of problems just disappeared. (OK, GC is not a universal panacea, but it's a close analogy.)

    21. Re:You missed a key point in the article... by babbage · · Score: 1
      Wow that XML is ugly. I'm not a Lisp hacker, but come on, wouldn't that be much simpler & clearer as a Lisp-styled S-expression? Consider (apologies in advance for the faked-out indentation with _underscores_, due to broken comment markup rules, that was as clean as I could get it...):
      ('Only replace below threshold)
      (cond
      _ (test
      __ (compare-expr operator="less"
      ___ (field-expr field="age"
      ____ (evaluate record)
      ___ )
      ___ (evaluate threshold)
      __ )
      _ )
      _ (
      __ (invoke-expr method="release"
      ___ (evaluate record)
      __ )
      _ )
      )

      As I say, I don't know Lisp, I've never coded in it (before 5 minutes ago when I started this post), and I'm not sure how Lisp/Scheme syntax usually captures things like XML attributes, or name/value pairs, etc. But come on, this is on the right track, isn't it? And isn't it waaaay easier to read and understand than the XML version?

      If XML is proof of anything, it's that the MIT hackers were right decades ago when they started out trying to win the world over to Lisp. All XML is, is ridiculously verbose Lisp, right?

    22. Re:You missed a key point in the article... by tomhudson · · Score: 1
      just google for pretty print __your_language___

      for example: Results 1 - 10 of about 2,290,000 for pretty print c code. (0.29 seconds). Problem solved.

    23. Re:You missed a key point in the article... by Calroth · · Score: 1

      just google for pretty print __your_language___

      You have pointed me to a bunch of very fine solutions to a problem that should not exist in the first place.

    24. Re:You missed a key point in the article... by cakoose · · Score: 1
      - Using XML requires that the complete grammar of the language can be captured accurately by an XML schema. Would this always be possible?

      Just to be clear, you don't have to capture the language's grammar. You have to encode the AST, which isn't that difficult because ASTs are typically encoded with normal C-style structs. There's some additional formatting information you'd need to keep track of, but I don't think that'll be a major problem.

      Also, compiling might be faster, because the parsing is less complex.

      Bison-generated parsers are pretty fast. I think it's the lexical analyzer that takes the longest (since it has to look at every single character). I'm guessing that an XML formatted program, being more verbose, would be slower to compile. I'd rather have the program be stored in an efficient binary format, making parsing really fast.

    25. Re:You missed a key point in the article... by tomhudson · · Score: 1
      Is this really THAT big a problem? So I don't indent my code like you do - so what? So I use 8-space tabs for everything, in every programming language - so what? So I always put the opening brace on the same line as the function name - so what?

      The only time I change my style is with assembler - again - so what?

      None of these are big deals when working with professionals. Variable naming conventions and lack of comments are more of a problem than code formatting style ever will be.

    26. Re:You missed a key point in the article... by Calroth · · Score: 1

      Is this really THAT big a problem?

      No, it is not. Is it relevant how big the problem is?

      If you want big problems, try the tsunami in the Indian Ocean. 175,000 dead. Dead. Not even variable naming conventions or lack of comments compare.

      The topic was about solving a problem, and if you don't think that it's a big problem, so be it. I think it is a big problem, but it's possible that I see aspects of it that you don't (or perhaps the other way around).

    27. Re:You missed a key point in the article... by tomhudson · · Score: 1

      I don't think it's a problem, never mind a big problem.
      But if I'm looking for a *big* problem, the 10 degree C rise in temperature over the next 50 years is going to be a bigger catastrophe than a nuclear war would have been :-(
      The big problem I see with this is that people are then going to want to add such things as "use language:lang_spec" in addition to "use namespace:", and make really bastardized code.
      For example:

      use language:c;
      char* v1, v2;
      v1=argv[1]; v2=argv[2];
      use language:mysql;
      insert into v1 (street) values (v2);
      use language:c;
      for(int i= 18; i<45; i++) {
      use language:mysql;
      select * from v1 where age = i;
      use language php+perl;
      print "selective service candidate $_\n";
      }
      You can smell it coming. ....ahhgggg!!!!

    28. Re:You missed a key point in the article... by 2short · · Score: 1

      " Correct me if I'm mistaken, but doesn't Kate/Kdevelop do this already?"

      I have no idea, but as one of the users of the leperous shit, I can tell you that Visual Studio certainly does this already, along with everything else the article author seems to be hoping to get a few years from now.

      I really don't get what the guy is thinking. XML is great if you want to make up a well defined way to structure some data. And you get all kinds of wins if you can put your data in well defined structured formats that everyone agrees about the symantics of. But, clue stick time, source code is ALREADY in a well defined, structured format everyone agrees about the symantics of. I guess if your format isn't one a lot of people have thought much about manipulating and working with XML might still be a win. Let's see, is that the case with say, C code?

  81. Haskell is a language for writing languages. by shapr · · Score: 5, Informative
    This is a standard paradigm in the Haskell world. You write a new language that fits the problem domain. These are called Domain Specific Languages
    For example, Simon Peyton-Jones wrote a combinator library to describe financial contracts and used it to describe the collapse of Enron. (With fascinating conclusions!)
    Paul Hudak has written Dance and Haskore. Dance is a language that describes dance choreography, with a handy OpenGL viewer. Haskore is a music scoring language where code looks like:
    > cMajScale = Tempo 2
    > (line [c 4 en [], d 4 en [], e 4 en [], f 4 en [],
    > g 4 en [], a 4 en [], b 4 en [], c 5 en []])
    Languages, spoken or programming, or any other means of expression is most efficient when it fits the problem domain.

    If this sort of thing interests you, Lambda The Ultimate is a good forum to learn more.
    --

    Shae Erisson - ScannedInAvian.com
    1. Re:Haskell is a language for writing languages. by ErikInterlude · · Score: 1

      Not only Haskell, the same things have been said of Forth, Lisp, and (if I recall correctly) Smalltalk. I'm sure there are plenty of languages out there that either can be used to create new domain specific languages, or else are extensible enough by design that they can be tranformed into a domain specific state (Forth and Lisp come immediately to mind).

      I suppose if you wanted to go that way, you could also say that languages in general are fairlly extensible if you start coding some parts in assembly to get whatever features you want. Can't see that being time-efficient or portable, though.

      --

      --Erik
    2. Re:Haskell is a language for writing languages. by ari_j · · Score: 1

      Lisp did it first, but it's good to know other functional languages haven't lost the spirit. There's a book by Paul Graham entitled On Lisp. It was available in PDF for free for a while, and likely still is. Read it - it will make you a better programmer in any language.

      With the bottom-up paradigm like this, what you essentially end up with is an extremely high-level language that is the single best language in which to write your program, and you don't have to worry about syntax because the underlying language (be it Lisp or Haskell or whatever else) handles it for you. Not to mention that you get a compiler and runtime for free, as well.

    3. Re:Haskell is a language for writing languages. by Anonymous Coward · · Score: 0

      Dude, I won't even hit that. You made it too easy.

    4. Re:Haskell is a language for writing languages. by Anonymous Coward · · Score: 0

      Even C++ lets you do this, although to a far lesser degree. The Spirit parser library is a good example.

    5. Re:Haskell is a language for writing languages. by nagora · · Score: 1
      You write a new language that fits the problem domain

      Core idea of Forth, too. Great language but pretty well dead now.

      TWW

      --
      "Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
  82. I'm a moron by Theatetus · · Score: 1

    It's funnier when I remember to include the link to the second-oldest HLL still in use, which thought of this a long time ago.

    --
    All's true that is mistrusted
  83. how novel a prediction by Anonymous Coward · · Score: 0

    Yes, we've all seen Cold Fusion. The tags are only useful for the most limited control statements.

    Anything serious has to be done inside the <cfscript> tag - in a painfully limited javascript-type language, without any of the silly tags in the way.

    This couldn't be more off base if he predicted the resurrection of the "GOTO" statement.

  84. Already out there by Anonymous Coward · · Score: 1, Informative

    Not much of a surprise, it is very useful in certain situations. For example, take a look at ABLE (Agent Building and Learning Environment) from IBM alphaworks (i'm too lazy to find the link, just go to alphaworks.ibm.com and search for able). It is a logic programming language, but I used it's XML language capability to dynamically use XSLT on input and run the smart "agent," given some very complicated paramters and logic.

    Kevin

  85. And they complain about lisp. by RealAlaskan · · Score: 1
    programmatic entities -- like: record.

    This sort of crap is taken almost seriously, and people complain about (mymethod record).

  86. XAML by DreamTheater · · Score: 2, Informative

    http://longhorn.msdn.microsoft.com/lhsdk/core/over views/about%20xaml.aspx

  87. Aren't they already here? by Jesus+2.0 · · Score: 2, Insightful

    Don't certain crappy HTML-producing languages, for example CFML, already operate this way?

    For example (and yes, I've forgotten my crappy CFML syntax, so this is pseudo-crappy CFML (as opposed to crappy pseudo-CFML)),

    <CF-FOR INDEX="I" START="0" END="5" STEP="1">
    <CF-PRINT>%I%</CF-PRINT>
    <CF-IF CONDITION="I=3">
    <CF-PRINT>Aw yeah, baby, three!</CF-PRINT>
    </CF-IF>
    </CF-FOR>

    And, to expand upon my question from my subject:

    Aren't they already here? And aren't they already crappy?

  88. read the article... by Anonymous Coward · · Score: 1, Informative

    He clearly talks about LISP as doing this years ago with s-expressions. And he clearly talks about using XML as an interchange format -- NOT as something you'd ever type. XML in this case is just an update of S-expressions to easily incorporate extensions people have already built (e.g. handling Unicode) and interoperate with other stuff that's out there today, but with the assumption made clear throughout that you're never going to type or look at plain XML. You pick your syntax that the editor will transform the XML into and vice versa.

    What wasn't mentioned is that this (in some way) was what McCarthy originally envisaged for LISP --- S-expressions would be the underlying representation, but humans would never need to see them or type them. There would be a syntax transformation layer on top. He just never got around to defining a LISP syntax above s-expressions, and the rest is history.

    1. Re:read the article... by pfdietz · · Score: 1

      Actually, there have been repeated attempts to layer non-S-expression syntax on top of Lisp. They have been almost universally rejected by Lisp programmers, since they end up adding nothing and make things like writing macros more difficult.

      The experience of Dylan echoes this. They decided S-exprs were no good, went to a more conventional syntax, and found it didn't get them any traction at all.

  89. You won't be typing it yourself by jefftherhino · · Score: 1

    Please, if you think you'd actually be typing the code yourself, you're nuts! The point is to get as much of the grunt work done via automated means as possible. From that perspective, automation of source code is much easier with the source as XML than as a typical c-style syntax. The upside is we then get to do the interesting work.

    1. Re:You won't be typing it yourself by richieb · · Score: 1
      From that perspective, automation of source code is much easier with the source as XML than as a typical c-style syntax.

      Huh!? What is "automation of source code"? Do you mean parsing? Any language based on a reasonable grammar is easy to parse (Pascal being one example).

      But of course you could just use Lisp (which, by the way, has been in use longer Unix shell - despite what the author of the article says).

      --
      ...richie - It is a good day to code.
    2. Re:You won't be typing it yourself by jefftherhino · · Score: 1

      Sorry, that should have been "... automated generation of source code ..."

    3. Re:You won't be typing it yourself by richieb · · Score: 1
      If it's automatically generated it ain't source code :)

      --
      ...richie - It is a good day to code.
    4. Re:You won't be typing it yourself by jonadab · · Score: 1

      > Please, if you think you'd actually be typing the code yourself, you're
      > nuts! The point is to get as much of the grunt work done via automated
      > means as possible.

      Indeed, I write code that generates XML. But somebody has to write the code
      that generates it, and that's what programming languages are for.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    5. Re:You won't be typing it yourself by jonadab · · Score: 1

      > automation of source code is much easier with the source as XML than as
      > a typical c-style syntax.

      Bunk. I've written code that generates Inform code (which has a syntax very
      similar to C), and I've written code that generates XML, and the difficulty
      in either case is dependent on the inherent complexity of what you're doing,
      not the details of the syntax your code is generating.

      > The upside is we then get to do the interesting work.

      Writing code is the interesting work. Well, it is if you program in a fun
      language, such as Perl or Inform.

      --
      Cut that out, or I will ship you to Norilsk in a box.
  90. Lol! Lisp? by Anonymous Coward · · Score: 0

    This guys is reinventing languages like LISP but with a even worst syntax!

  91. Meh by Bastian · · Score: 1

    The formatting stuff is is an example of XML being so hyped that it is starting to become a solution in need of a problem.

    As for languages that allow you to metaprogram the language in order to extend it, FORTH has been doing this for four decades, and LISP has been doing it for at least four decades, too.

    And they both do it in a way that is a lot more intuitive and readable than any XML implementation I can imagine.

  92. zerg by Lord+Omlette · · Score: 4, Insightful
    Reading the article, I don't think anyone would ever actually see the XML unless they edited the file w/ their own text editor. I think the point is that the editor adds and parses the XML for its own benefit. See, our text files were written in ASCII, now Unicode. Therefore, the evolution to a higher representation is (supposedly) logical. The best way to reason about it is a /. post I saw many moons ago, something like: "You wouldn't put ASCII on your résumé, would you? So why would you put XML?"

    If I'm wrong, then this might be slightly more interesting in the long run than, say, Cyclone, where you have to learn a tiny amount more of additional syntax to mark that "this pointer was meant to point to data, not code", "this pointer should not write beyond this boundary", "this function has no business mucking up its stack", etc.

    Alternatively, look at Visual Studio.NET.
    /**
    * @author Lord Omlette
    * zOMG WTF
    */
    vs.
    /// <comment>
    /// <author>Lord Omlette</author>
    /// zOMG WTF
    /// </comment>
    The latter is a bit more readable but more annoying to write. Better we have tools to generate this stuff for us.

    And then someone will come out of the woodworks to say "Knuth had Literate Programming back in the 80s, why the fuck aren't we using that?" but that's another rant altogether.
    --
    [o]_O
    1. Re:zerg by Coryoth · · Score: 1

      If I'm wrong, then this might be slightly more interesting in the long run than, say, Cyclone, where you have to learn a tiny amount more of additional syntax to mark that "this pointer was meant to point to data, not code", "this pointer should not write beyond this boundary", "this function has no business mucking up its stack", etc.

      Out of curiousity, does Cyclone differ greatly in effect from, say, Eiffel, or any of the myriad of Design by Contract extensions you can get for Java, Python, and who knows what else? I always liked the look of Design by Contract, but didn't much care for the look of Eiffel... and I'm still waiting for the Python Design by Contract proposal (which is actually quite nice!) to get accepted into the mainstream.

      Jedidiah.

    2. Re:zerg by Merdalors · · Score: 1
      That's correct! Donald Knuth proposed a system that combined source code and typeset documentation back in the 80's. Called Web/Warp/Weave. Viz.

      He released TeX in Pascal formatted with technique.

      --
      Slashdot entertains. Windows pays the mortgage.
    3. Re:zerg by Lord+Omlette · · Score: 1

      Well, supposedly C code will compile straight in Cyclone, unless it's not typesafe. Whatever that means. So whereas Eiffel means you have to learn a new language, Cyclone means you only have to learn the new markup characters. NOTE! I only sat through the presentation on this once last year, it was the first thing that sprang (?) to mind, so I'm probably wrong.

      Have you looked at D? Supposedly it's like C++ but w/ Design by Contract? (It also has an as ridiculous-to-google-for name as .NET...)

      --
      [o]_O
    4. Re:zerg by dynoman7 · · Score: 1

      Reading the article, I don't think anyone would ever actually see the XML unless they edited the file w/ their own text editor

      You mean I can stop using Notepad to do my text editing?!?!

      --
      Blarf.
    5. Re:zerg by Anonymous Coward · · Score: 0

      The latter is a bit more readable but more annoying to write. Better we have tools to generate this stuff for us.

      Yes, it does. Autogenerate it, I mean.

    6. Re:zerg by Anonymous Coward · · Score: 0

      You wouldn't put ASCII on your résumé, would you?

      Uh oh. Maybe that's why I have only been getting job offers from Starbucks and web development shops?

    7. Re:zerg by databyss · · Score: 1

      Indeed, you should've switched to http://www.textpad.com/Textpad long ago...

      --
      Hmmm witty sig or funny sig? Maybe elitest techy sig!
  93. I sure hope not by MythoBeast · · Score: 1

    That whole idea reminds me of Cobol programming, where 2/3rds of the code that you wrote was mindless respecification of thing, or characters that specified how things were going to be formatted instead of how they would be used.

    XML is such an odeous buzzword these days. Everyone's jumping on the bandwagon because it's easy to comprehend. They don't seem to care that the entire language is horribly inefficient for what it does in terms of characters needed and processing time to transfer and interpret it.

    I think, though, that programmers will draw the line at using it as a stupid bloody programming language. All really good programmers know that their ability to produce is, in a lot of ways, a factor of their typing speed. Adding extra lines to code for the sole purpose of conforming to an inefficient standard will only appeal to people who have more interest in bureaucracy than productivity.

    --
    Wake up - the future is arriving faster than you think.
  94. One man's view on XML by marciot · · Score: 5, Interesting

    I personally do not understand what the entire hype about XML is, or even specifically what problem it is supposed to solve. My understanding is that there was a big push for XML because of a perceived need for open document formats. The idea being that binary formats were proprietary, closed and non-portable.

    If this is the problem XML intends to solve, then I feel it is a miguided effort. Binary formats are "closed" only in so far as we do not have access to the source of the program that created them. Once that source is available, binary file formats are open, portable, and a hell of a lot more space efficient than XML. JPEG is a binary file format, yet we have open standards and the committee who designed it released open source reference implementations of the decoder and encoder. Hence, JPEG is an open format and nobody goes around trying to stuff pixels in XML files.

    I really think XML is a solution to the wrong problem. The problem is closed source software, not binary files.

    -- Marcio

    1. Re:One man's view on XML by Anonymous Coward · · Score: 0

      Do you even know what XML stands for?
      Hint; take a look at the X.
      Good luck "X-ing" your JPEG format.

    2. Re:One man's view on XML by dvdeug · · Score: 2, Insightful

      My understanding is that there was a big push for XML because of a perceived need for open document formats.

      The advantage of XML is that you can use an off the shelf parser for every language instead of writing a new parser for each language. Let someone else handle the parsing and you handle only what you have to.

      As opposed to computer languages now, where most modern languages (LISP-family excepted) have context-dependent grammars that are incredibly hard to parse correctly and each language has to have a parser written specially for it.

      Binary formats are "closed" only in so far as we do not have access to the source of the program that created them.

      Yeah, I'm sure that if you got the code to Microsoft Word, you could figure out the format just like that.

      Even if you can, then you add another large ball of code to your project, for reading Word files. In the end, you've got a dozen different libraries attached, each one for reading a different format of file.

      JPEG is a binary file format, yet we have open standards and the committee who designed it released open source reference implementations of the decoder and encoder.

      Look at how many file formats the average graphical viewer has to support. Each one has its own library, its own bugs, its own security holes...

      JPEG is an open format and nobody goes around trying to stuff pixels in XML files.

      No; they stuff pixels in PNG files and TIFF files and PNM files and GIF files and a dozen other formats that need to be parsed by completely different parsers.

    3. Re:One man's view on XML by marciot · · Score: 1
      "The advantage of XML is that you can use an off the shelf parser for every language instead of writing a new parser for each language. Let someone else handle the parsing and you handle only what you have to."

      The assumption you make is that a parser is necessary for reading files. I did not say that we are better off having each developer write a whole new parser for an XML-like grammar for their documents, I am saying that most apps are better off with a binary file format which requires no parser of any kind (technically any file I/O requires a "parser", but I do not call reading a trivial sequences of bytes and offsets a parser). I think grammars tend to be an overkill for many types of data. Most binary files are simply fairly straight-forward dumps of in-memory data structures and the code for reading and writing them is not very complicated.

      "As opposed to computer languages now, where most modern languages (LISP-family excepted) have context-dependent grammars that are incredibly hard to parse correctly and each language has to have a parser written specially for it."

      Ok. The parent article was about programming languages. I made a rather off-topic rant about XML data files in general. My bad. However, if I confine myself to simply programming languages, I would have to say XML is a very poor substitute for LISP and again seems to be missing the mark. Consider this example:

      (+ 1 1)

      Versus:

      <ADD>
      <NUMBER>1</NUMBER>
      <NUMBER>1</NUMBER>
      </ADD>

      So even if we are talking about programming languages, XML seems to provide no more than LISP already did, with a much more unwieldly syntax.

      LISP also had a remarkably simple parser, so the argument that most other languages use very hard to parse syntaxes does not hold.

      "Look at how many file formats the average graphical viewer has to support. Each one has its own library, its own bugs, its own security holes..."

      Still, even with XML you need to write code that takes the output of the XML parser and transforms that into whatever data structures you need. Those routines are still need to be written once for each document type. So you still end up with multiple libraries and potential for bugs. Having a common XML parser seems to add very little, since it's just adding complexity to the data file without really solving that much.

      I'm not saying XML is an entirely bad idea. For some types of data it might work (for example HTML is a good solution for web pages). But of late I've seen too many people pushing XML files for things like word processor documents, databases and other things which are better off with a binary format (so long as the code which generated them is itself open).

      -- Marcio

    4. Re:One man's view on XML by marciot · · Score: 1
      Ok, apparently (and not unexpectedly), most of the posts on slashdot are about LISP being a better XML. In the context of the parent article, I concur. But my original post was not even about languages.

      Let me sum it up: We seem to have a situation where everyone wants to solve three different problems with one technology. That is the crux of the problem as I see it. I make a modest proposal:

      HTML The ideal format for documents which have mostly text interspersed with markup. LISP The ideal format for encoding data structures in a human readable format. Binary Files The ideal format for encoding files which have a lot of data and are written by programs (as opposed to humans). It seems to me that XML tries to do all three and does not do a particularly good job with any one purpose. My original post discusses why XML is a bad replacement for binary files. Most of the posts regarding this article touch on why XML is a bad replacement for LISP. Nobody has said HTML is bad for web pages, because in fact it is perfect for that.

      What I haven't seen is a good discussion of what XML is good for (and why it would be superior to any of the three technologies I've mentioned for the respective three uses!)

      -- Marcio

    5. Re:One man's view on XML by elhedran · · Score: 3, Insightful

      No; they stuff pixels in PNG files and TIFF files and PNM files and GIF files and a dozen other formats that need to be parsed by completely different parsers.

      You say that like its a bad thing.

      png is good for icons and webpage graphics (unless your target is IE). Its compresses well, is lossless, and has good transparency

      tiff is a good choice for very large, very high color images, such as producing for poster prints

      pnm are an excellent format for doing batch transformations (such as sticking together, rotations, etc. Just see the pnm* tools with any Linux Distro.

      gif is paletted, and compress better than png's for low color images. If you only have 20 or so colors and only a need for a mask (or perhaps would like some animation) gif is your bet. See 'screensavers' on mobile phones.

      In your world, webpages would take much longer to load, poster prints seem faded and image transformation tools would take forever. Oh, and I wouldn't be able to fit a 'screensaver' on my mobile phone. All because you can't be bothered to use one of the many, existing, image transformation tools.

    6. Re:One man's view on XML by Anonymous Coward · · Score: 0

      I personally do not understand what the entire hype about XML is, or even specifically what problem it is supposed to solve.

      Then perhaps you aren't in a position to be saying things like:

      I really think XML is a solution to the wrong problem.

      Seriously, learn a little about something before you write it off. Otherwise you just look ignorant.

    7. Re:One man's view on XML by Anonymous Coward · · Score: 0

      Oh, FFS, he wasn't arguing that we should replace all raster image formats with one XML dialect. He was pointing out that when you invent a new format every time you want to do something new, you end up with a whole bunch of different pieces of code that all do fundamentally the same thing.

      If you really didn't see that this was his point, you should take your anti-XML xealot blinders off and look around every once in a while, because you seem to have lost all perspective.

    8. Re:One man's view on XML by Anonymous Coward · · Score: 0

      Still, even with XML you need to write code that takes the output of the XML parser and transforms that into whatever data structures you need. Those routines are still need to be written once for each document type.

      Have you ever actually written code like this? With XPath, it can be a one-liner to pull a bit of data out of an XML file.

      So you still end up with multiple libraries and potential for bugs.

      No, because the code you are writing is at a higher level. You aren't writing any parsing code. That more or less eliminates things like buffer overruns - something that has cropped up multiple times in most popular image decoding libraries.

      Sure, there's still a small amount of room for bugs, but the types of bugs are the immediately spotted ones, like putting the username into the password variable and so on.

      But of late I've seen too many people pushing XML files for things like word processor documents

      Word processor documents are an ideal use for XML. Primarily text, with metadata interspersed throughout.

    9. Re:One man's view on XML by groomed · · Score: 1

      As opposed to computer languages now, where most modern languages (LISP-family excepted) have context-dependent grammars that are incredibly hard to parse correctly and each language has to have a parser written specially for it.

      By this criterion we should replace human languages by XML as well.

    10. Re:One man's view on XML by dvdeug · · Score: 1

      You say that like its a bad thing.

      It is a bad thing. There's way more graphics formats out there than need to be.

      png is good for icons and webpage graphics (unless your target is IE). Its compresses well, is lossless, and has good transparency

      And the only major differences from TIFF with PNG compression is that png's data is in a fixed order. And "unless your target is IE" is making it clear that you're putting the cart before the horse. Why couldn't IE support TIFFs with PNG compression? If there were only one format of graphics, isn't it more likely that IE would support it?

      tiff is a good choice for very large, very high color images, such as producing for poster prints

      Why? Only because that's how you view it. In fact, TIFF is the Swiss army knife of image formats; it includes several forms of compression specifically for B&W files, CCITT compression beating PNG compression for page scans quite handily.

      gif is paletted, and compress better than png's for low color images. If you only have 20 or so colors and only a need for a mask (or perhaps would like some animation) gif is your bet. See 'screensavers' on mobile phones.

      Oh, ah, screensavers on mobile phones, and a couple kilobytes of savings on a few pictures designed with EGA in mind. Why does everything in the world have to support this format, if it's only good for screensavers on mobile phones?

      In your world, webpages would take much longer to load, poster prints seem faded and image transformation tools would take forever.

      All three are nonsequitors. PNG compressed TIFFs are about the same size as PNG files; the optimal graphics format would logically provide the same tools for quality high-color scans, and have you actually watched top while you're running the netpnm tools? pnmtopng is very quick, but pnmflip and anything else that loads the entire image into memory takes a while. Adding a png decompressor and quick and dirty compressor to every netpnm utility wouldn't matter much at all; netpnm explicitly offers a tradeoff of simplicity over speed anyway.

    11. Re:One man's view on XML by dvdeug · · Score: 1

      The assumption you make is that a parser is necessary for reading files.

      Any non-trivial file format needs broken down into parts. If you can read a trivial sequence of bytes and offsets, then you have a pretty trivial file format. Of course, you run into the problem of what happens when you need to extend the file format and those trivial sequence of bytes and offsets is not so easy.

      LISP also had a remarkably simple parser, so the argument that most other languages use very hard to parse syntaxes does not hold.

      As I said, LISP excepted. LISP is hardly the end all and be all of languages. C takes two nontrivial parsers (cpp and the main compiler). It was a major project for G++ to rewrite the parser so it would actually work right.

      even with XML you need to write code that takes the output of the XML parser and transforms that into whatever data structures you need.

      That's not something a library can do for you; it has to do with your specific internal data structures. It shouldn't be any harder than dealing with the output of a Word library.

      Having a common XML parser seems to add very little, since it's just adding complexity to the data file without really solving that much.

      Have you examined the Word format? The Word format takes its own OLE library to parse it, before we ever get to interpreting the contents. That's exactly what XML is supposed to prevent.

      But of late I've seen too many people pushing XML files for things like word processor documents, [...] which are better off with a binary format (so long as the code which generated them is itself open).

      Why are word processor documents better off as binary format? It's not size; Word documents aren't particularly small. Why do we need to multiply entities unnecessarily? KWord uses XML files inside a tar.gz file, all three of which have commonly available free parsers. Nobody needs drag around specialized libraries just to parse KWord documents.

      XML makes you think about transforming the document into something you can export. Half the time, binary formats are just "simply fairly straight-forward dumps of in-memory data structures", which means if your in-memory data structures aren't exactly the same, you're in trouble. Also, one of the wonderful features of Word is that the "dumps of in-memory data structures" also include random junk, including stuff from top secret reports or early drafts of this report.

    12. Re:One man's view on XML by dvdeug · · Score: 1

      HTML
      The ideal format for documents which have mostly text interspersed with markup.


      HTML is just an application of SGML or XML.

      In any case, HTML works for webpages, but text documents in general? There's no way of representing a footnote as a footnote in HTML and a million other missing features. Which is why things like DocBook and TEI-Lite, both of which are applications of XML, exist, so that you can represent text documents that aren't webpages.

      LISP
      The ideal format for encoding data structures in a human readable format.


      Yeah, right. Half the reason people don't like LISP is because it's a sea of parenthesis; data files in LISP formats tend to remembering what the nth element in the mth sublist stands for.

      It seems to me that XML tries to do all three and does not do a particularly good job with any one purpose.

      XML is a tool for storing data; it's up to you what you do with it.

      why it would be superior to any of the three technologies I've mentioned for the respective three uses!

      I've just pointed why HTML sucks for the general purpose you assign to it; but more importantly, HTML is merely an application of XML or its predecissor, SGML. To say that XML is bad for that and HTML is good is absurd.

    13. Re:One man's view on XML by dvdeug · · Score: 1

      By this criterion we should replace human languages by XML as well.

      If it were of high importance to have computers understand human languages, we'd have to change them. Loglan is an interesting study of that.

      XML is not the end-all and be-all of everything. But following this proposal and having the format be XML, but hidden from the programmer, would make writing tools that parse code feasible. There are many programmer tools that just don't get written because C++ is a monster hairball; to get G++ to correctly parse C++ was a massive project that involved a complete rewrite of the parser. That kind of effort can't be justified for a tiny little utility to look for a certain type of error. In exchange, it would call for adding a certain distance from the exact text of the code, of making stuff that used to be hands on more computer controlled. Much like letting assemblers create machine code instead of writing machine code by hand.

    14. Re:One man's view on XML by Tim+C · · Score: 1

      What XML is good for is configuration, data interchange and similar files that a human may want to read through and/or edit by hand. With XML, you can see at a glance* what it is you're editing, without having to refer to a document and count bytes in a fixed column width binary file.

      (* This presupposes that the XML schema is sane, of course...)

      To answer your jpeg example, people don't stuff pixels into XML because no-one in their right minds would be editing the raw pixel data by hand. The closest to that you get is editing single pixels in a visual editor, and that's still nothing like doing it in a text (or hex) editor.

    15. Re:One man's view on XML by marciot · · Score: 1
      It's a personal opinion, but I actually find configuration files to be one area in which XML does not help. It takes a lot of effort to write non-trivial XML files from scratch and it's very hard to read existing files because of all the redundancy. As the files get bigger, they also become difficult to navigate without special editors (such as ones which collapse tags).

      I feel a plain old Windows-style ".ini" file with name-value pairs is the most readable configuration file format for humans to understand.

      Yes, XML is easily parsed by a computer, so in an ideal world, you would never have to read or write XML by hand, but then it seems like it may well have been an extensible binary format with an open source API and a really good open source GUI. See my related thread here:

      http://slashdot.org/comments.pl?sid=136513&cid=114 03147

    16. Re:One man's view on XML by m50d · · Score: 1

      OK, but what if you'd never seen a JPEG before? It doesn't matter if the standard's open, if someone just chucked a raw jpeg file at you, you would have no clue what to do with it. Furthermore, what happens in 20 years when everyone is using some other format, and jpeg has faded into complete obscurity, and none of the jpeg decoders will compile with current compilers? The point is not that it's open, but that it's self-documenting - you do not need anything else to be able to understand it, if someone throws an .XML file at you you can read it, understand it, parse it and modify it, without needing anything else.

      --
      I am trolling
    17. Re:One man's view on XML by bujoojoo · · Score: 1

      That's what we need: A portable JPEG!

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <imagelanguage="jpeg|jpg" xmlns="http:jpeg.org./xms/1.0/">
      <imagesize horizontal="1024" vertical="768">
      <imagedescription="whatever">
      <imageproperties numchannels="4" channelorder="R|G|B|A" bitsperchannel="8" compression="30">
      <pixel>11010001001001001001101010001110<pixel>
      <pixel>11010001001001001001101010001110<pixel>
      <pixel>11010001001001001001101010001110<pixel>
      <pixel>11010001001010010101010000001110<pixel>
      <pixel>11010001001001001001101010001110<pixel>
      <pixel>11010001001001001001101010001110<pixel>
      <pixel>11010001001001001001101010001110<pixel> ... ad infinitum, ad nauseum

      Oh, yes! XML would be much better!

      --
      This space for rent
    18. Re:One man's view on XML by atomm1024 · · Score: 1

      Actually, a while ago, I created a revolutionary XML application for encoding images. It is very powerful and useful and extensible (thanks to XML's brilliant namespace technology, which of course nobody really uses for extending things). It goes something like this:

      <?xml version="1.0"?>
      <image xmlns="http://atommic.com/image#" size width="100px" height="32px">
      <data>
      <row>
      <pix>
      <red>0</red>
      <green>0</green>
      <blue>255</blue>
      <opacity>255</opacity>
      </pix>
      <!-- ... -->
      </row>
      <!-- ... -->
      </data>
      </image>

      The average XIF (Extensible Image Format (tm) -- despite showing no signs of extensibility) is only a few hundred times larger than its PNG counterpart, and marginally easier to parse and generate!

      --
      Signature.
  95. That's kinda how cold fusion works... by Anonymous Coward · · Score: 0

    ... and it eventually drove me crazy...

  96. Letting non-programmers customize their programs? by headkase · · Score: 1

    Could this be used on the user-side of things to allow the user to customize the layout of the program to suit their tastes or maybe add functionality for advanced users?
    Or is it just another virtual CPU like Java or .Net's CLR - for example the tag <invoke-expr> would simply be an opcode or a 'machine' language instruction?

    --
    Shh.
  97. Good but not for the front-end by Anonymous Coward · · Score: 0

    I can see a compressed XML representation making sense as your intermediate data representation (akin to modern-day bytecode representations) simply because you could easily compile pretty well anything to it (creating sub-dialects of it by adding entity support in XSD and the usual notion of XML namespaces for over-riding selective behaviour in the dialect).

    The XML compiler could encode a great deal of semantic value (ie: loops, etc) on a higher-level than native binary languages or even conventional bytecode languages do. Thus, a VM could JIT the representation into something brilliant for the host machine (for example: vector optimization would even be easy where it is nearly impossible in most VMs for bytecode languages). Really, I can see where they are going with this since XML is a perfectly expressive level of indirection which could give the compiler and VM a lot of room to do powerful things in a fast and extensible way.

    Using it as the actual programming language that the developer uses is not feasible since it is overly complicated for most of the what the developer wants to think about and kind of slow to actually write logic in.

    I wonder if previous generations had people making fun of the idea of using ASCII or the 8-bit byte for everything the way that there are modern day people thinking that using XML for everything is absurd. This may be the point where it is questionable but XML is powerful so it is worth thinking about.

  98. Did someone already mention ... by El+Cabri · · Score: 1

    .... oh yeah of course it's LISP.

    I'll try to avoid being modded down as redundant by adding that programming language designers should start tackling the difficult issues rather than ever discussing how to abstract the programming of van Neuman machine and being anal about re-use, B.S. "elegance" and useless concepts such as OO or whatnot-Oriented-programming. Do you keep changing the grammar of your native spoken language just because it's not optimal for expressing certain things ? Do you speak in 10 different languages according to which is best for what you have to say.

    While many posters here rightly argue that early work on LISP, Scheme and ML essentially invented everything that had to be invented on programming sequential machines, my opinion is that people should settle on a simple, extremely mature, accessible standard such as C.

    It's not that language design work is useless. It actually is my job. However, there are really useful problems out there in programming certain parterns of concurrency and synchronicity/asynchronycity, for example programming hardware behavior, systolic arrays, reconfigurable logic, multi-core processors, stream processors, grids, etc.

  99. At least get the XML right... by dhowells · · Score: 1
    All values in XML are quoted, so: <answer type="long"> not <answer type=long>. and content shouldn't occur in HTML-style metatags, but as plain element contents, viz.
    <answer type="long">
    N0!!!!!!!!!!!!!
    </answer>
    --
    use Blunt::Instrument;
    1. Re:At least get the XML right... by BlackHawk-666 · · Score: 1

      Heh, nice sig. Great city too, for any who haven't made the trek, do so.

      --
      All those moments will be lost in time, like tears in rain.
  100. Repeat with me: by Zangief · · Score: 3, Insightful

    -XML is not the panacea.

    -XML was made for comunication between different programs, not for humans to write or think in.

    -This was done before in LISP.

    10 times each morning. If in a week you are still thinking about this, call me back.

    1. Re:Repeat with me: by m50d · · Score: 1
      Communication between different programs *is* what this is all about. It's about my editor communicating with your editor. It's not meant to be edited directly.

      And this was not done before in LISP. LISP lets you define your own language to a certain extent, but you're still constrained to LISP brackety syntax. This is about being able to edit someone else's programs with any syntax you like. And I think it would really make programming a lot easier.

      --
      I am trolling
  101. "but i was ... in love!" by 10am-bedtime · · Score: 1

    gah, it is to laugh.

    realize: xml is the bell-bottoms of programming language design. it may get you in w/ some easy-come-easy-go folks in a grassy-hilled cultural festival but you will always (attempt to) hide the fact from your kids.

    languages w/ parens, on the other hand, are the height of style. see for yourself: look carefully at those who deride them.

  102. Lisp: The Programmable Programming Language by Piquan · · Score: 2, Insightful

    If you think that extensible programming languages aren't already here, then read On Lisp (some familiarity with Lisp is necessary).

  103. Storing Formatting as Part of the Code by SporkLand · · Score: 1

    I am responding to the slashdot post, not the article. If you wanted to each programmer to see the code their own way instead, you WOULD NOT store the formatting as part of the underlying representation. Instead you would store the formatting as part of the display transform, so that each user would see the source code differently.

    The stuff we use now stores the formatting as part of the file and that is part of the problem (although it could be worked around).

    It saddens me to see that kind of gross semantic error made in the slashdot post, I'm hoping the actual article does not perpetuate this fallacy.

  104. *Stored* as XML, not *shown* as XML by Sweed · · Score: 1

    There seem to be a lot of comments here along the lines of 'Eeek, XML looks ugly, why on earth would I want a language that looks like that'. Now if you bother to read the article... the idea is to *store* the code as XML, not display it as XML. It would look the same to you, but your editor would store it differently - in XML as opposed to plain text. One of the points being it would be easier to manipulate the display of the source code without changing its meaning.

    I quote: '...programmers will not see (much less type in) XML tags'.

    Now one can certainly discuss whether this is a good idea or not, but it might be worth commenting on the actual idea rather than a straw man, yes?

  105. Doesn't this nonsense never end... by murphee · · Score: 1

    OK... I refute this articles rather silly ideas in this blog entry: http://jroller.com/page/murphee/20050113#xml_futur e_of_source_files

    --
    murphee
  106. yuck! by iriles · · Score: 1

    That's about all there is too it.

  107. Why do people think XML is good for this stuff? by Tom7 · · Score: 2, Insightful

    Why do people love to use XML for all sorts of inappropriate things?

    XML does not make data immediately understandable. All it does is remove one parsing problem, leaving the much more important problem of understanding the meaning of the tags, data, and their combination.

    XML might make sense as a compiler intermediate format, or even as a source archive format, but it has essentially nothing to offer in tems of extensible syntaxes (except for reminding us that the surface syntax of a programming language and the abstract syntax it represents can be as independent as we choose) or semantics in programming languages. (By the end of the article, this is essentially the point he comes to, with the only argument for XML being that it is popular.)

  108. *Nuke... by Anonymous Coward · · Score: 0

    he uses Nuke so he must be crazy....

  109. Watch out SLOC!! by pio!pio! · · Score: 1

    With XML based source code, my SLOC will rise a billion times!!

    Woot time to bring that to management! Look at how fast my output is growing!

  110. Being real about XML by Baldrson · · Score: 1
    XML is really just a named-parenthesis syntax. e.g.:

    f(x) and (f x) are two forms of functor and argument, the former more commonly used than the latter. These could also be written as:

    (f x f)<br>
    f(x)f<br>
    <f x f><br>
    <f>x</f><br>

    This isn't to belittle XML, but to recognize what it is and is not. A named parenthesis format is really important and that's why XML gets so much attention. But it isn't a complicated idea -- so recognized that the rest of the noise about XML is just that.

  111. You mean, like LISP? by moeffju · · Score: 1

    Or am I missing something?

    --
    follow me on Twitter: http://twitter.com/moeffju
  112. XPP by Anonymous Coward · · Score: 1, Informative

    XPP

    xml language used as a c++ preprocessor. used to generate classes for use with other classes, based on base classes... well, you get the point.. read the site

    its a programing language that uses XML as its format

    1. Re:XPP by Fry+a+Lad+Up · · Score: 1

      The tutorial suggests that you can replace 2 1/4 screenfuls of readable C++ with 3 1/4 screenfuls of pretty unreadable XML template that will generate the C++ code. I'm not likely to move to a development tool that requires much more and much more tedious typing in a less readable presentation that will likely confuse programmers as they attempt to make changes.

      I accept that developers of XML-based applications/tools must look at the XML to debug their work. But I, as a user, should not be forced to see the XML and I certainly shouldn't be editing XML, as I don't have to look at assembly language or machine code to write C or C++. Give me a nice NextSTEP/Cocoa WYSIWYG editor that hides the XML unless I want to look at it, possibly with another XML tool that does not force me see all the tags.

      Someone asked what happened to Knuth's Literate Programming movement. Well, specifically for the Web language: a program really wasn't literate until it was weaved, typeset, and printed. As a developer, I'm going to spend 9 to 90 times as much time looking at the source and I didn't want to wait for "weave prog; tex prog; dvipage prog" to generate something friendlier to the eyes.

      And the most visible examples, TeX and METAFONT, were not modular; it was, for example, too hard to rip out TeX memory management and replace it with system dynamic memory allocation.

      Like Literal Programming, XML-based programming is simply impractical. Frankly, I don't think I'd ever want to work in a programming language designed by anyone who thinks that XML is good way to express anything. It may usefully represent some things, but that's different. I want you to hate XML, even if you recognize what a valuable form it is for storage and distribution.

  113. <comment><type="funny"> by ZiZ · · Score: 4, Funny


    <do-in-order type="step">
    <step order="1"><pontificate subject="programming languages"/></step>
    <step order="2"><ellipsis/></step>
    <step order="3"><invoke-slashdot cliche="list-of-steps">profit!</invoke-slashdot></ step>
    </do-in-order>
    <forget-formatting/>
    <welc ome-overlords type="needlessly complicated, obfuscated, and wordy"/>
    </invoke-slashdot>
    </rant>
    <remark type="obligatory-attempt-at-wit">But it could be worthwhile.</remark>
    </type>
    </comment>
    <sig>

    --
    This flies in the face of science.
  114. I know I'll get modded redundant, but... by Theatetus · · Score: 1
    The point is to get as much of the grunt work done via automated means as possible.

    Umm... then learn Lisp, rather than re-inventing a half-assed bloated version of it.

    --
    All's true that is mistrusted
  115. To paraphrase a famous quote... by Senjutsu · · Score: 1

    Some people, when confronted with a problem, think "I know, I'll use XML!"

    Now they have two problems.

  116. Time's wrappin g around? by redhog · · Score: 1

    When this happen, that's when the hacker-counter has wrapped.

    This would just be LISP with a fancier, ugglier and less readable syntax. Data and code are the same, and data structure and code structure are the same, and the same tools can process both.

    The semantic content of XML and S-expressions is the same, only syntax and verbosity/redundancy of said syntax differs...

    Actually, when I was working for MandrakeSoft, I heard one of the hackers there had actually done exactly this - implemented an XML->S-expression rewriter and hacked Scheme in XML...

    0
    0

    1

    --
    --The knowledge that you are an idiot, is what distinguishes you from one.
  117. A configuration management nightmare by 14erCleaner · · Score: 1
    Just what we need, a system so that programmers can make their programs stop working on other programmer's environment. This sounds like a formula for disaster, as it will be that much harder to get a consistent build of a project with multiple programmers done, since each one will potentially be programming in a different language. (I've never liked the way the C "&" operator doesn't short-stop execution, so I'll just make it work like "&&". Oops, my partner's bit-twiddling code doesn't work any more.)

    Also, I think the XML thing, which everybody here seems to be harping on, is totally irrelevant. How you represent each developer's custom language settings isn't the issue; the fact that the language can be changed on the fly is.

    --
    Have you read my blog lately?
  118. Here's how it works by atomm1024 · · Score: 1

    Advantages: ???

    Disadvantages: As a structuring language, XML sucks ass.

    --
    Signature.
  119. We must do this! by Haszak · · Score: 1

    We live in a legacy world. It's about time we work that realization into the technology we choose to use. Most programming languages (and their many versions) are quite similar, but it takes skilled workers and time to rewrite the code. If we could set up XML standards for it, then we could convert code to and from these standards. Not only do we make the rewrite easier, but we preserve most, if not all, the effort put in by the original programmer.

    --
    find me at haszak.org
  120. Isn't this a M$ patent? by Anonymous Coward · · Score: 0

    i seem to remember a M$ patent about xml encapsulating programs/set of programs.

    too lazy too look, any one else remember, have the details?

  121. congramming by Doc+Ruby · · Score: 1

    If they keep that markup as the API between the code-entry GUI and the compiler/interpreter/VM/whatever, then we'll be able to slap whatever code GUI we want. So we can choose between CLI (procedural), flowchart, "by example", genetic algorithm, etc HCIs for specifying programs. Or we'll get stuck with that unuasble crap that will reduce all coding to scripting, and the HTML "programmers" ("failed graphic artists") will finally have won, and programming will collapse like Babylon.

    --

    --
    make install -not war

  122. XML is only part of it! by Anonymous Coward · · Score: 0

    The way we write the language may not be differant to that off todays languages, the XML markup would be hidden from what the programmer types. It could be used to extend the language, it's not about editing XML raw it's about using it as a data format.

  123. General Consensus by Anonymous Coward · · Score: 0

    His idea sucks. Natural Language programming should be the future, and even that sucks. People should just revert back to the various Assembly languages and be done with it. Granted it takes longer, but with the Internet as a communication link between developers, hundreds of people could take different pieces. Assembly is faster, stronger, better. Leave the higher level crap for scripting and such.

  124. For all the time spent... by Anonymous Coward · · Score: 0

    For all the time spent making super-abastract code, and huge architectures that allow marketing types to pull out the 'extensible' and 'scalable' words, it's sad that the fate of many programming projects that have been designed to be flexible up until the year 2082 is that they get trashed when the development company goes south because it has no money left, because everything was wasted on designing an uber-framework that really just turns out to be an uber-waste-of-time.

  125. Coming... for the last 20 years... by Daniel+Ellard · · Score: 1
    Every few years the notion of extensible languages pops up. It always sounds nice, but nobody can quite figure out how to make all the nitty gritty details work properly. Look at Dylan -- compare the original goals (astonishing) with what actually got done (interesting but hardly revolutionary). I think that the problem is that once you've extended the language, nobody can remember how it works any more.

    At least most of these languages had the decency to look like something palatable. (It'll be a cold day in hell before any hacker I know voluntarily spends all day looking at XML. XML is for machines, not for humans.)

    --
    Disclaimer: I work for a company, but I don't speak for them.
  126. Store it however the hell you want it by dmorin · · Score: 1
    This question comes up periodically at work when we fight over things like whether to use tabs or spaces (and how many), and inevitably it comes down to "Wouldn't it be nice to just store the bare minimum needed by the code itself, and have each engineer be able to retriev / prettify it at will?"

    If somebody made an extended byte code so that I could canonicalize all my java code and be able to extract the same meaningful source (complete with manageable variable names and comments), I'd be all over it. if somebody wants to do that using XML, fine, as long as you don't otherwise kill me with speed/space tradeoff.

    Just let me keep working with the editors I like in the syntax I know. Don't expect me to manually code it, just liek I don't manually code byte code now.

  127. It's all about automation-and freeing us from work by Anonymous Coward · · Score: 0

    Code generators will make most expensive programmers obsolete...

    It's all about freeing mankind from boring repetitive work and making it so people can get back to the real business of living, learning, loving, etc.

    All the jobs that don't require real creative GENIUS will be done by machines...including programming machines...

  128. Hahaha... lisp all over again...Forth. by Anonymous Coward · · Score: 0

    "Heading 3 from the article: Programs as Data. Yep, lisp was doing that decades ago :P"

    And Forth was Data as code.

    It sounds like we all are pining for the "Good , old, days".

    When men were men, and our development environments respected that. None of these 'sissified' "Can I wipe your chin?" we presently have. :)

  129. Like Visual Programming? by gregor-e · · Score: 1
    Anybody remember how visual programming languages were supposed to be the "next big thing"? But it turned out that just because you have a graphical representation of an algorithm, you still haven't done much to reduce the essential complexity of the problem. This notion of XPL via XML looks and smells a whole lot like visual programming, with klunky tags taking the place of little diamonds, circles and boxes.

    Before a new paradigm can gain mindshare, it needs to address the fundamental problem of crafting software - reduction of complexity. Hardware doubles in capacity, what, every 18 months? What is the doubling time of software writing productivity? No where near 18 months. Not even close.

    Unless someone clearly demonstrates how extensible programming languages allow me to solve problems at a higher level (more abstract expression, therefore fewer lines of code), I'm not gonna buy into it.

    1. Re:Like Visual Programming? by Anonymous Coward · · Score: 0

      Hardware doubles in capacity, what, every 18 months?

      Ancient history, my friend, ancient history.

  130. This is exactly the direction to go by bixmix · · Score: 1

    I think too many people here are looking at this as I write in xml and now it gets translated into my preferred language. WRONG. On page 5 of the article, the document clearly states that the code will be stored in an extensible format but edited just as normal. In other words, as a programmer this change will be transparent to you. Who cares? I do. Storing code in an extensible format provides an extremely powerful platform for scripting, which is key in any development environment. Perhaps just as importantly, I can port from one language to another in a matter of moments. Combining two differing languages becomes very easy. Quite a bit of software development these days is being done for and on middleware. It should come as no surprise that we extend this extrapolation to compilations and languages.

    1. Re:This is exactly the direction to go by scooterm · · Score: 1

      The problem is all those different languages are out there for a reason. If it were trivial to port Perl into Java (and vice versa) it would be done already. XML has nothing to do with it. In fact, XML would make it even *more* difficult because you would have to escape all the funky character sequences that cause XML to choke! How would you (for example) store XML code that outputs XML? You have to introduce a bunch of escape sequences .. but what if you want to represent code that outputs escape sequences? You need a way to escape the escapes ... This would be a nightmare to develop and it would be unreadable (thus ruining the 'extensibility' you supposedly get from XML in the first place)

  131. XML: Lisp done wrong by Anonymous Coward · · Score: 0

    Gee, an extensible programming language, perhaps we could call it XMLisp.

  132. Proverbial by Anonymous Coward · · Score: 0

    Another Solution looking for a Problem.

    I guess this sort of thing mercifully keeps the academicians off the streets and out of the bingo parlors.

  133. XPP by lonedfx · · Score: 2, Interesting

    I didn't really want to post anything about it so soon, given that it's not quite ready for prime time (ie, lack of documentation among other things), but XPP might be of interest to some of you. It does some of what this guys proposes, although it's not quite a "next generation programming language", more like a pre-processor on top of C++. It allows you to use external XML templates (to describe automatically written pieces of code based on the rest of your program) and inline XML comments in the cpp source (to perform higher level macros, like, for instance, calls that morph depending on the rest of the code).

    It's been used in a pretty big project from a well known company we all like to hate, though unfortunately the project itself has been cancelled. Hopefully it does mean that it's useable and could be useful to others as well. I had been waiting on a rework of the site w/documentation before drawing any more attention to it, but given this article, this is as good a time as any.

    Cheers,
    lone.

  134. LISP-S-Expressions. by Anonymous Coward · · Score: 0
  135. What a waste. by baadfood · · Score: 1

    Clearly:
    1. Modern programmers ahve far to much time on their hands. Computer languages exist so we can solve problems. Where the problem most projects deserpately DON'T need is how to make a dynamic programming environment.
    2. Such frippery could never have been implemented any other way. It is only via the magic of an xml tag that extensible code could ever be declared.

  136. It Has Been Done by Voltage+Spike · · Score: 1

    I have seen code like this: XTML.

    Although the primary idea is that you write all of your call logic with a commercial GUI, the underlying "code" is Turing-complete XML. I find viewing the XML a painful and dizzying experience, but the XTML-specific GUI actually presents a decent view of the logic.

  137. MHO in CXML by saddino · · Score: 1
    • <function name="printf"><argument value="I don't think this is such a good idea.\n"/></function><semicolon/>
    </function>
    1. Re:MHO in CXML by kamilyon · · Score: 1

      Hello,
      You would not have a semicolon tag. That is style for the language. It would not translate for Phython. Your arguement tag should probably wrap the data as it may have been an expression instead. You put a return value for the function as an attribute that would have worked better in a separate tag. You have a function with a type (I assume return type), but you also have a return, which would have went suitable with a type value instead of a literal. Stick with C and let your editor get the XML done right.

      --
      abstraction is 2 keep the weak from knowing the truth. show your source code && always seek the knowledge within
  138. Patents by buckhead_buddy · · Score: 1

    While I'm uncertain of the applicability of this as a technical form of expression, an XML syntax would seem to be a welcome way to approach legal forms of expression.

    Software patents are fluid and vague in their expression by design. Unlike copyright protection of the actual code, the patent is protecting the idea and you want to cast as wide and vague a net as possible. It seems to me that an XML expression of the idea (though independent of a particular language) would force an explicit interpretation of what was meant that would be interpretable by a judge (or someone not as fluent in technical syntax).

    I dislike the idea of software patents altogether, but if they are going to exist it seems like an XML expression of the idea should be a requirement for any sort of patent submission.

  139. Yikes! by Anonymous Coward · · Score: 0

    Given how crappy and undocumented much of the C, C++, C#, and script code floating around is today, I can only imagine what horrors the hackers will commit with this kind of extensible mess at 3AM while on a Red Bull buzz.

    Thank you, but no. I value professional quality code--efficient and well documented enough that a reasonably proficient coder can pick it up cold and figure out how to make a non-trivial change or addition with a minimal education process.

  140. You didn't actually read the article, right? by antientropic · · Score: 2, Insightful

    There are now 140 or so comments, and it is painfully clear from them that almost none of the posters have actually bothered to read the article. If they had, they wouldn't be confused on the following:

    • The article does not propose that we all start writing our programs as kinds of abstract syntax trees in XML notation. The XML is just the storage format. In fact, the extensibility that the author claims this will brings would make programs less verbose, not more.
    • "Lisp S-expressions already do that!" The author acknowledges this, to an extent. But as he states, those never caught on, while XML can now be processed by lots of tools, so there is a new opportunity now.
    • There are also some bizarre claims about extensibility either being a feature of all programming languages, or being unnecessary. That's silly, of course. What this is about is the ability to add new abstraction mechanisms to a language, which is really what the entire evolution of programming languages has been about. Procedures, OOP, templates, macros, modules, lambdas, etc, are all ways to cut down on repetitiveness and the number of boring details you have to think about. With an extensible language you can do that sort of thing yourself (within reason), while tools such as debuggers will still work nicely (which is not the case with typical code generation approaches, e.g., Yacc output).
    • "But the source will take up so much disk space!" With a 120 GB hard disk, who cares if Hello World takes 10 KB? That's a whopping 0.0000077% of your disk space.

    The author also makes a persuasive case about programmer's hyper-conservatism compared to other computer users:

    Why, in the early 21st century, do programmers still insist that their tools have to draw exactly one glyph on the screen for each byte in their source files? No one expects AutoCAD or Microsoft Word to do this; even grizzled old Unix fanatics don't expect to be able to open a relational database with Vi or Emacs. One of the great ironies of the early 21st century is that secretaries can easily put organizational charts or cubicle floor plans in e-mail messages, but the programmers who made that possible can't put class diagrams in their code.
    Something to think about.
    1. Re:You didn't actually read the article, right? by QuantumG · · Score: 1

      Yeah, unfortuately the Slashdot system of giving everyone who scores high the mod points to score others just results in an amplifying of average, to stupid, posts.

      --
      How we know is more important than what we know.
    2. Re:You didn't actually read the article, right? by Anonymous Coward · · Score: 0
      I prefer to think of it as amplifying drama queen to drama queen.

      --CmdrTaco

      (no, not really)

    3. Re:You didn't actually read the article, right? by MoxFulder · · Score: 1

      Organizational charts only have to be read by humans. If there are nice boxes connected by lines, humans can figure them out. You can draw an org chart with crayons, blood, the GIMP, HTML, whatever.

      Human beings are smart! We can see a picture and infer a structure (a correct structure, most of the time). Right now I can see a duck in a pond. It's all just a bitmap on my retina but my mind has figured out that the duck is separate from the water. Computers don't do this naturally.

      Why has there been a push to go from HTML to XML? Originally HTML authors were encouraged to mark up things like italics and bold and links and line breaks and fonts and flashy things. Humans can easily read and write these, but it turns out that it's hard to get a computer to generally recognize bibliographies and titles and illustrations and spacers from these visual elements.

      It is not easy for human beings and computers to communicate structure to one another. This is why programmers are conservative with what they will accept as source code. They want to keep it simple. Some of us are scared by Perl, because the parser is complex, so we don't know if the interpreter is parsing the code according to the spec, and we don't know if we're writing it to the spec.

    4. Re:You didn't actually read the article, right? by Anonymous Coward · · Score: 1, Insightful

      It is painfully clear to me that you are not a coder. That's why you see the back-and-forth here. It's a coder-vs-programmer issue. The programmers don't care how their source is stored, as long as it appears in their IDE the way they want it. Coders *do* care. You say that the article does not propose that we all start writing our programs in XML. Did you stop to think that the stored format *is* how many of us write our programs? Many coders do not rely on IDEs to create their source. That's why they're against this. Because source is exactly that, SOURCE. It should be readable from any text editor. Why would I want a storage format that needs to be interpreted before I can even look at it?

      And your comment "With a 120 GB hard disk, who cares if Hello World takes 10 KB?" is the typical the-software-dictates-the-hardware answer. Many people don't care what size disk they have. Source SHOULD BE as small as possible. The larger the source gets, the more likely something can go wrong. Here's a very plausible scenario. Imagine writing a 2000-line program where the real source is XML-encapsulated. Now imagine that just one of the XML characters is changed (disk corruption, virus, accident, any reason). At best, that encapsulated data is ignored, which will either break the program or alter it. You won't review all 2000 lines when modifying the program, and even if you did, you probably wouldn't notice one missing line (or one missing part of one line). Then you save the file after making other modifications. When you save it, the broken XML portion is removed, and you now have the source of a broken program. Good luck trying to find the problem to fix it.

      And maybe you're right. Who cares if the Hello World program takes 10 KB? But that's a tiny program which takes about 30 bytes compiled. That's about a 341 times source:binary ratio. By that ratio, the source for the Windows XP cmd.exe file should be about 132 MB. But there's also a performance hit for developers when the source files get larger -- slower open, close, search, and compile times. Not to mention a *lot* more memory required, especially when working with larger projects.

      As for the issue of "...but the programmers who made that possible can't put class diagrams in their code.", my answer would be: because we don't want it.

      You may call people like me hyper-conservatism, but it's people like me who kept your computer running at a decent speed back when 25 MHz was considered fast. You now have 3 GHz systems that don't run apps any faster then the optimized apps ran 10 years ago. Some call it progress. I say imagine how fast our systems could be if programs were actually written well, like they used to be.

      I don't disagree that XML-encapsulation could very well make code more readable from person to person. However, I personally don't think the benefits outweigh the drawbacks.

    5. Re:You didn't actually read the article, right? by Anonymous Coward · · Score: 0

      I think I get it - it's like a carpenter that eschews hammers is more of a craftsmen than the pussy that actually utilize the tools available to make the job more manageable! I like it!

      I think we should go back to punch cards, too - that way *CODERS* will be more careful about what they write because one mistake means doing it all over again! That's it. Fuck progress, right?

      And by the way - that 25 MHz computer did nothing even close to what my 3 GHz system can accomplish in the same time - to make that comparison is to be an utter ass.

  141. Yes this could change the world! by Anonymous Coward · · Score: 0

    OH wait.. No it's called coldfusion.. Yeah that thing that everybody hates because "it's like html!", things like this can never catch on because they are just too easy, no job security for the developers.

  142. Please, somebody think of the Penguins by Knnniggit · · Score: 1

    Who would want to download source code that looks like this? I bet the open source community would hate it, especially Gentoo Linux users. Please think of the Penguins...

    --
    Brain kills internet cells.
    1. Re:Please, somebody think of the Penguins by spitefulcrow · · Score: 1

      Let's hope they wouldn't leave this source code style in published source. One example given in some comment elsewhere was a 4-line snippet of C that turned into a 16-line behemoth of XML-compliant C. That's a 400% increase. So instead of a 40MB kernel tbz2 that unpacks to a 300MB source tree we'd have 160MB archives that turn into 1.2GB trees? (Yes, I know it doesn't exactly work that way and that those numbers are probably more than a little exaggerated. But you get the idea of the ridiculous amount of extraneous text that'd be included in these new source files.) New proposal: Let developers use this XML thing so they can easily go make changes. Then they can export code in a less verbose format (i.e. sans XML) for faster download and less space taken up.

      --
      Sorry, my karma just ran over your dogma.
    2. Re:Please, somebody think of the Penguins by Taladar · · Score: 1

      If the programmers work with something other than the published text the published one isn't technically the source-code.

  143. The slippery slope to idiocy... by raytracer · · Score: 1


    Nothing like introducing arbitrary notation into a system to make it clearer, eh?

  144. No by Anonymous Coward · · Score: 0

    They ARE NOT, this is xemel masturbation. When languages are aiming for simplicity, flexibility and script like charecteristics this guy is suggesting making things unwieldy and verbose. boy does this ever suck..

  145. XML Lisp!-; by Anonymous Coward · · Score: 0

    Do you complain this much about "C"'s semicolons? With a good editor (Emacs was made for LISP). And practice the parenthesis disappear.

  146. Makes sense to me by gateep · · Score: 1
    The main advantage I can see with this is allowing each developer to use their own preferred coding style.

    For example, at my company our new manager is insisting we change our existing coding standards to match his personal preferences. (I know, this is wrong for all sorts of reasons, I won't go into that here). The article's suggestion of using XML to store the underlying code, and XSLT to display the code would have solved a lot of arguments.

    I have been considering developing an Eclipse plugin which would achieve a similar result. The idea being roughly:
    • code is stored in CVS using an agreed coding style
    • when a developer checks out code from CVS, it is automatically restyled according to their preferences (using Eclipse's excellent formatting tools)
    • developers write/debug code in their preferred style
    • the code is automatically restyled to the standard coding style before checkin to CVS
  147. Not until someone actually codes it by QuantumG · · Score: 1
    We believe that next-generation programming systems will most likely store source code as XML, rather than as flat text.

    Making bold predictions means you don't have to do any work.

    --
    How we know is more important than what we know.
  148. Return to our roots!-"Titanic" Languages. by Anonymous Coward · · Score: 0

    Maybe less leaky abstractions in our languages.

  149. XML? No, they won't. by Anonymous Coward · · Score: 0

    Like anything else, it's just a fad. Eventually everyone goes back to C.

  150. To quote Blue Velvet by BlackHawk-666 · · Score: 1
    Fuck that shit. XML is wordy crap, good for storing and exchanging data, but keep it the hell away from my programming languages. When I write code I want to get it down terse, fast, and complete. I don't need to be writing
    10 print "this sux"
    20print GOTO 10

    It's a basic fact that programmers make x number of errors per line of code. Anything that reduces the number or lenth or lines I write increases my productivity and decreases my error rate. Fuck XML, it doesn't do either of these things.

    --
    All those moments will be lost in time, like tears in rain.
    1. Re:To quote Blue Velvet by Jesus+2.0 · · Score: 1

      It's a basic fact that programmers make x number of errors per line of code.

      In your case, x seems to be 2/3.

      (1) No space between the line number and its statement.

      (2) "print GOTO 10"?

    2. Re:To quote Blue Velvet by BlackHawk-666 · · Score: 1

      Doh, I shoulda hit preview since that was meant to have tags all over it (thus being hard enough to read that I didn't even notice the extra PRINT statement. Slashdot has removed all the tags leaving the comment looking meaningless AND incorrect....oh well.

      --
      All those moments will be lost in time, like tears in rain.
    3. Re:To quote Blue Velvet by kamilyon · · Score: 1

      Hello,
      What is funny is that there are only two lines of code there, so x would be 2/2 -> 1/1 -> 1 by reduction.

      --
      abstraction is 2 keep the weak from knowing the truth. show your source code && always seek the knowledge within
  151. Copious Quantities of XML! by kamileon · · Score: 1

    To quote one of my coworkers:
    "XML is like violence. If it doesn't solve your problem, you're not using enough of it."

    --
    To truly understand recursion, you must first truly understand recursion.
  152. Windows Scripting Components by N8F8 · · Score: 1

    Microsoft briefly experimented with somthing called Windows Scripting Components (WSC). It allowed you to create a COM object interface in XML.

    --
    "God fights on the side with the best artillery." - Napoleon, Marshal of France - speaking truth to power
  153. Extensible?-15 Yr old hardware. by Anonymous Coward · · Score: 0

    "XML now is what OOP was 15 years ago"

    Funny enough. Our computers likewise haven't evolved that much. OOP and Functional programming (let alone prototyping) worked best on "non-conventional" computers. "C" (and family) is basically wed to the von-neuman way of looking at things. Any attempt to hide that fact, simply is to make it look more and more like the "unconventional" languages without ditching the baggage.

  154. Pointless. by joss · · Score: 1

    Why bother storing the code as XML. In order for your text editor to present things in a bareable fashion, the text editor has to contain a module that parses whatever language you are using and converts that into XML. So assuming that code exists, if you want to write some tool that prefers xml, just use that code to do a java2xml or whatever2xml conversion first. That way people can use their existing tools for existing work.

    This is all entirely possible already, there's no reason at all for people to start doing things differently.

    --
    http://rareformnewmedia.com/
    1. Re:Pointless. by Anonymous Coward · · Score: 0

      Integrating this into the editor could help stopping the obsession over whitespace style. It could also help with maintaining syntactical correctness. Basically it moves formatting, which is now an inherent code property, and syntactical checking, which is now a compiler function, into the editor. Patch tools could easily implement syntactical checks to increase the chance of detecting bad patch application. Code documentation tools would be much simpler and easily adaptable to many languages. Even versioning could benefit from XML represented code: Irrelevant information (formatting, whitespace) is removed from the representation and easily parseable structural information is available. You could have automatically generated information like "v0.1.2 from v0.0.3: modification in functions getName, setName - new function defaultName.

  155. Been there, done that. It sucks. by Animats · · Score: 1
    There are real problems with too much extensibility in programming languages. The code becomes unreadable. There was a minor fad for extensible programming languages in the early 1980s, and it was a disaster. All the extensible languages died out.

    Ever come across C code like this?

    #define BEGIN {
    #define END }
    ...
    int main()
    BEGIN
    printf("Hello, world");
    END;
    Not fun. Macros are usually a problem, not a solution. (Sometimes XML seems that way. XML enthusiasts are making every mistake made by S-expression enthusiasts in the LISP era.)

    There's been some discussion of a system for adding attributes in C++. C++ has "auto", "static", "explicit", "volatile", "extern", and "const". Microsoft's version adds another dozen or so more. These are all keywords, and every time a new one goes in, it breaks things. Plus the interaction of attributes and overloading is very ad-hoc. But so far, nobody has made a proposal that looks workable. And that's a minor bit of extensibility in an area where people agree there's a problem.

    Another issue is how to manage non-text assets in software. This is a medium-sized problem for most programmers. It dominates game development, where you have everything from level maps to motion capture data to manage. There are specialized tools for game developers, like Alienbrain, to store, track, and maintain version control on all those assets.

  156. Also... think code conversion by the-matt-mobile · · Score: 1

    Exactly! The big part that I think everyone's missing is that the languages themselves don't have to change, but potentially their storage does. Or, instead of changes to the storage, perhaps the IDE or a 3rd party tool just knows how to convert it to common XML code. Remember, code is just data after all. It has structure too.

    So where's the advantage in this? I think it lies in 2 places:

    1.) Having code be self documenting become so much easier. Think JavaDoc, only for any language.

    2.) Language conversion. Say you find some open source Perl code that does exactly what you want, but you are a Java shop. So, just run the XML version of the code through an XSLT and voila!

    #1 is probably more likely to happen sooner than #2 given that code conversion will be held back by different languages having different styles and ways of accomplishing tasks, but code conversion would really be the major benefit of this.

    1. Re:Also... think code conversion by Coryoth · · Score: 4, Insightful

      Language conversion. Say you find some open source Perl code that does exactly what you want, but you are a Java shop. So, just run the XML version of the code through an XSLT and voila!

      Lovely theory, but I'd like to see you pull that off in practice. What if I start using some very idiomatic language paradigms in perl, which all make good sense there, but result in, at best a tangled barely intelligible mess of Java, at worst something unconvertible. What this does, in effect, is reduce every language down to a poor quality "lowest common denominator". How do you easily convert a functional language into a procedural one? How do you convert you OO Java code into C? Sure, it can be done, but itf its done in an automated way I'm not sure I would want to be the one responsible for editing and maintaining the results.

      Jedidiah.

    2. Re:Also... think code conversion by Anonymous Coward · · Score: 0

      What if I start using some very idiomatic language paradigms in perl, which all make good sense there, but result in, at best a tangled barely intelligible mess of Java, at worst something unconvertible. What this does, in effect, is reduce every language down to a poor quality "lowest common denominator".

      But, hey, you're converting to Java, so that's the point.

    3. Re:Also... think code conversion by Fnkmaster · · Score: 1

      This whole proposal sounds more and more like MSIL(.Net bytecode) or Java bytecode marked up as XML, with full debugging information/comments intact.

      And the same problems occur with bytecode that you describe. For example, see efforts like Python.NET. It's possible to take a language and map it onto such an intermediate form, but not without losing much of what makes the language unique, and settling on least common denominator features. At that point the differences in languages seem to end up becoming syntactic sugar.

    4. Re:Also... think code conversion by Anonymous Coward · · Score: 0

      Lovely theory, but I'd like to see you pull that off in practice. What if I start using some very idiomatic language paradigms in perl, which all make good sense there, but result in, at best a tangled barely intelligible mess of Java, at worst something unconvertible.

      "Dude, you don't understand. We're using this awesome things called XML."
      "Well, it really doesn't solve the problem, as you can plainly see, upon closer examina--"
      "XML. Dude. XML."

    5. Re:Also... think code conversion by ajs · · Score: 1

      You're correct, but not going quite far enough.

      This problem is believed to be NP-complete, and any system which has attempted to do this in the past has met with great difficulty to say the least. In some cases, languages have differing syntax, but essentially the same semantics, and in those cases, a translator is possible (e.g. FORTRAN to C). In all other cases, your options are limited. You can compile down to some intermediate language and then simulate the intermediate langauge in your target language, but that's not the same as translating at all, and the result will be quite unmaintainable.

      Parrot and CLR/Mono are probably better ways to go. These are virtual machines that are designed to support arbitrary language semantics. Everyone compiles down to byte-code and calls between functions, methods, etc of code in various languages can be made semi-transparent.

      This allows your Java code to take advantage of PDL (Perl Data Language) from CPAN while some Python code takes advantage of a cool Ruby mix-in. No need to translate the elements, as long as API documentation allows users in any language to take advantage of your API.

      All that said, the idea of translating code to XML for storage with the data is not completely stupid. Without translating between languages, it still gives you the ability to manipulate the code and data in ways that XML makes trivial, and that way people who want to write code that interacts with source code don't have to write a parser for the langauge. This might end up being a cool hack for language-dependent work.

    6. Re:Also... think code conversion by dajak · · Score: 1

      What if I start using some very idiomatic language paradigms in perl, which all make good sense there, but result in, at best a tangled barely intelligible mess of Java

      Auditor 1: "Your code is a total mess in Visual Basic. Rewrite it."

      Auditor 2: "Your code is a total mess in Java. Rewrite it."

      Auditor 3: "Your code is a total mess in Prolog. Rewrite it."

      Good luck.

  157. errrrrr?? by Anonymous Coward · · Score: 0



    We all know how revolutionary that cr4p is...

  158. Let's reinvent LISP! Badly! by justins · · Score: 1

    Again!

    --
    Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
  159. Love It by the+eric+conspiracy · · Score: 1


    Just take your Java code, and with the right XSLT you have C# or VB or COBOL or whatever.

    Then with something language agnostic runtime thingummy you can run any of them.

    We seem to be approaching a Zen-ish thing where all computer languages are the same, and their names are meaningless/irrelevant.

  160. Subtext by Earlybird · · Score: 4, Insightful
    What's coming isn't languages where you edit XML -- because XML has too much syntactic overhead -- but languages which aren't text based -- languages like Subtext (the screencast demo is essential).

    Languages need to evolve out of the pure text medium. This has been happening as incremental hacks to classic languages through code folding editors and AST-aware, intelligent IDEs like Eclipse, literate programming and Python's doctest module. High-level development tools like Delphi were early adopters of the philosophy that code doesn't need to be visualized as text when it's better to visualize it graphically.

    The next step is to store not text but structure. For example, why shouldn't I be able to comment on -- annotate -- a specific number in a mathematic formula in my code? With current text-based languages this would be a headache:

    double phi = 1 - 1 / (1 + Math.exp(-(cv * /* weight */ 0.3 - range) / sigma));

    Instead, I could just select the value in my editor, click on the annotate key, and enter (in nice WYSIWYG HTML or whatever) my comment there. As a result, the editor will show a tiny icon next to the number, or perhaps in the margin, indicating that there's an annotation.

    And why are formulas like that represented with such a poor syntax? Why can't I easily use proper Greek letters and standard math notations such as dots for multiplication, a horizontal line for divisions/fractions, etc.? Why can't I insert images into the source file which illustrate the concept it implements?

    What I'm talking about isn't just "rich source code", which Donald Knuth's literate programming concept covers to some extent. Languages will experience a revolutionary leap when they start treating language elements as flexible blocks of content as opposed to tokens in an AST. Consider internationalization; instead of looking up a string from a language-specific message table, your source code can include the string in every possible language, hidden away in a single visual representation -- it might look something like:

    showDialog("File not found" [English, Swedish, (8 more languages)]);

    where "English ..." is a link that opens up a nice GUI letting you change the strings in different languages. The logic to select the string to choose at runtime exists in the string "component" itself.

    A common problem in dynamically-typed language is that it's hard to implement optional static typing at the language level. It adds a lot of noisy syntax, and unless you add a lot of syntax, it's hard to solve many ambiguities and special cases. With a rich source format, you can hide away the details, similar to my annotation example.

    Unix geeks typically balk at non-textual files, but I blame it on a fundamental lack of imagination. You can have both! Rich source code can be represented as text -- it's just not convenient to edit it like text. Instead, you add intelligence and convenience to your tools. You don't edit your PNG files with Vi -- you use a tool like GIMP or Photoshop.

    1. Re:Subtext by Anonymous Coward · · Score: 0

      this is kind of fun...you'd need something like an app server just to render the code, and then you'd have to have an input mapping back to the vast array of text resources the whole shebang would have to consist of...I'm gonna get working on this right away!

      (As soon as I can get setting up this fucking Tomcat server figured out ;)

    2. Re:Subtext by tetromino · · Score: 1

      Languages need to evolve out of the pure text medium. [...] High-level development tools like Delphi were early adopters of the philosophy that code doesn't need to be visualized as text when it's better to visualize it graphically.

      I believe the term you are looking for is "code generators", not languages. Inkscape and Sodipodi generate XML code, but they aren't languages - they are just tools for drawing pictures. Similarly with Delphi, except in that case the pictures are ugly pieces of Win32 API.

      And why are formulas like that represented with such a poor syntax? Why can't I easily use proper Greek letters and standard math notations such as dots for multiplication, a horizontal line for divisions/fractions, etc.? Why can't I insert images into the source file which illustrate the concept it implements?

      Many modern languages support unicode - so you can use all the greek variablenames that you want. For "proper mathematical notation", you might want to look at Mathematica (which pretty-prints math) or at Perl6 (which allows you to define new operators with unicode names). For general-purpose languages, it's usually inconvenient, because e.g. there is no "dot" key on standard keyboards.

      As for inserting images and other documentation into your code - just use doxygen or any other documentation-generation system that compiles your commented source code and external resources into a pretty html / pdf / dvi / whatever document.

      Unix geeks typically balk at non-textual files, but I blame it on a fundamental lack of imagination.

      I blame it on the fact that I can't edit your damn png-infested source code with vim over a choppy laggy text-only ssh connection. You don't always have access to X or some other windowing system.

    3. Re:Subtext by Anonymous Coward · · Score: 0

      Instead, you add intelligence and convenience to your tools. You don't edit your PNG files with Vi -- you use a tool like GIMP or Photoshop.

      Pussy. The hell I don't. GUI's are for wimps ;). Hex is good enough for me, and while I'm on the topic, what's with this silly having readable human text for code - just write it in assembly (in hex, don't you carry the x86 manual with you?) from the start!

    4. Re:Subtext by groomed · · Score: 5, Informative

      Unix geeks typically balk at non-textual files, but I blame it on a fundamental lack of imagination. You can have both! Rich source code can be represented as text -- it's just not convenient to edit it like text.

      A format which is as flexible and comprehensive as you describe is not convenient to edit period. The problem is that every tool which wants to edit a small part of it needs to understand (or at least be aware of) all of it.

      Want to calculate a line number? Have to parse and render the entire document. Want to generate a diff? Have to parse and render the entire document. Want to translate a string? Have to send the entire document to the translator and wait for it to come back. Want to post a code snippet for discussion? Have to create a new file, paste the code snippet, then upload the file, meaning all discussion gets separated from the code. Unless every browser/mail reader/whatever is changed to understand the format, but this just reiterates the point made above.

      This is not to say that it wouldn't have its uses, but they'd be rather specialized, and you'd probably end up with only 1 or 2 programs which can actually fully understand the format, somewhat similar to the current situation with Flash and Squeak.

      There are very good reasons why we have the functional decomposition we have today. It makes it easier to work with other people.

    5. Re:Subtext by don.g · · Score: 1

      Execute this! CD 18

      (okay, probably only useful on IBM PCs and their many clones where some pesky operating system hasn't stomped over the BIOSes interrupt vector assignments)

      --
      Pretend that something especially witty is here. Thanks.
    6. Re:Subtext by ine8181 · · Score: 2, Interesting

      Yeah, I think it comes back to the original idea of using XML for this very purpose.

      Using XML, we will have all the goodies of having a language-specific format and also a common ground that is Unicode text, for generating Diffgram, for example.

    7. Re:Subtext by Earlybird · · Score: 2, Informative
      • I believe the term you are looking for is "code generators", not languages. Inkscape and Sodipodi generate XML code, but they aren't languages - they are just tools for drawing pictures. Similarly with Delphi, except in that case the pictures are ugly pieces of Win32 API.

      Not at all. Delphi stores visual UIs in a separate format. It doesn't actually generate any code -- the visual representation references methods in your code (eg., "onclick" handlers), and your code can reference and interact with the visual representation. It's MVC.

      Similarly, Delphi supports non-visual components that are edited visually. For example, a database connection is created by dropping it in a form. You then link visual controls such as tables and edit fields to the data source. All of this is done visually.

      Delphi also has a thing that looks like a form, but isn't rendered at runtime. In other words, a visual code editor -- components are represented as icons you can drag around, link to other components, etc. It's more limited than a full-fledged visual code editor, but still very powerful.

      • As for inserting images and other documentation into your code - just use doxygen or any other documentation-generation system that compiles your commented source code and external resources into a pretty html / pdf / dvi / whatever document.

      I suggest reading up on Knuth's literate programming system, and you'll see how your above comment is something of a non sequitur.

      • For "proper mathematical notation", you might want to look at Mathematica

      That's the whole point -- I don't! Because Mathematica won't conveniently let me do all the other stuff I want.

      But all other current computer languages have a pared-down, poor text representation of math notation -- why shouldn't an IDE be able to render that as nicely-formatted, WYSIWYG, directly-editable formulas? There's no particular reason they can't, really.

      The assumption that 1 octet equals 1 character is no longer true. The assumption that 1 character on disk must equal 1 character on your screen is equally untrue. Code-folding text editors demonstrate this exceedingly well.

      • I blame it on the fact that I can't edit your damn png-infested source code with vim over a choppy laggy text-only ssh connection. You don't always have access to X or some other windowing system.

      Yeah, let's immediately go for the most extreme use case! You're thinking deep inside the box here. Who says a "rich source" tool can't be run inside Vim or be its own ncurses-based app?

      I bet you use MySQL or some other database. You're not editing the data by hex-editing the tables, are you? You're using "mysql" or "psql" as a front end. They work fine in a text-only SSH environment. It's all about having appropriate tools. Why should source code be special?

    8. Re:Subtext by elhedran · · Score: 2, Insightful

      Instead, I could just select the value in my editor, click on the annotate key, and enter (in nice WYSIWYG HTML or whatever) my comment there. As a result, the editor will show a tiny icon next to the number, or perhaps in the margin, indicating that there's an annotation. ...

      Unix geeks typically balk at non-textual files, but I blame it on a fundamental lack of imagination.

      I can type /* weight */ a lot faster than I can take my hands of the keyboard, find the mouse, move the mouse to where the text appeared on the screen, highlight said text, move the mouse to the tool button for annotate (or contextmenu, whatever), and then click to open another dialog and type 'weight' anyway.

      When you type at 80+wpm anything that avoids you having to touch a mouse is good.

    9. Re:Subtext by emjoi_gently · · Score: 1

      I think you are talking more about a more advanced editor than a programming language here. Perhaps one with Unicode, the ability to attack stickynotes, perhaps a formula editor as you find in MS & Open - Offices (which both use a text system for constructing the formulas).

      There's a fundamental crossplatform readability in Text however. Easy to parse, to move to any OS, to read even if you dont have the languages IDE, to publish on the net, in books, to write on College whiteboards.

    10. Re:Subtext by Unknown+Lamer · · Score: 1

      showDialog("File not found" [English, Swedish, (8 more languages)]);

      showDialog (_("File not Found"));

      Why would you want translations inside of the source itself? gettext is a much better solution (you have external message catalogs) because you can edit the message catalogs without recompiling your source. It makes a translator's work a lot easier because he doesn't have to understand the language the application is written in and all of the strings are in a central location so he doesn't have to search the program for them.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    11. Re:Subtext by Earlybird · · Score: 1
      • I can type /* weight */ a lot faster than I can take my hands of the keyboard, find the mouse ...

      Who said it was limited to the mouse? Select text with Shift and arrow keys, hit Ctrl+A or whatever, enter comment. It's potentially less typing.

    12. Re:Subtext by Coryoth · · Score: 1

      But all other current computer languages have a pared-down, poor text representation of math notation -- why shouldn't an IDE be able to render that as nicely-formatted, WYSIWYG, directly-editable formulas? There's no particular reason they can't, really.

      You realise that mathematicians, the people who spend far more time writing far more math formulas than any programmer, don't use WYSIWYG tools for writing and editing formulas because it is a pain in the ass. There is a reason that LaTeX is the way to write math: despite a small learning curve it's the fastest most efficient way to write math (with any standard keyboard anyway).

      Jedidiah.

    13. Re:Subtext by Earlybird · · Score: 1
      • Why would you want translations inside of the source itself?

      Because they should be as close to the code as possible.

      • gettext is a much better solution (you have external message catalogs) because you can edit the message catalogs without recompiling your source.

      Manual compilation shouldn't even be necessary. Try a language like Python or Ruby sometime.

      • It makes a translator's work a lot easier because he doesn't have to understand the language the application is written in and all of the strings are in a central location so he doesn't have to search the program for them.

      You're forgetting that with a rich source format, the translator doesn't need to understand the language -- all he needs is an editing tool that can filter out everything except the strings.

      It can be the same editor everyone else uses, with filtering built in, or it can be a specialized editor just for translation, which gives you access to spell-checking and dictionary lookup within immediate reach. Or it can be both, with the latter mode as a nice plugin, Eclipse-style.

      Because the source is a loose structure, a tool like that can easily let you view and edit just the strings, but still preserve all the other code when the module is saved.

      Similarly, the tool can easily find all strings in all modules across a project.

      Consider that once you have a richer source format, you can have multiple views on the same data. For example, instead of writing a static documentation generator, Doxygen/Javadoc-style, you can have a view that simply shows you the documentation parts of the source -- filtered dynamically and always up to date. (Python's command-line shell already does this; Ruby's rdoc is similar.)

    14. Re:Subtext by Earlybird · · Score: 1
      • You realise that mathematicians, the people who spend far more time writing far more math formulas than any programmer, don't use WYSIWYG tools for writing and editing formulas because it is a pain in the ass.

      Good point -- but you should be able to render it that way, because that's the optimal way to read the stuff, which was my main point.

    15. Re:Subtext by Arkaein · · Score: 1
      Guys, for everyone complaining aboutn the ideas discussed here, check out the demo. I did and it's quite fascinating, even if it does have limitations it shows a model of programming that is quite intriguing. Some notes:
      • A program is runnable at all times, no syntax errors are possible
      • The program executes modifications tothe program as you make them, making debugging completely integrated with programming
      • Message passing (using a model that looks similar to the signals and slots in Qt) is essentially built into Subtext, code is executed directly in response to changes in state (such as a value being modified), ideal for event driven programming

      One drawback is that it probably cannot be programmed using a standard text editor. This may be true, but lots of computational feats require special tools. Photoshop is one that has been mentioned, CAD modeling, music composition, etc. If a new way of programming is better (and I'm not claiming that Subtext necessarily is, I've only just watched the Flash demo myself) than isn;t that worth the dependency of some specialized tools?
    16. Re:Subtext by Unknown+Lamer · · Score: 1

      Keeping the translations inside of the code itself is braindead. It is easy to find where you are translating a string by greping for _ or gettext if you don't define a convinience macro.

      The programmer just adds the macros, culls the strings from the source with a special program (that already exists and works quite well) and then the translators create po files with their translations inside. It makes the code easier to read (you don't have 10 copies of each string in different languages cluttering up the programmer's view) and allows for translations to be edited by anyone with a text editor.

      Not everyone can use byte compiled languages or ship their source. In the Real World (tm) people use precompiled languages and probably don't even want the translators to have access to the source. And the translators don't need access to the source. Your solution makes things far more complicated than they already are. Not to mention that you'd be adding even more syntatic sugar to an application (i18n built in).

      Then you have the issue of i18n working in a different way for each language. Gettext works with a large number of languages. Hell, I could write my app in C and translate it into Scheme and the translators wouldn't notice a thing. Gettext doesn't care. It provides a uniform interface for translating strings across basically any language (and if your language lacks support you can just bind the C library; adding support for gettextize is a bit more difficult but not absolutely neccessary to use gettext).

      Your solution is a non-solution.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    17. Re:Subtext by Unknown+Lamer · · Score: 2, Insightful

      C-<spc>, [move arrow key to end of block], C-c, C-c.

      Not it's a comment in whatever language you are using. Emacs has done this for ages. No need for a new magic language with new XML based textual formats and new editors written in Java using XSLT and CORBA to format the data for view and send keystrokes to the main app over the network from the keyboard_server...

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    18. Re:Subtext by Anonymous Coward · · Score: 0
      <i> double phi = 1 - 1 / (1 + Math.exp(-(cv * /* weight */ 0.3 - range) / sigma));</i>
      That, or:
      static const double weight = 0.3;
      double phi = 1 - 1 / (1 + Math.exp(-(cv * weight - range) / sigma));
      Assuming, as I am wont to do, that Java does that sort of thing.

      Why can't I easily use proper Greek letters and standard math notations such as dots for multiplication, a horizontal line for divisions/fractions, etc.?

      You looking for APL? You can't easily use proper Greek letters because you don't have Greek letter keys on your keyboard. Maybe if you had a tablet, but typing tends to be faster and less error-prone than handwriting recognition.

      Why can't I insert images into the source file which illustrate the concept it implements?

      That would be neat.

      Consider internationalization; instead of looking up a string from a language-specific message table, your source code can include the string in every possible language, hidden away in a single visual representation -- it might look something like:

      That would not. I'd rather have a simple link to a string table, where today we typically use some textual reference to one. (there's no reason why this can't be done in today's code anyway...)

      With a rich source format, you can hide away the details, similar to my annotation example.

      Hiding details is a dangerous thing to do in code, especially details in the very code you are looking at.
    19. Re:Subtext by mkosmul · · Score: 1

      > A program is runnable at all times, no syntax errors are possible
      > The program executes modifications tothe program as you make them, making debugging completely integrated with programming

      Even if you get rid syntax errors, there's still plenty of room for logic errors, many of which can't be discovered before you actually run a particular branch of your program. Eclipse does on-the-fly syntax checking, which is very nice, but if you break something in the program logic, you will face an exception or your program will not work as expected. Unless you get some super AI to check the code's logic for you, such errors are going to happen. Besides, I don't think people who do a lot of programming make syntax errors that often (although seeing them right away is useful indeed).
      Note that what Eclipse does doesn't require using XML for your source code, just a standard unicode text file. And you can use (almost) arbitrary characters in your code, should you somehow find typing Greek characters or smiley faces easier and faster than typing plain ASCII.

    20. Re:Subtext by seanellis · · Score: 1

      After looking through 100 or so other posters who just "didn't get it", this is refreshing.

      For example, why do *I* have to add in silly "//" characters to show that this text is a comment? Why isn't it marked as a comment internally only, and displayed how I want?

      Or what about definition/declaration browsing? Parsing source code is difficult. Editing and maintaining a non-text representation of the program is much better (whose serialized form just happens to be XML because it's easy and there are standard tools to do it).

      If I hired a web designer, and he used only a text editor for HTML, and a hex editor for images, I'd suspect that he's not being as efficient as he could be. Why do we have this blinkered view that code == text and always will be?

      This system goes some way towards changing that.

    21. Re:Subtext by Arkaein · · Score: 1

      Yes, logic errors are always possible, this it what makes the on the fly execution in Subtext seem like such a good idea.

      In the demo one example was making a recursive factorial function, and it started with a default parameter which could be changed during editing and the results calculated immediately. If the recursion did not terminate it displayed a "too deep" error (or something similar). As soon as the correct base case was added to terminate recursion, along with another necessary bit for the function, this error went away.

      BTW, I have no idea what underlying representation Subtext uses, but AKAIK it has nothing to do with XML. I just check out the demo linked in an above post and found it to be a pretty neat idea.

    22. Re:Subtext by JonathanEdwards · · Score: 1
      I've been slashdotted!

      For another take on post-textual programming, check out Intentional Programming. A little-known screencast demo is at http://www.cse.unsw.edu.au/~cs3141/ip.asf/. Unfortunately all their work is shrouded in mystery and non-disclosure agreements. The most complete account I have found is in Generative Programming

      I believe that in the not-to-distant future the practice of programming in ASCII text will seem as antiquated as punched-cards

  161. "Break"-dancing. by Anonymous Coward · · Score: 0

    How far does one let the non-programmer go in customizing their environment? Til they break all the paradigms that it's based upon? A training, and maintenance nightmare? Anyway look up Glade, or XUL.

  162. VisualAge by teneighty · · Score: 1

    Isn't this sort of what IBM's VisualAge tried to do?

    It never really caught on because it basically locked you into the one tool suite and was generally a pain to deal with. The argument was "programming in a text editor is like doing an accountant doing spreadsheets in a text editor".

  163. What a load of... by pete_yandell · · Score: 1

    We'd like be able to easily write tools to parse and modify code so we can quickly do refactoring, etc. Makes sense.

    So obviously major programming languages should publish their parsers as libraries to make things like this easy to write...

    Oh, no, wait a sec, I have a much better idea: let's make programmers write code in a way that's trivial to parse. Yeah, then writing the tools will be easy! Brilliant! The fact that it makes writing any code a lot harder is something we can solve by writing fancier editors!

    And while I'm at it, I'm sick of the way there are all these cars on the road while I'm trying to get somewhere. I think there should be a new rule that everyone has to give way to me. Hell, everybody else should be made to ride bicycles.

    *Takes gun, shoots self in head*

  164. Sniff, sniff, can I smell Tcl? by hereticmessiah · · Score: 1

    And I'm being Ha-Ha-Only-Serious on this one.

    --
    I don't like trolls and mod against me if you like, but I'd prefer if you'd reply.
  165. Re:Silly article (Silly Post) by Glorfindel · · Score: 2, Informative

    I believe the author addressed all of your points in his "silly article".

    1) He did mean something different than what is available today with GCC. Rather than a new front or back end for a compiler, you could write things like optimization plugins for your language extensions.

    2) He specifically mentions LISP as an example of an extensible language, but laments how it just hasn't caught on with mainstream programmers.

    3) How are existing languages "easily machine parseable"? Have you tried writing a parser for a complex modern language? Without a tool to help you like lex/yacc? I didn't think so. The only reason existing languages are easy to parse is because the tools have already been created to do so. XML is also easily machine parseable by this definition since XML parsing libraries and tools are readily available.
    Also, he didn't argue that programmers should be typing XML programs in with 'vi', rather that IDE tools should process XML source code and provide a customizable view that is easy for the programmer to use and understand.

    I don't know if I agree with the authors prediction that XML will serve as the base for new extensible languages. It certainly adds complexity and would make hand-coded optimizations more difficult. But his "silly article" seems to be grounded in a good bit of research and thought on the matter, as opposed to your post which indicates you probably dismissed the article before reading it thoroughly (if at all).

    And yes, I'm new here. :-)

  166. XEXPR by Trinition · · Score: 1
    XEXPR is a XML specification for a programming language from 2000. I once started writing an interpreter for it in Java, but got sidetracked.

    My point is, why reinvent the wheel, when half of a wheel is aleready invented in XEXPR?

  167. You mean .. by TheBean · · Score: 2, Informative

    like Lisp?

    Common Lisp provided this mechanism years
    ago. I guess people just liked parenthesis
    so much that they never changed it .. :)

    "Any sufficiently complicated C or Fortran
    program contains an ad-hoc, informally-specified bug-ridden slow implementation of half of Common
    Lisp."

    - Phillip Greenspun

  168. I liked this proposal by rjh · · Score: 1

    ... the first time I saw it, back in 1984 when I first met the macro facility on a Symbolics LISP machine.

    I'm not kidding. If this offers anything we haven't had for the last 25+ years in LISP, I don't see it.

  169. Answer: no by ezzzD55J · · Score: 1

    What a bloody stupid idea.

  170. zerg-Time and Effort. by Anonymous Coward · · Score: 0

    "And then someone will come out of the woodworks to say "Knuth had Literate Programming back in the 80s, why the fuck aren't we using that?" but that's another rant altogether."

    Simple. It takes time, and discipline. Something the computing world has historically been short on. We can produce good code. e.g. spacecraft, aviation, etc. But we're not willing to pay the price in economic, and personal effort. Just look at how much noise is generated by these "(",")".

    Now a good IDE certainly helps.

  171. Content management by digitalgimpus · · Score: 1

    Don't know about anyone else, but I've been using that for a while.

    Many content management systems use xml, and have such a syntax, including logic. Interwoven Teamsite is one of them.

    Some tags:
    http://cms.filsa.net/archives/cms-list/2001 /Jun/01 09.html

    Particularly useful (though sometimes a pain) was iw_iterate. Which I guess was prettymuch a foreach

  172. lisp, water, and unigrok by drbart · · Score: 1

    Along the lines of "LISP with ugly parens" is the Water project at MIT.

    I've had my own adventure along these lines (Unigrok really *is* XML) but you sort of run into problems embedding a real language into XML because of function return values.

    As in how would your "syntax" indicate returning values from a function or user-defined tag. Try to be too general and pretty soon you've got XSL on your hands (and still haven't solved the problem).

  173. Forget about extensibility... by csoto · · Score: 1

    ...let's teach programmers to write BUG FREE code first.

    Of course, I'd settle for remote code execution code free.

    --
    There exists no way of exchanging information without making judgments. --Bene Gesserit Axiom
  174. Re:Is this guy serious? No... by tomhudson · · Score: 1

    From page 5 of the article:http://www.acmqueue.com/modules.php?name=C ontent&pa=showpage&pid=247&page=5

    Like Inglish speling, XML is here to stay.
    Maybe it is, but in both cases it obfuscates/confuses what you want to say; it's worse than perl. Maybe that's what this guy wants - programs that look like line noise, written in "Ingrish" and stored in xml so they're harder to debug.

    OTOH, there's nothing stopping anyone from writing their own code generator/translator, which is all this really is. Also, for prior examples, the Clipper compiler was extremely modifiable (and that was 2 decades ago). Heck, you can even use make, cat, and a couple of perl scripts to translate plain english into code if you're REALLY desparate to find something to do with your time. (Anyone remember the dBASE code generators? Ugh!)

  175. A Good Idea by jefu · · Score: 1, Interesting
    This is (really) a Very Good Idea.

    It does not mean that programmers will be typing in straight XML, it means that they'll be using smart IDEs of one sort or another to interact with their code, and probably that XML to (language) and (language) to XML filters will be built.

    This greatly facilitates a number of things that are currently difficult - here are a random few (not all I can think of and in no particular order) :

    • Easy reformatting of the source code (including syntax highlighting) on the fly for those who prefer a different code layout. SOme have commented that this is already available - undoubtedly the same folks who complain about Python using whitespace for control nesting. With this kind of markup you could change the viewed syntax to match your notions of what is nicer.
    • The ability to embed much nicer comments (this is a major step toward literate programming environments) including pictures and even animations if needed.
    • Much smarter revision control - instead of being line based, the revision history could track xml subtrees. The editor could be set to turn on or off viewing of previous revisions.
    • Smarter editing, including all the fancy stuff in the visual studio type environment and more. Hover over a variable and see its type and any comments on its declaration - also see every use of the variable in your current window. Autofill field names. In a C type environment with #if's, turn off the #if's that dont apply to your environment.
    • Aspect oriented programming and generative programming gets much cheaper and smarter.
    • Easy to annotate programs with asserts or pre and post conditions - even in languages that do not support them natively.

    And more.

    To some extent this stuff is available today in one place or another. Using an XML based markup for the language would make such things much easier to implement and much more under the control of programmers.

    1. Re:A Good Idea by hgolden · · Score: 1
      Exactly!

      The lunkheads who keep thinking they will have to edit XML should get a clue. You can keep using the syntax you are familiar with if you want. On the other hand, all sorts of new features can be added as decorators once the program is represented internally as a tree structure (and stored as XML).

      Read Knuth's "Literate Programming." Then imagine the feature built into your development environment, not part of a preprocessing chain.

      Design your objects using UML and view them with UML or as your favorite conventional language. (This is currently available under the labels "forward-" and "reverse-engineering," but these are really different viewpoints of the same program, not separate files that have to be kept in sync somehow.)

      Though it's been inactive for some time, you might want to look at the eXtenDE project on SourceForge, http://extende.sourceforge.net/

  176. Re:Extensible? XML Allows much more by JohnBaleshiski · · Score: 2, Insightful

    I'm not a fan of using the wrong tool for the job. At work we normally use PHP for web applications, but when I see an advantage, I will stray from the "norm" and use Perl.

    XML can be a very good candidate for coding logic. We are starting to do this with several libraries we have developed for manipulating data. It is much easier to get a text document at a major company published than it is to get a DLL published. The DLL is the main engine, controlled by XML documents. We can then create a "custom version" of the library by supplying different XML documents that contain layout and logic. We can write the engine once, then customize it via XML.

  177. Been there, done that, shouldn't have bothered... by mdlbear · · Score: 1
    Yes, XML can be used to represent parse trees, almost as well as LISP can. It's a lot harder to write, and a lot harder to process.

    A few years ago my group actually did build a programming language, essentially a PHP replacement, with XML syntax; you can see the results at http://www.risource.org/PIA/ and http://cpia.sourceforge.net/ .

    The astute observer will no doubt notice that neither of those projects has been updated recently.

  178. Given that my user name is smug_lisp_weenie... by smug_lisp_weenie · · Score: 2, Insightful

    ...I just want to say:

    Congratulations!

    You are now on step 1 on a long and tedious journey to building a poorly-designed lisp dialect!

    Other posters have already made this case well enough that there's not much point in me elaborating! :)

  179. Let's keep it, I'm serious by SunFan · · Score: 1


    Base all first-year CS courses on this language. The metric for passing the course is simple: advance all the students who quit this class to the next year CS courses, and drop all the students who stick it out the whole semester because they are obviously tools.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  180. An eXtendible program compared by zapatero · · Score: 1

    Here's an example C function that sums a vector of integeers:

    int vsum(int *v, int v_len)
    {
    int rv = 0; // the return value.
    int i;
    for (i = 0; i < v_len; i++)
    rv += v[i];
    return v;
    }

    The above sample is horribly unreadable and suffers from eXtendibility deficiency.

    Watch how the same program written in eXtendible becomes far more clear, precise, and managable.

    I tried to format this with more space, but the slashdot posercomment compression filter kept rejecting it.

    <function name=vsum>
    <param type=integer refernece=pointer>
    <param_name>vsum</param_name>
    </param>
    <param type=integer reference=value>
    <param_name>v_len</param_name>
    </param>
    <body>
    <localvar type=integer reference=value>
    <local_name>rv</local_name>
    <comment>The return value</comment>
    <inital_value>0</initial_value>
    </localvar>
    <localvar type=integer reference=value>
    <local_name>i</local_name>
    </localvar>
    <iterate type=for>
    <initialize>
    <setvar name="i" value=0/>
    </initialize>
    <cond>
    <expr>
    <left type=var name="i"/>
    <right type=var name="v_len"/>
    <operator type=less-than/>
    </expr>
    </cond>
    <pre_cond>
    <setvar name="i">
    <expr>
    <left type=var name="i"/>
    <operator type=auto-incr/>
    </expr>
    </setvar>
    </pre_cond>
    <loop>
    <setvar name="rv">
    <expr>
    <left type=var name="rv"/>
    <right>
    <expr>
    <left type=var name="v"/>
    <right type=var name="i"/>
    <operator type=array-index/>
    </expr>
    </right>
    <operator type=add/>
    </expr>
    </setvar>
    </loop>
    </iterate>
    <return type=var name="rv"/>
    </body>
    </function>

    1. Re:An eXtendible program compared by kamilyon · · Score: 1

      Hello,
      I guess the problem with the two examples is that:
      In the first you are using a value and a pointer. If I wanted your code translated to Scheme, I would have to re-implement it from scratch as it Scheme only supports pass by value.
      In the second, you made the XML code overly verbose. You also have typos that don't sync up. I guess that is why it would be better left to the IDE to make the XML and not you.

      --
      abstraction is 2 keep the weak from knowing the truth. show your source code && always seek the knowledge within
  181. In Other news... by Nashirak · · Score: 1

    scientists anounced the world will be coming to an end right after the anouncment of the XML for programming language endevour. Seriously, we use XML at work and the overhead of XML has made us all sit back and think, mabye everything shouldn't be in XML.

  182. This is only a 20% difference by iamacat · · Score: 4, Insightful

    I don't see why you gave up the benefits of C++ for such a small improvement. One day you might want to display video on the sides of your cubes. With C++, you just pass a VideoCube to renderer.spin(Cube&cube) and it will call approporiate virtual functions to get bitmaps of each of the sides. With C code, you are likely accessing internals of struct Cube directly and can not change it's implementation without re-writting a lot of code.

    Besides, if you really need efficiency, you can write low-level routines in C and still compile them using a C++ compiler. Make Renderer a friend of Cube if you really want to hardcode its internals. Of course, some C++ features like non-virtual method calls have no extra overhead, and some - like inline functions and refrences instead of pointers - can potentially generate faster code.

    OOP can be overdone, but a small degree is useful in any program longer than 2 pages. By contrast, I don't see how coding directly in XML would ever be helpful. If that's an internal representation used by my editor or compiler - well, whatever works for them.

    1. Re:This is only a 20% difference by FireBreathingDog · · Score: 1
      I don't see why you gave up the benefits of C++ for such a small improvement. One day you might want to display video on the sides of your cubes. With C++, you just pass a VideoCube to renderer.spin(Cube&cube) and it will call approporiate virtual functions to get bitmaps of each of the sides. With C code, you are likely accessing internals of struct Cube directly and can not change it's implementation without re-writting a lot of code.

      I tried this and it wouldn't compile. Where are the header files for the VideoCube and Renderer classes?

    2. Re:This is only a 20% difference by Anonymous Coward · · Score: 0

      You could write bad code in C? Unbelievable!

      The proper language is a function of the application, not a global constant. You can write bad code using bad practices in any language. The goal of selecting a good language is to align the structure of the language with the structure of your program.

    3. Re:This is only a 20% difference by Unknown+Lamer · · Score: 1

      Just put function pointers inside of the struct in C and it's just like having virtual methods.

      Problem solved.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    4. Re:This is only a 20% difference by iamacat · · Score: 2, Insightful

      Oh no. First, you need to put a pointer to a struct of function pointers shared between all instances to have the same space efficiency as C++. That structure should also have a pointer to function table of base class so that you can call functions overridden by yourself without knowing their private names. I assume that each of your structs will have a "super" field of super-struct type in the beginning. To call one of these functions, you would need to do something like:

      Derived *d;
      ((TopBase *)d->functions->draw((DrawBase *)d)(graphicsCtx);

      If draw wants to access fields defined in TopBase, DrawBase and Derived, it will need to cast its first arguments to each of these structs in turn.

      You can implement interfaces by having one "virtual" function that takes a pointer to an interface object and returns a struct with functions of this object for each interface method.

      After a while, you will write macros to encapsulate all these things and will become quite productive. And then one day, you will want to inherit from a struct written by another programmer, who came up with his own virtual functions, inheritance, interfaces and macros.

      Maybe the solution is to write a special version of C compiler with built in support for virtual functions in structs, so that people can use a clean, concise syntax for calling them and structs written by different people interoperate naturally. Oh wait...

    5. Re:This is only a 20% difference by scotch · · Score: 1

      Not really. You could emulate virtual methods correctly in C, but it takes a lot more work than what you describe. Lot's of people do virtual inheritence and OO like stuff in C. Seems like if it's such a common feature to implement, you might want language support for these things rather than inventing them yourself.

      --
      XML causes global warming.
    6. Re:This is only a 20% difference by oliverthered · · Score: 1

      It's easy with stucts and you get more controle,
      operators and renderer are a bit of a pain but not too much.

      main(){
      Renderer* renderer = CreateRenderer();
      renderer->vtable->spin(renderer ,cube);
      }

      spinfunction(renderer* This, Cube* cube){

      }

      Renderer* CreateRenderer(){
      Renderer* renderer'
      renderer=malloc(sizeof(*renderer));
      renderer->vtable->spin = spinfunction;
      return renderer;
      }

      a->vtable->function(a,b,c);

      --
      thank God the internet isn't a human right.
    7. Re:This is only a 20% difference by Kesh · · Score: 2, Insightful

      ... and this is why I dropped out of a CS major after the first year. Dear god, just the first paragraph of that makes my head hurt...

      I'd love to write some applications, but C/C++ is like building a home out of Legos. Including the plumbing, electrical and appliances.

    8. Re:This is only a 20% difference by iamacat · · Score: 1

      Not to mention cleaning core dumps if you ever touch a lego the wrong way. *Smile* Yes, I am afraid I wouldn't be a programmer if either of these languages were my first experience. If "good "+"day" doesn't append two strings, there is just something unhealthy about it.

      Well, I hope bad experience doesn't keep you from having fun. Grab qbasic and draw some fractals. Quite good images for maybe 10 lines of code. Or write a game where you kill your professor by throwing heavy C++ books.

    9. Re:This is only a 20% difference by Unknown+Lamer · · Score: 1

      My version would have worked fine. Who cares if you lose maybe 10*sizeof(function_pointer) (or whatever the number of methods is, ten seems reasonable). That's 40 entire bytes per struct on a 32-bit system! OH NO THE SKY IS FALLING WE ARE RUNNING OUT OF RAM!!!

      If your memory contraints are that tight you probably wouldn't be using C++ and would be using your multiple-struct solution.

      This is why I use Lisp most of the time.

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    10. Re:This is only a 20% difference by Mister+Incognito · · Score: 1

      You are actually wasting your L1 cache.

    11. Re:This is only a 20% difference by QuantumG · · Score: 2, Informative
      By contrast, I don't see how coding directly in XML would ever be helpful. If that's an internal representation used by my editor or compiler - well, whatever works for them.

      Which if you'd read the fuckin' article, you'd know that's what it was about!

      --
      How we know is more important than what we know.
    12. Re:This is only a 20% difference by Anonymous Coward · · Score: 0

      You could emulate virtual methods correctly in C, but it takes a lot more work than what you describe.

      I'll say. The syntax for function pointers alone is enough to give me a headache. Add all the nice inheritance and type checking you get in a C++ class, and there's no contest.

    13. Re:This is only a 20% difference by iamacat · · Score: 1

      How does your version handle nested inheritance any better? Say, I have A->B->C->D->E and I want to call method foo and I don't remember which class defined it. Clearly impossible. Now, say I figured out it was defined in B. How do I invoke it? e->super.super.super.foo()? e->d.c.b.foo()? ((B *)d)->foo()? The last version is the shortest, but doesn't do any compile-time checking that d is a "substruct" of B, rather than say an int.

      As for memory, say you have an array of million pointers to objects with virtual functions - entirely possible for complicated graphics rendering. Are you really saying it doesn't matter if vtables add 4M overhead or 40M overhead?

      There is already a language that is compatible with C, handles OOP without unnecessary overhead, and generates code identical to C when OOP is not used. What makes you think that you can do better than many competing compiler vendors, without even writing a compiler? How can a Lisp user complain that C++ has too much overhead?

    14. Re:This is only a 20% difference by EsbenMoseHansen · · Score: 1
      Not to mention cleaning core dumps if you ever touch a lego the wrong way. *Smile* Yes, I am afraid I wouldn't be a programmer if either of these languages were my first experience. If "good "+"day" doesn't append two strings, there is just something unhealthy about it.

      Ah, you want C++ string (std::string) then. Or rather, you want operator overloading then, so that you can add, multiply or whatever anything you like.

      Sorry, just couldn't resist :)

      (And to stop the flames: C standard strings are severely broken, I agree. Consider them legacy and forget about them.)

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    15. Re:This is only a 20% difference by Jedi+Alec · · Score: 1

      (And to stop the flames: C standard strings are severely broken, I agree. Consider them legacy and forget about them.)

      Why thank you, now I'll just get back to my coding on them darn irc services, written in C. oh wait, irc is all about text, and C is just wonderful in handling that...strcat to concatenate 2 strings, argghhh.

      --

      People replying to my sig annoy me. That's why I change it all the time.
    16. Re:This is only a 20% difference by Anonymous+Brave+Guy · · Score: 1

      Why would you ever write code like that? You're simulating some useful features of C++ in a cumbersome and unreliable way in C when there's a tool available to do it all for you. That's not more control, it's just more effort and more bugs.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    17. Re:This is only a 20% difference by Anonymous Coward · · Score: 0

      change it's implementation

      "its".

    18. Re:This is only a 20% difference by Unknown+Lamer · · Score: 1

      What I'm saying is that if you were on a system where 40 bytes actually mattered then I doubt that you would be using C++. You probably wouldn't be using Lisp either.

      My version doesn't deal with inheritance after the first level. It allows for the overriding of methods on one class so that it can be reimplimented in different ways without any problems. A lot of times this is enough.

      Having the vtable in a struct shared between every single instance of a class does make sense. I wasn't thinking last night (well, earlier this morning really).

      C++ does not generate identical code to C when you avoid using OOP stuff. There is a lot of stuff involving temporary copies and whatnot that doesn't really go on behind your back as much as it happens without you having to write any code. So, unless you know the language extremely well, there's probably some fiddling with memory going on that you can't see because there is no explicit code mentioning it. It is also not entirely compatible with C (especially not C99).

      --

      HAL 7000, fewer features than the HAL 9000, but just as homicidal!
    19. Re:This is only a 20% difference by EsbenMoseHansen · · Score: 1

      Then, for heavens sake, go find a decent C string library. There are a few :-D

      Or use some other language than C. Like C++. Or python ;-)

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
    20. Re:This is only a 20% difference by johnnyb · · Score: 1

      "Maybe the solution is to write a special version of C compiler with built in support for virtual functions in structs, so that people can use a clean, concise syntax for calling them and structs written by different people interoperate naturally. Oh wait..."

      They called it Objective C. A similar language arose but which threw out a lot of the low-level C stuff and they called it Java. Then someone came along and puked up their guts and they called the resulting mess C++.

      Of course, some of us were using Scheme and just ignored everyone else :)

    21. Re:This is only a 20% difference by oliverthered · · Score: 1

      With a few macros is not much more effort and type safe so no more bug prone than C++, and I get 'direct' vtable access without hacking which is more control and more reliable. I also get the benifit of nice compile times and portability and not having mangled names at the mercy of the compiler.

      Personally I'm a C++ man, but only because operator overloading is cleaner and doing it the C way, and I get templates and namespaces in C++.

      --
      thank God the internet isn't a human right.
    22. Re:This is only a 20% difference by Anonymous+Brave+Guy · · Score: 1

      I'm sorry, but I can't agree that macros are no more bug prone than using the built-in C++ features. C-style macros are just a simple text substitution mechanism, with no real type-checking at all. Any polymorphism has to be coded by hand, as does ensuring destruction occurs, and anything manual is a potential source of errors, even without things like exceptions muddying the waters.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    23. Re:This is only a 20% difference by CableModemSniper · · Score: 1

      "good" + "day" doesn't concatenate two strings not even in C++. you'd have to type string("good") + "day".

      --
      Why not fork?
    24. Re:This is only a 20% difference by EsbenMoseHansen · · Score: 1

      True, I thought you meant strings as in string objects.

      Still, the above limitation is not a serious one, and it is a small price for not being bound to a single string implementation.

      It would be nice, though, to have support for some type for compiler-time generated objects. As a special case, that would fix the above (and so much else)

      --
      Religion is regarded by the common people as true, by the wise as false, and by rulers as useful.
  183. I didn't believe my eyes. by SunFan · · Score: 1


    One section is titled "In Defense of Monopolies" and the author goes on to say that Microsoft being able to dictate a programming language onto people is a good thing, because it fits his agenda!

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  184. Start with the DB first. by Doc+Ruby · · Score: 1

    Who needs all that crap in the code for stuff like formatting? There's too much already - mostly whitespace, but also all the other structural delimiters like braces ('{'), parentheses/commas of lists, type identifiers like "sub" or "int void()", even repetitions of variable names. Of course all that stuff should appear in the presentation of the code, when reading it onscreen. But I want a tokenized or otherwise structured form of the code stored in records in a relational DB, factored down to the minimal representations of the code graph. A copy of the edited source textfile can be stored as a blob, including a "compiled OK" flag. I want to view the program by serializing it with formatting and real object names (rather than their indices in the "objectNames" table, changing from, say K&R indentation/newlines to my own idiosyncratic version. I want to ask the code questions about itself, like "how many local variables are called 'index'", or "change all function calls and definition prototypes that return 'time_t' and take 'int8 yy' arguments to instead take 'int32 yyyy' arguments', and complex related combinations. I want every block opener to include a comment (eg. "{ // \n"). I want to refactor code by asking a tool to use some version of "SELECT DISTINCT_BLOCKS(blocks)", or even smarter SIMILAR_BLOCKS(blocks). Get a package with no docs? How about "SELECT DISPLAY(scope, range, code) FROM program WHERE kind=comment", and save the result in README.raw? Wrap that in an HTML generator that marks up the scope/range/code IDs into query URLs to display the commented code, and you've got JavaDoc - as an afterthought to coding, without caring while you code.

    Source code is some of the most highly structured data we make. We should be able to use our data tools to handle it better. I want distributed clusters for uptime, distributed compilation, codesharing and version control. I want replication, dumps and stats. We're already using the hierarchical database, the filesystem, that we've been stuck with for 30 years - it's time to move on. We can keep, eg, C's "file" scoping as a virtual construct, but we can share that single file with several projects, and even have several versions used under switchable circumstances. Who will recode gcc's filesystem calls to SQL?

    --

    --
    make install -not war

  185. Yes, but what about grep-ing? by Anonymous Coward · · Score: 0

    You have a valid point, but think of scenarios where you have to do analysis of the code. You would be needed to convert into native format before any analysis is possible.

  186. Profile Programming by Anonymous Coward · · Score: 0

    Well, I have been secretly working on Profile Programming. With Profile Programming I propose that the next generation of programming languages will use INI files.

  187. Reminds me of Dylan by HalfFlat · · Score: 1

    Now, as LISP has shown, programming straight to the AST, while it has its advantages, is a historical loser. But that doesn't make exposing it in a standard fashion a Bad Idea. On top of it, you layer a more conventional language... and as strongly as I am defending an XML-exposed AST, I even more strongly believe it would be a stupid, fatal mistake to make that the human-exposed language that one actually programs in.
    The syntax of the programming language Dylan was originally s-expression based; but observing that this was going to hinder its acceptance, the syntax was changed to a much more familiar (to most programmers) traditional procedural syntax. Sadly in the end, it didn't help sufficiently to make Dylan a popular language, despite all the cool features it offered. But the thing to observe I think is that the syntax of a programming language is not so special that it can't be changed and manipulated. I don't think in the end Dylan compilers and interpreters supported the older style syntax directly, but essentially the new form was syntactic sugar, and could have been transformed to and from an s-expression form automatically.

    I'd love to use a derivative of C++ whose source was maintained structurally, and which had tools (editors, etc.) that supported it, provided I didn't need to learn a new syntax to code in. It would certainly allow for much easier to understand and code compile-time processing, which is currently performed with template meta-programming and which is generally a royal pain to get right, portable and not too buggy. Hygienic macros for C++? Cool!

  188. ASP.NET already does this, to an extent... by Skim123 · · Score: 1

    ASP.NET uses XML markup for the front-end GUI stuff. For example, if you want to add a TextBox Web control to a page, you add:

    Hello, World!

    Which basically is translated the first time the page is visited into a class with a TextBox class instantiated and added in the proper place in the control hierarchy.

    I really like this approach of XML syntax for defining the UI of a page; it makes especially good sense for Web pages, since developers are already familiar with the XML-like syntax of HTML markup, and this allows them to just add Web controls in a similar fashion embedded within their markup. Microsoft likes this approach enough that Avalon is spelling out UI-specific bits using XML in the same manner. This strategy makes sense if you look at it in the long run, since it allows for:

    (1) A unification of ASP.NET and Avalon syntax. Once you have this, there is no difference to creating the UI for a Web page vs. a Windows application.
    (2) It allows for a platform-neutral manner to specify markup, thereby allowing a hosted application to be run on a variety of platforms/devices. Basically, I can have a server that has the UI markup, you ping my server, I send you the markup, and you render it appropriately on your device.

    --

    I could not justify my existence if I were a turkey farmer. Would I terminate myself? Undoubtably, yes.

  189. You mean using the new PPI Perl parser? by Anonymous Coward · · Score: 0

    If ever there was proof that anything is possible...

    http://search.cpan.org/perldoc?PPI

  190. I designed a programming language like that... by ulatekh · · Score: 1

    Back in my early 20s, compilers and development systems were my primary interest in computers. (My reasoning was that we as programmers spend all day interacting with a development system, but don't seem to spend much time thinking about the development system, and I wanted to change that.) My source code format was going to be structured text, much like XML is nowadays. (Back then, I only had SGML as a reference.) I generated a huge stack of notes and thoughts on the system, but got to the point where I realized I'd need a team to have a reasonable chance of implementing it. And so it remains paper.

    The reason I chose an XML-like source code format is that I wanted to allow the source code to be browsed by whatever visual metaphor the programmer felt comfortable with. The vast majority of average programming constructs can be expressed in any language, and allowing language-specific displays of XML-stored information seemed like a good way to allow programmers to use the system without a huge learning curve. It also allowed code written in other languages to be imported & turned into native XML-ish code instantly. That's important for leveraging legacy code.

    Of course, the system supported far more constructs than the average language. It seems that most programming languages have some sort of religion they want to whip on you, and the language has a combination of features that tend to reinforce those religious beliefs. In contrast, my language featured every programming construct, and the ability to add new ones -- extending the compiler was intended to be as common as writing a subclass. The logic here was, we're real programmers implementing real projects in the real world, and we need the tools to get our job done, not some religious language-designing ninny forcing us into their dystopia.

    To combat the obvious problem of bad programmers writing code that no one will be able to understand, I designed the language as two layers: the lower one is called Clay, and the higher one is called Scaffold. The idea is, Clay allowed programmers to do anything their heart desired, whether ill-advised or dangerous or whatever. It was something like a compiler-development toolkit exposed as a language. Scaffold, written in Clay, was an attempt to create a real software-engineering language on top of the free-for-all that Clay offered. Scaffold combined the low-level programming abilities of C++, the design-by-contract of Eiffel, the orthogonal pattern construct of Beta, and the high-level browsing of something like Rational Rose. The GUI would handle programmers writing code in metaphors they were comfortable with, and all of it would be stored in XML. The junior programmers would spend most of their time in a variant of Scaffold, and the senior programmers would write Clay constructs to make the development system more closely match the project, and thus make programming it less tedious and error-prone.

    Oh well, it looks like once again, ideas I came up with years ago have been independently discovered, and due to my inadequate promotion skills, someone else will get the credit. I tried describing something like this back in 1995 or so, but got only glazed looks in response. (Want to hear about a neat video game I designed on paper back in 1992? The one I called "Turf"? Where you start out as a thug on the street, get jobs from gangs, and work your way up to more difficult jobs that pay better, and meanwhile you get to wreak havoc in an urban landscape? Sounds like Grand Theft Auto, you say? Damn right it does. I described it back in 1992 and got only glazed looks in response. Being visionary doesn't mean squat unless you can promote.)

    - - - - - - - - - -

    Think The Fountainhead is just a book? Check this out.

    --
    "Once we've identified and embraced our sickness, we'll have strength...and that's when we get dangerous." - John Waters
    1. Re:I designed a programming language like that... by Anonymous Coward · · Score: 0

      Where is your web site with the documentation for the language, and a sample compiler and/or interpreter and/or IDE? That's what developers want; something solid to try out, and find out if they like it.

      Vague concepts that haven't had effort put behind them don't usually go anywhere. A grand design that can't be implemented is, after all, largely useless. Implementation is the key to popularity: once you demonstrate that something can be done, people are more willing to help you do it.

      After all, nearly anything is possible in theory. As the saying goes:"the devil is in the details".
      --
      AC

  191. The idea is just scarey! by mfearby · · Score: 1

    The idea that a program would generate the XML for me, based on what few, horrible, GUI tools it decided to expose, is scarey on so many levels. VS.NET is the biggest abomination yet to come out of Redmond. We don't need this type of bloatyness rammed down our throats even more!

  192. Less verbosity! by Grendel+Drago · · Score: 1

    "I knew I'd hate COBOL the moment I saw they'd used perform instead of do." --Larry Wall

    'Nuff said.

    --
    Laws do not persuade just because they threaten. --Seneca
  193. Ah crap, it misformatted... by Skim123 · · Score: 1

    Teaches me to hit preview first... Anywho, it should be:

    <asp:TextBox runat="server" id="myTestBox" ...>
    Hello, World!
    </asp:TextBox>

    --

    I could not justify my existence if I were a turkey farmer. Would I terminate myself? Undoubtably, yes.

  194. Has it occured to you... by jerometremblay · · Score: 1

    Has it occured to you that if writing language extensions were easier, you would do so more often?

    We are already creating words (named functions), creating rules to use them (languages...) would allow you to create task-specific languages very easily.

    1. Re:Has it occured to you... by pfdietz · · Score: 1

      I write language extensions all the time, but then I work in Common Lisp.

      This XML thing is just an abomination. What the hell happened, did someone drop a brain-eater bomb on us?

    2. Re:Has it occured to you... by jerometremblay · · Score: 1

      How is using one data serialization scheme over any other possible choice an abomination?

      If you read TFA, you would notice that in their view, no human being would ever see or edit XML.

      Of course you must still write Postscript instead of using a visual word processor.

  195. Redundant syntax in source code is a BAD IDEA by MoxFulder · · Score: 2, Insightful
    The primary benefit of XML is that as a standardized language, standardized parsers can be made available that are reasonably easy to use.
    A lot of comments have suggested that encapsulating source code in XML would make it easier to parse languages in a consistent fashion, and thereby to write better code validators, formatters, style checkers, etc.

    This leads to a logical paradox: if programmers continue to write code in "plain" ascii format, how is it going to acquire the XML markup? Why, someone would have to write a parser, of course!

    This XML encapsulation is a misguided effort to create a standard interface to code parsing. Guess what! A highly effective parser already exists for every single programming language. It's the compiler!

    To encapsulate source code in an XML form that redundantly specifies how it is to be parsed is asking for trouble:

    1. What if the XML markup ever gets out of sync with the plain text source code? Either:
      1. Software for editing/validating/formatting the code WILL catch the problem. If so, that software must include a parser for the ASCII source code, thus rendering the XML useless, OR...
      2. XML-ified software WILL NOT catch the problem. The code might get highlighted incorrectly in the editor or incorrectly validated by the code checker (yikes!)
    2. What if compiler writers get lazy and start relying on the "pre-parsed" source code. Now the programmer might be in the lovely situation of editing plain text code that's marked up INCORRECTLY with *hidden* XML code that's affecting the compilation of the program.
    My point is, don't include redundant information in the fundamental form of your source code, because it will get out of sync somehow. Remember all those wParam variables in 16-bit Windows API? The "w" was supposed to "document" that it's a 16 bit variable. Now it's declared as a 32-bit variable and everyone calls it wParam... if they still code in C. At worst, it's misleading, at best useless and annoying.

    If people want a standard way to decipher language syntax, then compiler writers should write hooks in their compilers to export the parse tree in a standard format. Heck, it could even be an XML format, but this should be treated like an object file (it's derived from the source code rather than the source code itself).

    1. Re:Redundant syntax in source code is a BAD IDEA by Formica · · Score: 1

      Argh! I just lost my mod points yesterday. Someone mod parent up!

    2. Re:Redundant syntax in source code is a BAD IDEA by Anonymous Coward · · Score: 0

      Actually, the w in wParam is meant to represent a "word", in regards to the word-size of a machine. The word-size of a 16-bit machine is 16-bit. The word-size of a 32-bit machine is 32-bit (a 16-bit value is usually called a half-word ;)...

      That's not to say that having those sizes isn't useful - we often call variables u16Value, etc. for exactly this reason.

    3. Re:Redundant syntax in source code is a BAD IDEA by MoxFulder · · Score: 1

      Well, I realize that in principle, "w" stood for word, but this wasn't really how it was used in Windows. I guess Microsoft was kinda sloppy, but basically I just thing the whole Hungarian notation, where you prefix the type of the variable to the variable is a terrible, ugly thing. Modern code editors like Emacs can automatically find the declaration of a variable for you. Plus in well written procedural code, most of your variables should be of a small enough in scope that finding the declaration is EASY.

      In Windows 3.1 API, "w" meant 16-bit and "l" meant 32-bit integer. But then in Windows 95 API, "l" still meant 32-bit, and "w" was still no longer used.

  196. Old News by Skjellifetti · · Score: 1

    Workflow engines have done this for years. Xforms can be extensible in this fashion as well. Basically, any engine that interprets some type of XML tag that describes a condition and runs a proceedure call based on that condition with a list of parameters does what this guy is talking about.

  197. Question: Ready to 'diff' XML ? by ivec · · Score: 1
    I find that the author underestimates the importance of low-level ASCII manipulation tools in programming. Is there a CVS-like tool that is XML-friendly? or even a diff tool that facilitates the merging of concurrent changes to an XML document?

    As a programmer, I currently can't even handle HTML generators, and prefer to code (most of) my web pages by hand.
    I wonder what becomes of Big Ball of Mud spaghetti code when translated into XML. How much worse can it become?

    Another key issue may remain efficiency: compile and link times have remained issues for large projects, as program complexity keeps up with performance increases.

    I'd bet on pure text source code for serious programming in the next 10+ years. Which doesn't mean that the Visual Basics and Mathematicas of tomorrow won't choose and XML-based storage format.

  198. Let's keep it, I'm serious-AMA by Anonymous Coward · · Score: 0

    "Base all first-year CS courses on this language. The metric for passing the course is simple: advance all the students who quit this class to the next year CS courses, and drop all the students who stick it out the whole semester because they are obviously tools."

    And yet when the AMA tries something like that. You all complain about "the man" keeping you down, and "greedy bastards" (amoung other things).

  199. Source code viruses? by ivec · · Score: 1

    I look forward to the first virus hidden in the meta-information of a program's source code.

    1. Re:Source code viruses? by kamilyon · · Score: 1

      Do you know of the first virus to ever strike an ASCII README.txt file? If there is a virus in the meta information, it is a problem with the editor and you should probably be using a better programmed tool for YOUR programming. Current files are stored with extra info on disk like a link to the next sector of data, the file size , and last accessed date. The same system to help this stay in tact should have a simile for your source code with the tools you use. If you find a virus, it is because someone decided to do a low level hack and it is no different from someone setting a certain bit sequence in a jpeg to cause a faulty renderer to crash.

      --
      abstraction is 2 keep the weak from knowing the truth. show your source code && always seek the knowledge within
    2. Re:Source code viruses? by ivec · · Score: 1
      Do you know of the first virus to ever strike an ASCII README.txt file? Yes. Please read about the following linux compromise attempt to see what I mean: http://lwn.net/Articles/57135/.

      Here's another Debian-related example: http://searchenterpriselinux.techtarget.com/origin alContent/0,289142,sid39_gci938279,00.html

      The origial ./ article mentions that the extensible system would have special modules to manage the display/compilation of source code. Like ActiveX controls, this will make the compiler extensible, but fragile.

      My point was: what if, instead of infecting your machine directly, the attack hidden in the source would generate unexpected viral or backdoor code. Upon review the source code would look ok. But during compilation the attack (e.g. a buffer overflow connected to some meta-information) would lead to the generation of different code - which will then be embedded in the produced executable.

      The first example above uses a syntax detail of the standard C language. But with an extensible compiler, opportunities to sneak unexpected behavior into the generated code may proliferate...

  200. Extensible Language by Anonymous Coward · · Score: 0

    Nothing new really.

    There's one called Forth that came out years and years ago. Very nice little language, even complete with incremental compiling. Unfortunately it never made it to mainstream.

    1. Re:Extensible Language by Anonymous Coward · · Score: 0

      > There's one called Forth that came out years and years ago. Very nice little language, even complete with incremental compiling. Unfortunately it never made it to mainstream

      Heh, I have 2 machines here that have it in rom..

  201. But... by slavemowgli · · Score: 1

    But we already have an extensible language.

    --
    quidquid latine dictum sit altum videtur.
  202. Re:Silly article (Silly Post (Silly Reply)) by PylonHead · · Score: 3, Funny

    So let me get this straight:

    You're arguing that programming languages are hard to parse, because, if you don't use any of the tools developed over the last 35 years to parse programming languages, it's hard?

    In a similar vein, you might find that building a set of shelves is hard if you don't use hammers, screwdrivers, and drills, but instead try to embed nails into the wood simply by slamming your head into them repeatedly.

    --
    # (/.);;
    - : float -> float -> float =
  203. To a hammer, everything's a potential nail... by Anonymous Coward · · Score: 0

    I think this is stupid .

  204. Programming writer and instructor ... by pasde · · Score: 0



    Obviously not a coder.

    XML is for data not a programming language. Please.

  205. Grammar by Hard_Code · · Score: 2, Interesting

    Don't most programming languages already have formal grammars? Why would you need to mark them up.

    --

    It's 10 PM. Do you know if you're un-American?
    1. Re:Grammar by drunken+dash · · Score: 1

      i thought the point of the article was that using markup allowed developers to extend the languages they're working with.

      --
      Enjoy an e-piphany
  206. no. by hyperstation · · Score: 1

    um, i kinda like the way we're doing things now. so thanks - but no thanks. :)

  207. XML Obfuscation Considered BAD... by Lodragandraoidh · · Score: 1

    I can see using XML constructs to imbed documentation inside of source code so you can later extract it to whatever format you want.

    I can see using XML as a transport encoding mechanism for moving data from one location to another - and for translating that data from one data management system (say a relational database) to another incompatible system (say to an object database).

    I can see using XML as the native format for all my writings (so that, again, I can translate to any other format I like now, or 200 years from now).

    I can see using XML as a configuration language for applications - so I can create a standard shared language between all of my apps.

    But for other tasks such as generating code or providing a macro layer to an application, I would just use the language I am already using to accomplish the same thing - and probably do it more elegantly/expressively for people trying to get something done fast - which is really what code generation/automation is about (and I must say that code generation should never replace well designed libraries of routines).

    As for using it to port code to other languages --> this is bad, for several reasons, not the least of which is the optimized structure in one language can be a total dog in another; to effectively do this you will need to build some sort of super optimization library to restructure the output code for every possible language variation.

    This is interesting from a laboratory perspective. As far as I am concerned it bombs from a practical perspective. Most of the XML I write is via a wysiwyg editor for all my first drafts - then I tweak as needed - simply because it is tedious to use. I can't imagine using it as my primary programming language.

    --

    Lodragan Draoidh
    The more you explain it, the more I don't understand it. - Mark Twain
  208. break -- by Anonymous Coward · · Score: 1, Insightful

    after invoking the correct dtd (and finding one of the three people on the planet who can write a complex dtd without fcsking it up b.a.r. or making it pig slow to parse)

    then we can write things like
    <loop_check_top><initialize arguments><assign><argument><variable> i </variable></argument><value><integer>0</integer>< /value></initialize /arguments>
    <evaluate><argument><variable>i</vari able><compari son>lessthan</comparison>
    <integer>3</integer></e valuate>
    <modify><variable>i</variable><operator> <integer>i ncrement</integer></operator</loop_check_top>
    <ex ecute>

    Which is terrifically easier to read than
    for(i=0;i<3;i++){

    and because execute can be rendered in different ways so that the { goes on the next line. That's some powerful stuff.

    And because with our really smart DTD's we can emulate this exotic loop structure in languages that only support checking loops at the end by creating some automatic variables!

    Give me a break.

  209. Yay for <xml>. by Anonymous Coward · · Score: 5, Funny

    <response language="English">
    <exclamation tone="sarcastic">
    <word partofspeech="adjective" syllables="1">
    <character encoding="ascii">W</character>
    <character encoding="ascii">h</character>
    <character encoding="ascii">a</character>
    <character encoding="ascii">t</character>
    </word>
    <word partofspeech="indefinite article" syllables="1">
    <character encoding="ascii">a</character>
    </word>
    <word partofspeech="adjective" syllables="1" emphasis="true">
    <character encoding="ascii">g</character>
    <character encoding="ascii">r</character>
    <character encoding="ascii">e</character>
    <character encoding="ascii">a</character>
    <character encoding="ascii">t</character>
    </word>
    <word partofspeech="noun" syllables="1">
    <character encoding="ascii">i</character>
    <character encoding="ascii">d</character>
    <character encoding="ascii">e</character>
    <character encoding="ascii">a</character>
    </word>
    <punctuation>
    <character encoding="ascii">!</character>
    </punctuation>
    </exclamation>
    </response>

  210. Let's create an Obfuscated XML contest by tallbill · · Score: 1

    I think you can make it even better.

    For each '

    for each > have the following:

    >

    Write a program to replace every tag in the manner that I suggest, and then run the xml through that as many times as you feel is humourous enough.

    I like XML, it is a cute way to store data but it is a very band-width intensive way to store data.

    How about this way to store data:
    for the binary byte 0xff:

    1
    1
    1
    1
    1
    1
    1
    1

    And then, because it means the same thing, it doesn't matter what order you put the bit fields in, because the data is all there, isn't it? And if you can't see that you must be blind.

    XML is good for somethings, but not for all.
    And it works very well at seeming to be hard to understand (which it isn't) and so it seems like magic.

    I still like just using a structure definition with well-defined types of a known number of bytes and known byte order.

    Do any of the OOPSLA monger really believe that we are still fooled by their non-sense?

    1. Re:Let's create an Obfuscated XML contest by tallbill · · Score: 1

      That is so obfuscated that because I wrapped my code up in to xml tags, it just disappeared. I guess I should have expected that to happen as /. always allows for tags.

      How dumb of me. . .
      not remembering those & lt ; (no spaces)

      Let's see if I can do this again.

      <tag_bracket position = start><</tag_bracket>

      And then for the end bracket do the same as follows:
      <tag_bracket position = end>></tag_bracket>

      and for binary, 0xff:

      <binary BIGENDIAN ="true">
      <bit position = "1">1</bit>
      <bit position = "2">1</bit>
      <bit position = "3">1</bit>
      <bit position = "4">1</bit>
      <bit position = "5">1</bit>
      <bit position = "6">1</bit>
      <bit position = "7">1</bit>
      <bit position = "8">1</bit>
      </binary>

      And, of course, to make it even more obsure apply the first bracket substitution scheme to the bit data.

      PS: When trying to show xml tags on a post, it really is important to preview to make sure you got all the escape codes correct.

      Oh, yet another reason why XML is overly complicated for a programming language. Why can't they just keep it as a markup langage?

  211. A lot of knee-jerk reactions so far... by titusjan · · Score: 1

    Yegg, more bloat. Stupid idea to let people code in XML.

    Shows that the poster didn't bother to RTFA. Of course you're not supposed to code directly in XML. XML is not very human readable. It is, however, easy for a machine to parse. The programs are stored in XML, programming stays more or less the same.

    What does this do that I can't allready do in C?

    The point of the article is that programmers should stop thinking of their code as a stream of characters but treat it like a tree. For example, when I want to change all the name of a function, tools like grep and sed don't suffice because they can't tell if a string belongs to a function call, comment or literal. A refactoring tool needs to know the structure of the program. Of course there are allready tools that are capable of this (Eclipse?), but they are in fact a partial compiler. Why not get rid of this duplication? If a language gives you easy access to the abstract syntax tree everyone can write his own refactoring tools in a minute.

    Another way to look at it is this. If you'd have to design a data format to store an abstract syntax tree that is flexible and can last a few decades, would you come up with the following?
    for (int i=0; i < 10000; i++) { if (i<100) printf("%d\n", i); else printf("%f\n", i) };
    Yet, this is how most abstract syntax trees are stored. You and I would probably define a format that represents the tree structure of the program more directly. This could be easily realized in XML.

    The best known example of an extended language is C++ which originated as a "C with classes". Stroustrup added a feature to an existing language instead of writing one from scratch because this would have meant existing code had to be ported and the new language would suffered from the same problems as any immature language. The disadvantage of this approach is that of legacy mistakes like the declaration syntax in C. This particular problem would be non-existing in a language that was designed to be extended.

    Bah, lisp can do this since 1950. When will people see the light?

    IMHO never. A similar article from the same author was on slashdot earlier, in which he acknowleges that lisp can allready do this but also that lisp is waiting for a breakthrough for four decades. XML may not be the most elegant solution but it has the momentum.

    The above mentioned article adresses some other objection people might have: e.g. that desiging a language is a difficult process because of the effects language constructs have on each other, and that therefore we shouldn't give this power to every high school student.
  212. you will repeat history if you do not remember it by e40 · · Score: 1

    Beating the Averages by Paul Graham is a good start. What made Lisp different and On Lisp are also by Graham. Lastly, one from Franz Inc on domain specific languages on top of Lisp. Really, if you've never used Lisp and you want to create your own language, you're missing the boat.

  213. Convience and affordable by drollexecutive · · Score: 1, Funny

    Sounds like it would really work, like plus with a twist. Curve and engrave your own squares. The difference between machines and langauges are in the ends. The machine only reads code which it signifies patterned. Those of us building langauges pattern our own, postulating a purpose. Sounds really amazing that langauges are other than useless. I'd like to meet those guys. ThankYou. ThankYou. Refreshments and information are in the lobby when you leave.

  214. re: verbosity by Chris+Rathman · · Score: 1

    Waiting for the challenge to bring job security. :-)

  215. Forth is already there.... by EmbeddedJanitor · · Score: 1
    My programming languages were always extensibl

    C isn't extensible. C is still C. You can't chenge the structure of C. You can pull some tricks with macros, but it is still C.

    Forth allows to to hack the **compiler** on the fly (ie during the compile). This makes it pretty damn powerful, but is also dangerous in the wrong hands.

    --
    Engineering is the art of compromise.
  216. I've seen the idea mentioned by someone else yet by Szplug · · Score: 1

    a few years ago, without (IIRC) the extensible language part. I don't remember who. Sorry to worsen your pain but, ideas themselves are cheap; implemented ideas are what make the world go 'round.

    The good news is that, everyones' thinking of this means that hopefully it's an idea whose time has come. I sure hope so.

    --
    Someday we'll all be negroes
  217. Just like what? by weston · · Score: 1

    just like Web browsers and other WYSIWYG editors

    *giggle*

    *snicker*

    *sob*

    Have you used any WYSIWYG editor that didn't mangle markup or render it poorly?

  218. low quality news by Anonymous Coward · · Score: 0

    I hate programming some times.

    This is useless. Waste of news space too at that.

  219. Sound like LISP by Anonymous Coward · · Score: 0

    Seriously, LISP is like XML except with less typing, and it's a programming language too. It's also exensible. People won't use it because it's too "strange", and typical implementations are either mere toys, expensive, or have issues with using libraries.

  220. They already have this by Anonymous Coward · · Score: 0

    It's called Ant.

  221. It has very clear uses by tallbill · · Score: 3, Insightful

    If you have XML you can suck it into a DOM parser and then do node walking. Then you can write the data from the nodes into structures in whatever language you have. And for this reason it makes a great way to feed data from one program to another.

    It is a very inefficient way to have the data for a program while the program is running.

    I agree that XML can be whatever you want it to be, and I agree that it is very over-hyped and the OOPSLA mongers, who make their money trying to confuse people into buying into their solutions, are behind XML in a large way.

    XML is still good for many things.

    But it is very bad for high-performance programming like robotics or video games, or graphics or music. It is a good thing to use to store data, or at startup in a real-time process.

    For web pages having the tags around all the data makes XML formated pages very easy to spider. And for that reason alone it is very useful to use in web pages. But that XML will look just like HTML.

    So don't disregard XML all the way. But please do continue your health skepticism about it.
    The object-tool mongers caused a lot of problems and a lot of grief for many engineering products by selling tools that were designed by amatuers and supposed to work in real-world real-time situations where they just couldn't hack it.

    Were there ever any refunds made for any of these so-called tools? These professors got rich selling their seminars and a lot of very good companies got duped.

    1. Re:It has very clear uses by Anonymous+Brave+Guy · · Score: 1
      If you have XML you can suck it into a DOM parser and then do node walking. Then you can write the data from the nodes into structures in whatever language you have. And for this reason it makes a great way to feed data from one program to another.

      Sure, as long as your data has a convenient text representation, and maps conveniently onto a tree structure...

      Were there ever any refunds made for any of these so-called tools? These professors got rich selling their seminars and a lot of very good companies got duped.

      No, the good companies were the ones who didn't get duped.

      --
      If you disagree, post your argument. (-1, Overrated) isn't your personal censorship tool for views you don't like.
    2. Re:It has very clear uses by TheRaven64 · · Score: 1

      XML is a nice data interchange format. It allows a receiving application to only parse the bits it understands, and easily ignore everything else. Using it for other purposes is just plain silly (although seemingly a popular pastime).

      --
      I am TheRaven on Soylent News
  222. C Macros by emjoi_gently · · Score: 1

    I can see the point of this... it look to me to be a bit like C Macros. A way to invent your own keywords and the like.
    But, personally I find a major Hell can be to be given some C code that is chock full of Macros and then attempting to make sense of it. Having to go look in all sorts of places to figure out what neat trick the previous programmer was playing.

    I'm very glad macros were downgraded in C++ and disappeared all together in Java.

    Creating your own neat language extensions in XML might be fun and help you out in the short term, but pity the poor fool who has to make sense of it later.

    And face it, XML is an excessively verbose, pain-in-the-arse to read. Especially when things get complex and nested.

    But as a language translator, or a YACC front end, it's as good a plan as any.

  223. extra layers add a lot of power to an idiom by tallbill · · Score: 1

    The reason that one creates layers in code is to allow for hooking into the code later with patches and modifications that maintain the idiom of the other layers.

    That is why there is a 7 layer stack for communications. 7 layers! but why, that is too complex! However, when looking at it from a position of understanding you see the elegance of it. The abstraction allows for an elegant idiom with the various layers!

    And if a layer is not used it is proxied. That way if real code is needed later the hooks are already in place to do this. If you don't need a layer of the stack it calls a proxy which calls the layer below. A complier will optimize away these calls. So the actual code doesn't do anything at this layer unless the calls to it are implemented.

    abstraction is thus a very useful tool. A module or an object can be an idea that is a useful tool for the programmer. This is why one doesn't write to the bytes in hardware, but to a device driver. This is why one doesn't write directly to the harddrive but to a layer that takes requests from all processes to do the writing.

    And so I conclude that abstraction is often much simpler in the long run. I think that what you may object to is obfuscation.

  224. Been using JSON for years and happy by JPyObjC+Dude · · Score: 1

    I've been using JSON (JavaScript Object Notation www.json.org) for a couple of years now for all my JavaScript application programming frameworks and it's paid off extremely well. I can easily express complex data structures in an extremely compact format that is easier to read than XML and is about 40% smaller. I use it for program configurations to hashmap type data structure definitions.

    The beauty of JSON is that it is natively interpreted by both JavaScript and Python making it very fast to parse.

    Sure JSON does not allow for complex meta definitions, but in most programming designs like XML but more often then not, XML is the equivalent of cracking open a walnut with a sledgehammer.

    With proper coding you can use this meta definition model with any language.

    json={
    coolness: "high",
    ease: "high",
    nativeSupport:[
    {type: "language", name: "JavaScript"}, {type: "lang", name: "Python"},
    ],
    nonNativeSupport: "You name it"
    }

    JsD

  225. Talk about bloated source packages... by spitefulcrow · · Score: 1

    Let's hope they wouldn't leave this code style in published source. One example given in some comment elsewhere was a 4-line snippet of C that turned into a 16-line behemoth of XML-compliant C. That's a 400% increase. So instead of a 40MB kernel tbz2 that unpacks to a 300MB source tree we'd have 160MB archives that turn into 1.2GB trees? (Yes, I know it doesn't exactly work that way and that those numbers are probably more than a little exaggerated. But you get the idea of the ridiculous amount of extraneous text that'd be included in these new source files.) New proposal: Let developers use this XML thing so they can easily go make changes. Then they can export code in a less verbose format (i.e. sans XML) for faster download and less space taken up.

    --
    Sorry, my karma just ran over your dogma.
    1. Re:Talk about bloated source packages... by Anonymous Coward · · Score: 0

      I dunno, bloatware demands bloatsource (tm) :-)

  226. XML sucks by Anonymous Coward · · Score: 0

    XML is not a programming language, and should not be treated as such, the syntax is simply blasphemous.

  227. Good if... by Hobadee · · Score: 1

    XML is good if you want the data to be read and/or modified by a human, or if you want to exchange data between 2 different programs that would otherwise have no common language. This is what XML should stay as. I've seen applications that use XML to store proprietary data that no human would ever need to read! This is a completely wrong use of it, as it just wastes the programmers time, and the processors time parsing the XML. People need to learn how to use things for what they are meant for, and not force stuff to work for applications they weren't designed for.

    --
    ...Had this been an actual emergency, we would have fled in terror, and you would not have been informed.
  228. For God's sake no.... by nocotigo · · Score: 1

    Is someone seriously suggesting that the atrocity that is ColdFusion syntax might be a good thing!?!? Its slow, its ugly, and it's far too verbose. When I look at code, I look more at the shape in which it's written than the actual code itself, and can skim over it much more quickly than anything XML based. No no no no no....

  229. It's being done already... by nervine · · Score: 2, Informative

    A small company called Witango Technologies (previously Tango, owned by Pervasive) already has a RAD product that does exactly this. Within a year of using the product, I've found it to be a very suitable product for medium-sized businesses with only a few developers. From importing ADO objects to creating your own Tango Class Files, it's a quick way to pump out whatever the user needs... and you know they needed it yesterday. :) Check 'em out

  230. Re:Subtext - problem by Anonymous Coward · · Score: 0

    I click on the demo to "see it", and all I see is a puzzle piece and "Download Plugin". Thinking that led to this page is *exactly* the whole damn problem with the thinking behind the language and why people stick to ASCII. We already have a standard format (ASCII)... why do we need XML (a !subset! of ASCII)? Proper greek letters? What you want special keyboards to go with that? Like APL. That was another brilliant idea. Wait another *dead* idea.

    The worst problem with all this junk is mentioned in the article. Debugging the freaking crap. Imagine what happens when you don't have the correct plugin to view the code the way the author looked at it. And the author moved on, and is nowhere to be found. Have fun with that....

  231. Just access the bytecode by Bubblehead · · Score: 1
    So let's say you want to write a tool to validate that some Java code conforms to something or other. What's the hardest part of that task, that shouldn't be hard? Parsing the Java code.

    I am sorry, but the problem you are proposing has already been solved - by the compiler - and you don't want to reinvent the wheel, or duplicate code.

    You think I am kidding? Open any modern Java IDE (e.g. Eclipse). You see the whole structure of your program in a huge tree, where you can seamlessly browse through files, jar files, classes, methods, etc. How do you think this works under the hood? I'll tell you: It's nicely navigating along the compiled bytecode. Already parsed, and guaranteed to conform to a well-documented standard. No point in replacing the bytecode with XML.

    --
    Under capitalism man exploits man. Under communism it's the other way around.
    1. Re:Just access the bytecode by QuantumG · · Score: 1

      Except that there's lots and lots of tools for manipulating XML and there's absolutely no tools for manipulating bytecode.

      --
      How we know is more important than what we know.
    2. Re:Just access the bytecode by Anonymous Coward · · Score: 0

      there's absolutely no tools for manipulating bytecode.

      STFW before you make false assertions and a fool of yourself. There are dozens.

  232. I was actually thinking about this last week... by rrowv · · Score: 1

    ...when looking at standard C/C++/C# code, I noticed how much the curly braches {} create a kind of structure similar to XML, and wondered about making an XML version of C++. Everyone here seems to think that's insane, but that's because they're thinking about making EVERY element an XML element, which isn't neccessary. You only need define blocks this way. For example:

    <class name="Parser">
    <memberVariables>
    <private>
    int id;
    char* socialSecurity;
    char* fullName;
    </private>
    </memberVariables>

    <methods>
    <method name="ParseDocument" params="char* doc, int block">
    int len = strlen(doc);

    <while cond="len != block">
    len -= block;
    </while>
    </method>
    </methods>
    </class>

    It almost looks cleaner, though definately more typing. Why would this be useful? It tends to make the meaning of staements more clear. It forces you to say what block you are ending (instead of a generic }). It can be easier to parse. Standard off-the-shelf XML viewing technologies (XSLT, CSS, etc) can easily render the code in a useful way, and can even understand it without really understanding the language.

    Maybe not seem useful, but could very well be. One unusual use I can think of would be the possibility of defining things like concurrency hints using extra, optional parameters.

  233. already exists by Tablizer · · Score: 1

    Congratulations, he just reinvented ColdFusion.

  234. Re:already exists (ColdFusion) by Anonymous Coward · · Score: 0

    Here is a ColdFusion code sample.

    Note it is not "pure" XML, or at least offers shortcuts that are not pure XML.

  235. Maintenance nightmare by Jeff+Hornby · · Score: 1

    Sounds like a complete mess to me. Can you imagine maintaining a project where every developer was writing in a different language? Can you imagine the completely idiotic constructs that would appear in the code of every junior developer with a God complex (read: all of them)?

    Computer languages, like real languages, exist so that we have a common way to communicate with other people. Allowing people to change the underlying language would be like allowing to introduce new grammar rules and words into English and expecting everybody to communicate essentially in different languages.

    --
    Why doesn't Slashdot ever get slashdotted?
    1. Re:Maintenance nightmare by Onikuma · · Score: 1

      expecting everybody to communicate essentially in different languages

      No problem, It's a well known fact that speaking loud and slow can overcome any language barrier. So...

      JUST

      USE

      ALL

      CAPS

  236. I think Microsoft should do this. by SteeldrivingJon · · Score: 1


    Really. I think Visual Studio .NET needs this.

    VS.NET will need more memory, everything will run slower, projects will have problems when the new XML stuff has a bug.

    A full build of Windows will take a week.

    And, for all that, they'll get the benefit of... Well, if they ever happen to need to convert to a different language, they might be able to.

    (Really, it's a bit like towing a giant boat behind your car all the time, because you just might have a chance to use it. Except you live in southern Libya. In the desert.)

    Meanwhile, Mac developers, unburdened by this stuff, will tear ahead.

    Yes, I think this is the wave of the future. Microsoft should jump on it.

    --
    September 2011: Looking for Cocoa/iOS work in Boston area Cocoa Programmer Quincy, MA
  237. o-xml/MLML and srcML by barnaclebarnes · · Score: 1

    You might want to check out o-xml and srcML among others. The work that Martin is doing on MLML is pretty good. It doesn't mean you have to write XML as the source code format but you can incorporate unit tests, UML and documentation all in the one format.

    --
    [Please type your sig here.]
  238. Some other Issues by barnaclebarnes · · Score: 1

    You might want to check out these archives from the o-xml mailing list. The last could of weeks have had some good discussion on the issues /reasons for XML based langauges/transforms.

    --
    [Please type your sig here.]
  239. Re: by Nastard · · Score: 1

    Your code is sloppy, uncommented, and probably won't run. You should join the slash team.

  240. What is extensibility, and is it good? by belmolis · · Score: 1

    It seems to me that the article conflates several different kinds of extensibility under one heading and that the different kinds have different virtues and vices. One kind of extensibility is the abstraction and information encapsulation that OOP provides. That seems to be a win. Another kind of extensibility is the ability to "go meta" provided by reflection. This is provided by languages like LISP and by strongly object-oriented languages in which everything is a first-class object. It too seems to be a good idea.

    A third kind of extensibility is the ability to modify syntax. As I recall there was somewhat of a vogue for this in the late 1980s though I can't remember the names of the languages or any other details. My memory is that it proved to be a bad idea. It removes the framework that we rely on, especially for people reading other people's code, or for people reading their own code after time has passed. Languages with powerful macro preprocessors allow the ability to modify syntax. Here again, my experience, and I think that of many others, is that this makes life much more difficult. In sum, I'm not sure that extensibility in the general terms discussed in the article is such a good idea.

    1. Re:What is extensibility, and is it good? by scooterm · · Score: 1

      You got this one exactly right. Not only is the "extensibility" issue poorly defined, but it runs contrary to the conclusion of the article! (that multiple languages and syntaxes can be represented in a single, semantically monolithic, language-neutral XML format [which is a dubious claim]). It seems like 'extensibility' is really little more than a marketing 'gimmick' word anyway, since "code comments" are a feature of nearly every language, and really the only way to introduce things that the original language designers *never imagined to begin with* (which is how I would define true 'extensibility').

  241. could somebody tell me whats wrong with LISP? by Paolomania · · Score: 2, Insightful

    Maybe too much schooling has made me a stodgy young academic, but didn't LISP provide us with extensibility and everything else XML cuold possible offer, in a much cleaner and more elegant syntax?

  242. XML is good, but not good enough. by SanityInAnarchy · · Score: 1

    XML has the right approach to a particular problem -- a common way to organize data into a hierarchy. But there needs to be a faster way of doing it -- I'd vote for binary-XML. Or some re-engineering of traditional XML.

    You see, XML by itself is not any more readable than C by itself, so there's no good reason to state the name of the element twice (at beginning and end). Attributes are pointless, basically just another way to do sub-elements. And it was developed too slowly -- I dare you to find a browser that has support for XML includes, for instance.

    I read about some other alternatives -- YAML, some Javascript-based thing (designed to be parsed by almost any compiler with very little preprocessing), and others.

    But frankly, I'd rather design a standard programming language (not C) and use mmap.

    --
    Don't thank God, thank a doctor!
    1. Re:XML is good, but not good enough. by mrjb · · Score: 1

      I'd vote for binary-XML I'd vote for plaintext XML. Back in the old days, source code would be tokenized to save space, and stored in a semi-binary format, rendering it unreadable for, for example, text editors. Storing source code as plain ASCII is actually a step forward.

      Storing source code in XML, from that perspective, is actually a step backwards, but there is an upside to it -- it allows displaying code the way you want. Pascal users can see BEGIN and END, BASIC users can see THEN / END IF, C* programmers can see their curly brackets, and so on. This might actually fade the borders between programming languages. Also, with the code stored in a more structured way, perhaps we will finally see our editors restructure our code for best possible readability (moving around THEN/ELSE branches where needed), while maintaining its meaning.

      --
      Visit http://ringbreak.dnd.utwente.nl/~mrjb/growingbettersoftware to download your free copy of the book
    2. Re:XML is good, but not good enough. by 21mhz · · Score: 1

      there's no good reason to state the name of the element twice (at beginning and end)

      There is. Any possible screwup is caught immediately where it occurs, not 10 closing tags and 50 sibling subtrees later with the diagnostic of "oh, there's some tag mismatch in all this mess".

      Attributes are pointless, basically just another way to do sub-elements.

      Attributes reflect a slightly different metaphor than that of children: they are unique properties with simple text values. They cannot occur repeatedly in an element as children may be allowed to.
      Also, there are many markup applications of XML (XHTML, for instance) where you can strip all XML tags and come up with reasonably readable text. Attributes conceal stuff that is not supposed to be in that stripped text.
      Of course this means nothing to clueless DTD/schema designers who throw everything in an element soup and then complain about XML being hard to work with.

      --
      My exception safety is -fno-exceptions.
    3. Re:XML is good, but not good enough. by jgrahn · · Score: 1
      it allows displaying code the way you want. Pascal users can see BEGIN and END, BASIC users can see THEN / END IF, C* programmers can see their curly brackets, and so on.

      But they won't be able to talk to each other, because all of them use a different language. They cannot quote code snippets in their mail conversations, and they can't write books on the language. This would be a horrible idea, IMHO.

    4. Re:XML is good, but not good enough. by arkanes · · Score: 1

      It's still a pipe dream, at least in my opinion. You can pick off some low hanging fruit like line endings and brace style, but it won't help at all with languages that have different scoping concepts. You can rename keywords, but unless you're able to directly map from one keyword to another, you won't get anywhere. And you won't be able to get back exactly what you wrote - you'll get an approximation generated from the structure. XML-as-programming-syntax wouldn't solve anything.

    5. Re:XML is good, but not good enough. by Anonymous Coward · · Score: 0

      Pascal users can see BEGIN and END, BASIC users can see THEN / END IF, C* programmers can see their curly brackets, and so on. This might actually fade the borders between programming languages.

      Ain't gonna happen. Programming language differences are more than the names of keywords. For example, there's no neat and simple way to translate a C "for" loop into idiomatic Basic or Pascal. And there's no way at all to translate it into idiomatic Haskell - unless your XML can work miracles like translating the code into a different but equivalent algorithm without human intervention...

    6. Re:XML is good, but not good enough. by JimDabell · · Score: 1

      there's no good reason to state the name of the element twice (at beginning and end).

      As somebody else pointed out, it helps a great deal when hunting down the cause of an error. But the real reason is that it makes the parser a lot simpler.

      SGML has optional closing tags. When they were designing XML, they deliberately avoided using them, because it makes the parser more complicated and reliant upon the DTD.

      Given the sequence <foo><bar> , is the bar element inside the foo element? There's no way of knowing without consulting the DTD.

      The DTD might have defined the foo element type as having an optional closing tag, and the ability to contain bar elements, in which case, yes, the bar element is inside the foo element.

      The DTD might have defined the foo element type as having a mandatory closing tag, and the ability to contain bar elements, in which case, yes, the bar element is inside the foo element, and you expect a closing foo tag sometime later in the document.

      The DTD might have defined the foo element type as having an optional closing tag, and not able to contain bar elements, in which case, bar is a sibling of foo, not a child.

      The DTD might have defined the foo element type as having a mandatory closing tag, and not able to contain bar elements, in which case, not only does foo not contain bar, but it's an error condition.

      The parser has to obtain the DTD and keep track of all of this just to parse the document. As experience has shown with SGML, it's difficult to get these things right. Furthermore, there's a new need for parsers on low-powered devices where CPU, memory and network connectivity are at a premium.

      A simpler parser was necessary for reasons like this. Mandatory closing tags aren't a burden, they are an asset.

    7. Re:XML is good, but not good enough. by leshert · · Score: 1

      You would be correct, if "XML by itself" were anything like what the article stated:

      "pure" XML is unpleasant to read and write. The more explicit the nesting becomes in XML, the harder it is for people to make sense of it.

      But why should they have to? Why, in the early 21st century, do programmers still insist that their tools have to draw exactly one glyph on the screen for each byte in their source files?

      [...]

      We believe that next-generation programming systems will most likely store source code as XML, rather than as flat text. Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors.

  243. If it doesn't clickety-clack, it's not a keyboard. by tepples · · Score: 1

    Insert picture of programmer popping the key tops off a keyboard and clipping them back on in different places.

    Insert picture of Model M.

  244. Delphi has a Pascal-syntax answer to XML by Latent+Heat · · Score: 1
    Delphi has separated out the object class and procedural methods part (the .pas file) from the object hierarchy and configuration through property settings part (the .dfm file). The .pas files are operated on largely through the text editor and in a more limited way through the visual interface while the .dfm files are operated on almost entirely through the Form Designer and Object Inspector and their direct textual manipulation is discouraged through obscurity of the documentation on this.

    The .dfm file is binary, but it has a textual representation which is in Pascal syntax -- I guess they have a Pascal parser (while not Lisp, I hear that Pascal is pretty easy to parse) that they use to that purpose.

    If I were in charge, I would be a little less coy about the .dfm file and its textual representation. I may also consider a standardized Pascal syntax for describing graphs and data -- there is this thing called VHDL that has an IEEE standard and is used for hardware design, but it seems perfectly suited for a Pascal-syntax answer to XML. And for you C-syntax proponents, there is this thing called Verilog.

  245. Err... LISP, Lush? by Anonymous Coward · · Score: 0

    The programmable programming language par excellence is Lisp. My main programming language is Lush, a Lisp dialect. I use it for everything: numerical stuff, games, scripts,....

  246. Can be done, but is it readable? by xixax · · Score: 1

    Yes, I found that just because it is possible to automate conversion, it doesn't mean you/'ll get editable or maintainable results. I'd also about how many inefficiencies would be introduced when attempting to emulate features that are not native to a language (like the Perl work-around for case statements).

    I used the a2p tool to convert some awk stuff to Perl so that we could run it on Windows. Whilst it worked, the resulting Perl was not particularly easy to read, even for Perl.

    Xix.

    --
    "Everything is adjustable, provided you have the right tools"
  247. a real life example by roman_mir · · Score: 1

    I actually created a tool about 4 years ago for a project named WorldInsure that would translate XML into java and then compile it into bytecode for these reasons:

    the new XML language was a small subset of a Turin complete language (Java in this case) that would impose schema validation rules onto the produced XML structure. The problem at hand was the following: a bunch of people sitting there, creating mapping algorythms that map a set of insurance rules from any one company into a generic set.

    Apparently, after looking at it for some time, I realised that the problem was a programming problem limited to only a few simple functions with a small possibility of extensions. So about 95% of work of mapping data sets was done by 2 or 3 guys who only knew the mapping rules but not programming who still were able to produce most of the necessary mappings with this tool (that validated their manual work, no less,) and the rest 5% were added on top as custom java.

    This worked well, but it was not a Turin complete language, just a domain specific language type.

    1. Re:a real life example by Anonymous Coward · · Score: 0

      You mean Turing complete, then. Who is this Turin fellow you mention twice?

    2. Re:a real life example by roman_mir · · Score: 1

      I don't like to put 'g' at the end of his surname, sounds as if he is 'doing' something rather than a name.

    3. Re:a real life example by Anonymous Coward · · Score: 0

      Túrin Turambar!

    4. Re:a real life example by EugeneK · · Score: 1

      A Turin complete language is one where if you squint at it, you can make out the face of Jesus in it.

  248. YAML is the human-readable answer to XML by Earlybird · · Score: 1
    • If I were in charge, I would be a little less coy about the .dfm file and its textual representation. I may also consider a standardized Pascal syntax for describing graphs and data -- there is this thing called VHDL that has an IEEE standard and is used for hardware design, but it seems perfectly suited for a Pascal-syntax answer to XML. And for you C-syntax proponents, there is this thing called Verilog.

    And there is YAML. It's already quite popular.

  249. Take away that man's crack pipe... by Anonymous Coward · · Score: 0

    even XML cannot save him.

  250. Think "War between suits and geeks". by crazyphilman · · Score: 1

    This is really about the ages-old war between the suits and the geeks. This war is actually a class war between the rich and the middle class, but in the current discussion the relevant part of the war is the tension between geeks and suits, which I'll touch upon.

    Let me start with the geeks, to put things in perspective.

    Geeks are generally middle class children of blue-collar and low-to-mid-level white collar workers. They've had to work for everything, and they studied in college, so they're pretty sharp. They're also hungry -- MUCH more hungry than the pampered ivy-league kids of the suits.

    Middle class kids study practical things like computer science, engineering, electronics, the sciences, technical trades... They earn a good salary because they can do the work the suits cannot, something the suits absolutely hate them for. And they're capable of working with traditional software engineering tools without handholding because THEY STUDIED.

    On the other side, you've got the suits.

    The suits think it's a terrible shame that there's an entire class of people they have to pay a living wage to. Although they can't see the irony in this, they actually consider middle class people "greedy". Their main goal is to STOP paying a "living wage" and get out of obeying worker protection laws.

    In the past, they've had successes against the middle class. They killed off the domestic steel industry, putting thousands of people out on the street, and then they repeated the exercise using the same techniques to kill most of the automotive manufacturing industry and every other manufacturing industry they could.

    Up until the turn of the century, however, they couldn't kill off the white collar and tech workers because they needed them to maintain their systems. There were no huge trans-Pacific cables and satellite systems back then, so outsourcing to other countries wasn't practical. And there was no practical way of bringing foreign staff here.

    So, first, under the guise of Y2K preparedness, they brought over thousands of H1-B workers, flooding the market with cheap programmers. Then, they built up the network capacity between the U.S, Asia (particularly India), and Eastern Europe. Satellite communications were improved. Gradually, there were no more barriers to their plans to move all the REST of the middle class's work overseas.

    Of course this is happening right now. But think about the next step.

    See, moving all the work overseas to destroy the American middle classes (or at least cut them down to a size rich people are more comfortable with) CREATES a middle class over THERE. Well, sooner or later, they're going to want a decent salary too!

    So, the next obvious step is to make programming easier, and easier, until it's almost so easy you can train monkeys (or A.I.) to do it. Or a secretary. Or whichever third-world people are still willing to work for slave wages. As each third-world country improves to the point of independence, the rich will move to another one because that is the way of things. To facilitate this, programming must be simplified.

    The first step in this path was Visual Basic. Each version of Visual Basic has gotten easier, at least until .Net (which became so Java-like it was suitable for Real Programmers again). Brief dalliances with 4GLs didn't work out. The suits want to know, "what is the next step? What is the next Great Thing we can stab in the backs of the programmers who bedevil us?" And they've got a lot of money to spend, so they've got plenty of programmers working like busy little bees to produce the tools they crave.

    And, all of this XML silliness is designed with that exact goal in mind: to dumb down computer science to the point where IT becomes cheap for the suits.

    It's all about money, same as it ever was.

    Why all my fellow programmers don't just go ballistic and lynch the programmers who are writing this stuff is beyond me.

    --
    Farewell! It's been a fine buncha years!
  251. Right on! by Anonymous Coward · · Score: 0

    the whole point of programming language structure is to cleverly *restrict* what is possible so that you can say: "well, even though this is 30,000 lines of code...i know that nobody can possibly modify this variable...and it's guaranteed that A happens before B... if C and D are happening at the same time, there are no problems. Some languages have thread monitors, others have the compiler enforce coverage of all cases, others provide encapsulation guarantees, and all provide various levels of type safety.

    If you want a parse tree oriented syntax, then why not use a LISP variant? At least it's compact and consistent. With XML, every opening *and* closing tag just has to consume 12 characters, with namespaces bloating everything beyond reason and comprehensibility. I guess ColdFusion is a pretty good example of what happens when you try to make XML into a programming language. Your whole design ends up being dominated by workarounds, and you have a "language within a language" mess of tags.

    And don't get me started on the use of signed and encrypted XML...not writable or readable in a text editor, and might as well be binary. If you create a standard that will only work on the fastest connections, or with many useless layers of abstraction, then you will automatically cause "standards" to FORK...because the standard won't scale DOWN.

    The most common cause of pointless complexity in apps in recent years seems to come from everybody jumping on the "combine lots of indirection with typelessness" bandwagon. It's real fun trying to debug a large application when components are only related by many layers of loosely coupled string references that can't be tracked or detected easily by the debugger. (misspelled a class name in that huge web.xml anybody? compiler didn't catch that?) There's a reason why there's no lightweight tools that you can simply invoke on the root of a J2EE app to verify it's structure as well as Javac can do with java files.

    Please, Please help make the XML nightmare stop. The more of our customer's time we waste fiddling around with our under-engineered monstrosities, the more our customers will rebel and go find cheaper programmers to do the job.

  252. You Must Be Joking by Anonymous Coward · · Score: 0

    LISP and s-expressions reveal XML as the ugly duckling, wanna-be language it is. They are so much more beautiful, so much more regular, so much more powerful that it's amazing that the XML world has gotten as far as it has without someone pointing out that the emperor is wearing no clothes.

    Sufficiently large quantities of XML are indistinguishable from line noise to me. So what have they achieved? A language neither readable by humans, nor machines.

    What has XML added to the world of computer science that didn't already exist in a simple zen-like scheme interpreter. I'm serious when I say simple. Check out SIOD (Scheme In One Defun).

    At least with the scheme interpreter you get a complete programming language. You can program Zork in Scheme. I know because I have.

    In scheme or any other minimal lisp, config files simply become script input to the interpreter. Python comes close to this ideal and borrows heavily from LISP in many ways. You could almost call Python, LISP without the parens.

    Honestly, some of the editors that they have on Slashdot are hopelessly ignorant. Don't even talk about language extensibility until you've at least played with FORTH or LISP. In FORTH you have access to the core of the interpreter and compiler in real-time.

    Of course for bad programmers that's certainly a double-edged sword. Bad programmers can barely handle the full range of flexibility offered by C without slicing themselves to pieces.

    Wake up Slashdot. The cluephone is ringing. ;-)

  253. Why XML? It's just a fancy AST by noda132 · · Score: 1

    From what I can understand in the article, XML is just used to represent an abstract syntax tree with metadata (e.g., "<doc>" tags). The author even admits that we could have done the same thing with LISP expressions....

    If the author's suggested systems were to come about (and they certainly sound nice), why on Earth would they use XML?

    The compiler, debugger, and editor (plus profiler and other helper apps) would all have to be written for the new data storage format. Without one, the entire system will not work. It stands to reason that this work will be done by one group or company. So they can define whatever data format they want. Why XML? "XSLT transforms" is a lousy answer: transforms would be trivial to implement in a scriptable manner no matter what storage format is used to represent the AST.

    And while providing debugging methods in a library is a fantastic idea, it really has nothing to do with XML at all. It would just be a hack on the ELF (or whatever) binary format which the compiler would be able to deal with.

    The fact is, nothing in this article really gives a reason to use XML. Maybe it would be a nice interface between the editor and the compiler front-end, but beyond that there's really no reason at all....

    Actually, I'll back up another step: if you've got an editor which stores class diagrams in its comments, that's one mother of an editor. It stands to reason it's an IDE which invokes the compiler for you automatically. Writing an object or two in the editor's code that translate its internal representation into C (or whatever) would be trivial compared to the rest of the IDE. So why bother even changing the compiler?

    This article basically boils down to, "All IDEs suck. There ought to be a good one." Even using the GNU tools as they are today, a killer IDE could be written to implement all the features suggested. And XML wouldn't be needed at all.

  254. Re:It's all about automation-and freeing us from w by jericho4.0 · · Score: 1
    Bullshit. Someone might deliver better tools for point-and-clickers to 'design' something resembling software, but programmers will still be writing the software people get exited about.

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  255. This already exists, and it's called XPRESS by KluZz · · Score: 2, Interesting

    The language can be found in the bowels of Sun Identity Manager, formerly known as Waveset Lighthouse, and it's just as wacky as you would expect from an XML-based language. It's used for implementing workflows for the user provisioning and what have you not.

    I thought this was a stupid idea, until XPRESS confirmed my beliefs.

  256. Rebol - code as data .... :-) by no_sw_patents123 · · Score: 1

    For a very interesting, concise and powerful language, Rebol is hard to beat.
    The whole package (including a GUI) in less than 500Kb.
    Rebol, although free, isn't open-source, but there are two projects that attempt to imitate it. They are -
    R-sharp ( http://sf.net/projects/r-sharp )
    and Freebell
    ( http://sf.net/projects/freebell )
    Although both projects seem to be dead, they both have code (Freebell's is in CVS, R-sharp can be downloaded straight off ).
    I've used R-sharp and it's not bad at all ..... :-)

  257. XML: Xtra Mangled Language by SLOGEN · · Score: 1

    Have you tried writing or reading any code in any XML variant, for-example XSL?

    It's all fine and dandy if you simply wanna move some subtrees around and select a few trees, but implement, lets say, a procedure to decide primality, and it will shortly dawn on you that the "domain-specific" languages for programming (C,C#,ML,python,ruby,...) are a lot nicer to work with than XML, which is basically just a way to write down trees of data, and a wierd one at that :)

    While XML may be nice to parse, and certainly nicer that having a gazillion differently formatted data-transports, it certainly is very verbose, and a lot harder to read for humans that ad-hoc formatted text (yes, i write all my posts in "Plain Old Text", wonder why :)

    Please, stop using XML for things where better, more readable solutions exist. If you MUST: write a program to transform your data (program) into XML, for later processing as XML

    --
    SLOGEN [ http://ungdomshus.nu : Sebastian cover music]
  258. Language design should not be driven by the tools by pammon · · Score: 1

    but all too often it is. Look at C#: its notion of "partial classes" exists for no reason other than to support Microsoft's code generating form painter.

    Dependence on tools signals a weakness in the language. The solution is not to increase the accessibility of the language to the tools; this is addressing the symptoms rather than the cause. The proper solution is to identify weakness in the language that the tools are trying to fix and then invent language constructs to address those problems.

    Oh, and make the constructs as general as possible to avoid undue pollution of the language. Compare the author's example, Java's ultra-specific @Remote, to Objective-C's notion of forwarding, which allows for transparent remoting without any code generation (and has plenty of other uses too!)

  259. GTL Was:Extensible? by const · · Score: 1

    There is no need to use XML to be extensible. I'm working on research project that allows to do for languages that use normal syntax. For early released prototype see http://sourceforge.net/project/showfiles.php?group _id=11569&package_id=109063.

    Dowload both files and run scripts in xj.ast\docs for demos of parser. Also there is some documentation that explains an idea.

    1. Re:GTL Was:Extensible? by chthon · · Score: 1

      Clipper 5.0 was already extensible back in 1991.

      Using a meta-language you could define new syntactic constructs.

      Lisp is extensible, read On Lisp, Advanced Techniques for Common Lisp.

      Heck, if you do your homework you can probably even extend Perl with new constructs, making use of the BEGIN, CHECK and INIT block constructs.

    2. Re:GTL Was:Extensible? by alw53 · · Score: 1

      The mother of all languages to embrace syntax extensibility was Algol 68, which was available around, uh, 1968 or so. I think you could define new operators, change precedences, etc. It was a great way to turn reasonable programs into syntactic minefields.

      People understand things by a chunking process. A program written in C is not understood by a programmer at the character level. Changing the basic syntax of the language is fine if you are writing the program because you can mentally re-chunk it into terms that you understand. But the reader is in a different boat, especially if he or she wants to read a random section out of the middle.

  260. Re:Silly article (Silly Post (Silly Reply)) by dvdeug · · Score: 1

    You're arguing that programming languages are hard to parse, because, if you don't use any of the tools developed over the last 35 years to parse programming languages, it's hard?

    If those tools were so magical, why did the GCC team have to throw them out and write the code by hand to get a correct working C++ parser? Of the languages in common use, LISP is about the only one that can actually be parsed by BISON (= has an LALR(1) grammar).

  261. It will be hell to write a quine! by Ben+Jackson · · Score: 1

    I'd hate to try to write a quine in an XML programming language!

  262. Re:Umm... how about you RTFA? by fR0993R-on-Atari-520 · · Score: 2

    Wait, seriously. On page four, the author says:

    Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors.

    All these whines about obfuscation and "I don't want to write code in XML!!!!" are clouding the debate - "Will this make development of large software projects easier and more reliable?"

    I saw another poster completely discounting OOP languages (specifically C++) because it caused a 100FPS slowdown (from ~600 to ~500) in his 9 cube shaded renderer, as if that were a typical large software development project (clue to the clueless: it's not). This person was marked up as Insightful!

    Give me a break, people.

    --
    There are 11 types of people in the world: those who understand unary, and those who don't.
  263. All programming languages are "extensible" by grikdog · · Score: 1

    The process is called "programming." Duh. What you suggest is like mountain-climbing by adding rope. Miles and miles of rope. In a big pile. Up you go. Whee.

    --
    ``Tension, apprehension & dissension have begun!'' - Duffy Wyg&, in Alfred Bester's _The Demolished Man_
  264. Very persuasive arguments. by marciot · · Score: 1
    Dvdeug, you made some very good arguments in favor of XML when replying to my thread. I may have to rethink some of my views about it.

    I liked it when you mention that KWord uses XML inside a gz file. I hadn't known that and it may invalidate my claim that XML files are less efficient in storage than binary files. All the redundancy in XML should compress very well, and you may even be able to approach a maximum with arithmetic coding.

    The only counter-argument I could make is that you are using CPU cycles to find the redundancy, rather than writing out a space-efficient file in one swoop. But that's not a good argument since CPU cycles are very cheap now a days! I guess the trade-off is between CPU cycles and the man hours required to implement and debug a space efficient format from scratch. Of course, the former is always best. Computers are meant to do grunt work.

    So I see it now. If you just look at XML itself, it's not very efficient or particularly useful. But the idea is that the result of XML + gz *is* a very efficient binary file. I've never thought of it that way.

    -- Marcio

  265. why is it that some think by Baki · · Score: 1

    that an XML parser is the only parser left? and that only XML can be structured?

    what nonsense. the if statement is just as structured as the XML 'version', and parsers do exist and have existed for 40 years for representations other than XML you know. and still can be written very easily using one of the many 'compiler compilers' such as antlr, yacc and the like.

    most IDE's, obviously have a very efficient parsers built in that enable them to reformat the code, interpret inline documentation (such as javadoc) etc. XML would not offer any new possibilities, it would not make it easier or faster.

  266. Re:Silly article (Silly Post (Silly Reply)) by photon317 · · Score: 1


    But the grammars of these languages are virtually required by the complexity of expression they offer the user. The only way you're going to achieve a simple XML-based programming language that can be parsed by "just" a simple recursing XML parser (and I might remind you that XML parsing in itself isn't all that trivial, which is why we have support libraries just for that), is by designing a really horribly inexpressive language. If you bring back in the expressivity that coders want, you'll be adding superstructure to the XML which is beyond simple XML structure and beyond LALR as well.

    Bottom line - switching an existing code language or something like it to an XML-based format is a matter of pointless, ugly, bloating search and replace. It doesn't accomplish anything in the machine sense or in the human sense, just wastes cycles.

    --
    11*43+456^2
  267. Been there... by Mister+Incognito · · Score: 1

    Been there, done that. It's called smalltalk.

  268. Extensibility of binary formats. by marciot · · Score: 1
    Do you even know what XML stands for? Hint; take a look at the X. Good luck "X-ing" your JPEG format.

    Yes, I know "X" stands for extensible and that many binary formats are not actually extensible. However, binary files can be extensible as well. TIFF for instance does a very good job of allowing extra blocks of data to be inserted into the stream without throwing off older decoders.

    Anyhow, dvdeug made some very good points and I have conceded that XML can be an storage efficient format. That was the major drive of my original post, so I am no longer arguing against XML. See my reply here:

    http://slashdot.org/comments.pl?sid=136513&cid=114 05771

    So, I actually learned something from Slashdot today.

    -- Marcio

  269. Yes! by BalkanBoy · · Score: 1

    Those extensible languages are called Lisp (and its family) :).

    --
    'A lie if repeated often enough, becomes the truth.' - Goebbels
  270. Apple's Resource Fork Format by marciot · · Score: 1
    Apple's resource fork, with it's associated Resource Manager API, way back in 1984, is also another example of a very extensible binary file format.

    I guess I would have liked to see something along those lines rather than XML. Perhaps an extensible binary format with a really good open source API for it.

  271. Error in article by Anonymous Coward · · Score: 0

    "Wacky, but perhaps wacky enough to be possible?"

    Should read:

    "Retarded, and probably retarded enough to be unnecessary."

  272. So are Lisp and Tcl by DavidNWelton · · Score: 1

    Lisp (+ scheme) and Tcl are also extremely flexible languages, where you can write new control structures in the language itself, or modify the meaning of existing functions/commands. Tcl isn't as flexible as Lisp (macros), but it's pretty good for a language that has made it to the mainstream. And it has a beautiful, fun, and well written C API that lets you do neat things at that level. It's got a scheduler, a filesystem, all kinds of neat stuff... it's nearly an OS;-)

    1. Re:So are Lisp and Tcl by EmbeddedJanitor · · Score: 1
      I don't know about scheme, but I've done a lot of Lisp. Lisp is very flexible, but it is not extensible per se, AFAIK. That is, you can add some new structures etc, but it remains Lisp.

      Forth is different in that you can define both compile time and run-time "words" ("words" == functions, more or less). These allow you to actually change the compiler on the fly, including syntax etc. A frequent usage of this is to do things like define an assembler and use it as a way of cross compiling Forth.

      --
      Engineering is the art of compromise.
    2. Re:So are Lisp and Tcl by johnnyb · · Score: 1

      Lisp Macros. Also, Lisp has eval-when, which is pretty cool. Perhaps not quite what Forth has, but still pretty killer.

  273. Extensible?-Academic Boogyman. by Anonymous Coward · · Score: 0

    So in other words the (programming) masses are scared of math, and logic?

    "XML is dumbed down enough to appeal to the masses."

    I should point out that the masses in question that'll end up using XML are programmers. Not Joe and Jane Friday in front of the Tivo.

  274. Indeed. by warrax_666 · · Score: 2, Insightful

    Whenever I see people trying to pull something like this I tend to remind them of one thing (everbody seems to forget this whenever XML is brought up, I dunno why...):

    Semantics matter!

    It's great that you can read the syntax of a language (which is basically what this idea boils down to -- people just have to implement an XML parser instead of a $LANG-parser) without effert, but if you don't understand the semantics of what you're reading it's rather pointless, unless all you want to do trivial tree-based transforms. This applies to XML in general and it applies here. As you pointed out, the semantics of languages are different, and so your tools have to understand all the different languages anyway (or, as you say, reduce them all to some common denominator).
    --
    HAND.
  275. Not this chestnut again by fishbot · · Score: 1

    I really can't understand this. How anyone with ANY kind of serious insight into the workings of computer science would come up with this is beyond me. It just proves the naivety and narrow mindedness of the author.

    Extensible programming languages, then. Apparently it's no longer enough to be able to extend basic types, override functionality and reuse code. Now you have to be able to create completely new language functionality! Um, why?

    By adding to the DTD/XMLSchema you are not 'extending the language'. Perl modules extend the language. C libraries extend the language. The do it by building new features from the building blocks provided.

    Rather, you'd make the language proprietary. Forget the problems of the difference between g++/VC++/TurboC++ etc. Now you're into the realms of a different language per project. It's not enough just to read the (standardised) code and the way it works. Oh no, now you just have to learn all the language extensions as well. Welcome to the world where gnome-x++ is similar, but unlike, kde-x++ thanks to some muppet messing with the language constructs. Welcome to the world where you have to incorporate each projects language extensions to be able to build it.

    I won't go into further reasons why using XML programming languages is a bad idea. I'll just leave you with this Dan Quayle quote:

    "Verbosity leads to unclear, inarticulate things"

    That about sums it up, I think.

  276. Good post, sir. by Anonymous Coward · · Score: 0

    Good post.

  277. Best. Post. Evar. [nt] by Anonymous Coward · · Score: 0

    nt means no text.

  278. It's Web Services, stupid! by VDM · · Score: 1

    Not meant to offend, just a joke (however, /. people could better check articles...).
    This kind of calls can be done, since some years, with Web Services protocols (i.e., XML-RPC, SOAP, etc).
    Look at W3C .

    1. Re:It's Web Services, stupid! by ckotso · · Score: 0

      AMEN, BROTHER! I have been ctrl-F'ing through 8 pages of nested /. comments, to see if there would be one reader to point this out. This guy is talking about web services, only taking out the distributed part ;-)

      --
      -- fsck your brains
  279. it isn't so strange by kentaromiura · · Score: 1

    the D compiler support html embedded in code
    http://www.digitalmars.com/d/html.html
    so this it isn't so strange to heard..
    HTML is a sort of XML..
    but this can help in write a editor with syntax highlighting..
    and maybe to put down documentation in html ..
    like JavaDoc ..

    sorry for the english ;)

    --
    GCS/T/O -d+ -p c++++(++) l+++ u++ e+ m+@ s+/+ n+(--) h* f++(+++) !g w(+) t r+(++) y?
  280. Lisp Machine Keyboards by Anonymous Coward · · Score: 0

    Lisp Machine keyboards have dedicated parenthesis keys, and you don't need to hold down shift to type s-expressions, so you can hold a Hefty bag full of nitrous oxide with your other hand while you program in Lisp.

  281. We need extensibility, but we also need proofing. by master_p · · Score: 1

    Indeed, programming languages could benefit from being extensible. Many concepts would be easier to program if domain-specific languages would be used. Check out this discussion for extending the open source Gold Parser program to support user-defined ASTs, intermediate languages and instruction sets.

    Of course this poses the great danger of everyone using his/her own language to express the problem at hand, therefore making it very difficult to transmit ideas from one person to another in written or spoken way.

    But the problem is not about the language we use to express our ideas. With little training, the average person can very well learn the syntactic details of a programming language like Java. The problem is our programs are filled with bugs, and they never work 100% correct, no matter what we do. And the problem lies into the fact that our tools are stupid. They can't find the bugs for us. Check out this stupid little C program:

    char *str = "the quick brown fox";

    void do_stuff() {
    free(str);
    }

    int main() {
    do_stuff();
    printf(str);
    }

    It's obvious from the first look that this program will most probably crash.

    The big question is:

    Why we, humans, can find bugs, while the computer can not?

    The (obvious to me) answer is:

    We humans can find bugs that the compiler can not, because we know many more things than the compiler about the program that we can use as logical proof.

    In the above example, I know that I should not call

    do_stuff()
    before
    printf(str)
    ! but the compiler does not know it, so it happily accepts the program as valid.

    In conclusion, programming languages should be extended with program state information. The program itself must make sure that certain pieces of code can be executed only under specific states; programming languages should provide the syntax for that. Then the compilers could extract logical information about the programs and refuse to accept the program if there is a logical error. Libraries should be accompanied with the state information. I call this type of programming state-based programming. Here is the example program annotated with state information:

    state begin {
    char *str = "the quick brown fox";
    }

    state middle {
    after begin;
    before end;

    void print_str() {
    printf(str);
    }
    }

    state end {
    void do_stuff() {
    free(str);
    }
    }

    int main() {
    //ERROR! can't execute 'do_stuff()' before 'print_str'!
    do_stuff();
    print_str();
    }
  282. Re:Umm... how about you RTFA? by archeopterix · · Score: 0
    Programmers will not see or edit XML tags; instead, their editors will render these models to create human-friendly views, just like Web browsers and other WYSIWYG editors.

    All these whines about obfuscation and "I don't want to write code in XML!!!!" are clouding the debate - "Will this make development of large software projects easier and more reliable?"

    How about "We don't want no stinking WYSIWYG editor!!!"?

    Seriously:

    It adds another layer of things that can fuck up. Even compilers do have some bugs. Why add another layer of things that can go wrong? Add "Check the WYSIWYG editor output" to your bug-hunting checklists.

    It is incompatible with existing systems of merging/tracking changes. Try to do a diff/merge on XML files. Yuck. Ok, so we'll develop another WYSIWYG tool to present the differences/conflicts in a colourful graphical way.

    The whole concept just takes the "Keep It Simple, Stupid" rule and sodomizes it. Ok, rules are not absolute, but what's the gain here? Ah, ok, we can sell the WYSIWYG editor to the masses. To quote the parent post: Give me a break, people.

  283. Isn't MS Visual Studio .NET run by XML by avgbody · · Score: 1

    I thought I remember reading that the VS .Net is now run by XML and is the reason why it doesn't really matter what programming language you use since it will get compiled to the same ADO.NET code. So is it really news that XML will be the future?

  284. Shocking that no one on slashdot has heard of XAML by Captain+McCrank · · Score: 1
    Microsoft does interesting work occasionally. I've been curious about XAML for about a year now.

    http://winfx.msdn.microsoft.com/?//winfx.msdn.micr osoft.com/winfx/core/overviews/about%20xaml.aspx/

  285. or maybe yes after all by samjam · · Score: 1

    Large database systems can and have been written in forth.

    http://groups-beta.google.com/groups?hl=en&lr=&q =a uthor%3Aerather%40forth.com+database&qt_s=Search+G roups

    Forth, being an extensible language by design is also one of the few truly verifiable languages from a point of view of trust.

    Consider "Reflections on Trusting Ttust".
    Because the forth core can bemade very tiney (even as little as 3 forth words - ok this makes an inefficent forth) the rest of the forth can be in ascii source form and compiled on-the-fly at bootup.

    This makes it easy-ish to verify that the tiny binary core is safe and un-tampered with and the main ascii source easy to examine and diff for changes.

    Try certifying that your C/C++ code based on generations of binary output from C compilers is safe.

    Sam

  286. Sometimes computer science by zavalos · · Score: 1

    is like fashion. New exciting method/tool, and suddently we can fix all the problems we did not have with it. When you have only a hammer, everything looks like a nail.

  287. better yet . . . by Anonymous Coward · · Score: 0
    If they're going to rework the parser anyway, why not design the new Lisp source to be XML itself? It would be a tree with no branches . . .

    <?xml version="1.0" encoding="iso-8859-1"?>
    <lispcode>
    (s(r()(r)()s)s))s)r()
    ()r()(s())
    </lispcode>
    It could be any other programming language, for that matter, if the only point is to take advantage of the XML buzzword. It would take the simplest possible XSLT stylesheet to extract just the lisp part. Hell, you could throw together a shell script to transform and run these XML programs, then tell your boss you're 100% XML compliant.
  288. Re:Silly article (Silly Post (Silly Reply)) by lomov · · Score: 1
    I wouldn't jump to conclusions so fast. Why don't we consider a small example. In C++,
    extern X x();
    can be either a declaraction of a variable x of type X or a declaration of a funtion with no parameters and return type X. You do not know unless you know what X is (whether it has a parameterless constructor). And learning what X is requires quite some analysis - major PITA for any tool that tries to analyse C++ (compiler, IDE, dependecy analyzer - whatever).
    In imaginary XML syntax for C++ such ambiguites will go for good.
  289. I think you cannot ignore it by nibelung · · Score: 1

    If you are a java developer you will need to learn about generic programming and the java implementation of it. Unless you stick to java 1.4 forever. Maybe it's not everywhere just yet, but wait a bit and you'll see that generics are used everywhere, and you can try to avoid it but at some point you must learn at least how to work with generic classes. Even if you don't write them yourself.
    It's the same with C++ templates... I thought they were implemented in such a horrible ugly way that i refused to use them, but all kinds of libraries started to use templates. Ugly ugly ugly, but no way to ignore them. This was one of the reasons for me to switch to java! And now generic programming has come to 'enhance' java programming too....

  290. Really? by Lifewish · · Score: 1

    With C++, you just pass a VideoCube to renderer.spin(Cube&cube) and it will call approporiate virtual functions to get bitmaps of each of the sides.

    Personally, I just flip the relevant switches on the front of my machine a few times. I guess it takes all sorts...

    --
    For the love of God, please learn to spell "ridiculous"!!!
  291. The things people will write for some traffic by tod_miller · · Score: 1

    I really hate that about the internet:

    XML: data storage format for file formats that contain data
    Program code: logic and conditions

    Yes SVG can have logic, and yes XSLT is a logic language (with XPATH and stuff) written in XML.

    But the problem is, XML is designed to be human READABLE (and independant in many ways because of its text structure) NOT intended (or designed!!) to be HUMAN WRITABLE.

    Just because you can write SVG in xml, doesn't mean you should. Just because you could replace syntax optimised over 20 years for the depiction of logic, structure and behaviour, with the same essential thing but in XML, doesn't mean you SHOULD!!

    You could make a middle ground XML structure that could XSS into .cpp or .java, but why would you want to?

    Java 1.4 has a lovely XML codec framework, places any class in memory into an xml state. Lovely thing for massing around with presentation frameworks.

    XML, Blogging and a host of other buzzwords are so mistreated and misunderstood, there should be a society setup to protect them from maliscious developers who want to write stuff on thier blogs, because they are cool.

    [ot]
    Second of all, WTF is up with get fuzzy cartoon, why is that wuss dan carabarnaby... (get a real name, one that is easy to spell!) hidding his email address from his contact page?

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
  292. Absolutely. It's a "Buzzword Driven Architecture" by Moraelin · · Score: 1

    Honestly, 99% of the time XML is used as a buzzword, nothing more. And in a lot of cases, like this one, it just means "we had no actually useful ideas, so we're gonna give you some fashionable snake oil instead. And we hope that your PHB is stupid enough to buy it based on buzzwords alone."

    Since we're talking programming languages, what's the big huge gigantic benefit of having the indentation and code handled through XSLT?

    Any modern IDE does lexical and syntactic parsing on the fly. It doesn't need XML and XSLT for that.

    E.g., I have Eclipse open right now. I can edit the indentation rules however I want to have them, and reformat. It didn't need some idiotic XML syntax for that. It doesn't need some stupid XML tags telling it "instruction starts here" and "instruction ends here": the language syntax already tells it that.

    I can hear the over-used argument "but XML is a standard!" Well, C is an ISO standard too. "But XML has standard parsers!" YACC and LEX are even more standard nowadays.

    Same for "extending" it. I don't need some idiotic XML file telling it the parameters to my methods, any modern IDE takes them directly from the headers (for C) or .class files (for Java).

    I can just type "MyClass mc = new MyClass(); mc." and then hit CTRL+SPACE in Eclipse, and it will show me all the methods and public members I can use from an instance of that class. And the parameters and docs for those methods. Again, it didn't need some XML file for that: the standard language parser was enough.

    And it seems to me like it's missing the whole point even of XML. The whole idea of XML (and SGML before it) was to have a humanly readable text format for data that was otherwise saved in proprietary binary files noone could read.

    Well, program code was always text and humanly readable. So I'm at a loss as to what would XML bring.

    To use the example in the text on /., take the two following representations:

    1. record

    2. myMethod(record)

    Seems to me like number 2, the traditional way is actually more humanly readable.

    --
    A polar bear is a cartesian bear after a coordinate transform.
  293. gah, bloody Slashdot parsing by Moraelin · · Score: 1

    I meant between these two:

    1. <invoke-expr method="myMethod"><evaluate>record</evaluate></inv oke-expr>

    and the plain old

    2. myMethod(record)

    --
    A polar bear is a cartesian bear after a coordinate transform.
    1. Re:gah, bloody Slashdot parsing by Taladar · · Score: 1

      Your mistake shows another big problem with XML: You can't embed it into HTML Pages without lots of escaping.

  294. Not easily machine parseable by pjc50 · · Score: 1

    C++ is horrendously hard to machine parse. GCC has just got a new parser to deal with the many problems the old one had. And C++ with errors in is even harder to parse.

    A reasonable design goal for new languages should be to make it as easy as possible for the user to find errors and as hard as possible for those errors to appear in the first place.

  295. Re:Umm... how about you RTFA? by Anonymous Coward · · Score: 0

    The situation with C++ is not so bad; however, Java is designed to be so provincial, monolithic, and xenophobic that calling out to C code where performance matters usually makes the performance worse instead of better. Once anything is written in Java, it tends to suck in the rest of the program like a black hole.

  296. I can envisage.. by duncangough · · Score: 1

    duties that XML extensible stuff would come in handy - AIML processing for example, but on the other hand I'm nervous of the way XML is coming to dominate a lot of people's thinking especially when it seems to involve doing the same things differently.

    Lightning Pool : Free online game

  297. Debugging??? by Anonymous Coward · · Score: 0

    Hi... Using XML in the IDE to display the code in a friendly way to each individual programmer is a great idea, but what happens when two seperate programmers try and debug the same code???

    1. Programmer selects to compile the code
    2. The IDE saves the file in a format that the compiler can read (presumably plain/flat text).
    3. file is compiled and ready to run
    4. program is run and it crashes with: "NullPointer Exception occured at line 120."

    Now...
    - James views his code with the '{' on the same line as the 'if' and Timmy views his code with the '{' on a sperate line.
    - Both programmers are able to see the SAME code, however without knowing how the plain/flat test version of the file was compiled, how the hell are they expected to find the TRUE error line?
    - Remember, when the file is saved the XML information will be removed so it can be compiled.

    So, it looks like we will end up with a future of "meaningless" error messages again!?!?

  298. Re:It's all about automation-and freeing us from w by alw53 · · Score: 1

    Code generators will make most expensive programmers obsolete...

    Funny, they said that about Fortran too!

  299. Second look after reading into his article by tod_miller · · Score: 1

    He suggests a definition of a programming language (not a programming language?) in xml.

    That is even dumber. Code would compile differently depending on how you specify the language.

    That is so dumb, the whole point of a language is STANDARDS, XML is a standard, but that doesn't mean every XML document is a standard.

    Making my own Java like compiler spec to give me my fav shortcut is akin to saying:

    "yes, my program compiles, if you have my .emacs"

    public static void ignoreArticle(){
    return sanity;
    }

    --
    #hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
  300. Re:Yay for . by maxwell+demon · · Score: 1
    (Since adding stuff to the end obviously does not help, I'll add nor to the beginning ... read below if you want to know what I mean ...
    YES, LAMENESS FILTER, XML IS LAME, BUT HEY, THAT'S NO REASON NOT TO LET ME POST IT!
    Ok, maybe that helps ... ... no, not at all, therefore I'll replace some of the spaces below with underscores, please mentally replace those underscores with spaces again.)

    <response language="English">
    _ <sentence type="statement" tone="ironic">
    __ <subject>
    _ <pronome class="personal" person="1" number="singular">
    ____<character encoding="ascii">I</character>
    _ __ </pronome>
    _ </subject>
    _ <verb time="present">
    __ <character encoding="ascii">t</character>
    _ <character encoding="ascii">h</character>
    ___ <character encoding="ascii">i</character>
    __<character encoding="ascii">n</character>
    _ <character encoding="ascii">k</character>
    </verb>
    __ <relativeclause>
    ___ <subject>
    <pronome class="personal" person="2" number="singular">
    ______ <character encoding="ascii">y</character>
    __ ___ <character encoding="ascii">o</character>
    ____ <character encoding="ascii">u</character>
    _____ </pronome>
    _ </subject>
    ___ <verb type="auxiliary" time="present">
    ___ <character encoding="ascii">a</character>
    <character encoding="ascii">r</character>
    ____ <character encoding="ascii">e</character>
    _ _ </verb>
    _ <verb time="infinitive">
    __ <character encoding="ascii">m</character>
    ___ <character encoding="ascii">i</character>
    ____ <character encoding="ascii">s</character>
    _____ <character encoding="ascii">s</character>
    ____ <character encoding="ascii">i</character>
    ___ <character encoding="ascii">n</character>
    __ <character encoding="ascii">g</character>
    _ </verb>
    <restofclause reasonofdoingitthisway="getting bored :-)">
    ___ a lot of structure :-)
    </restofclause>
    __ </relativeclause>
    </sentence>
    </response>

    (Probably linguists would tell me that my structure is completely off :-))

    Oh, and the lameness filter told me:
    Your comment violated the "postercomment" compression filter. Try less whitespace and/or less repetition. Comment aborted.

    Yes, the lameness filter got it exactly right: XML has just too much redundancy!

    Indeed, I now got the same message a second time. Therefore I'll just add more junk in order to get this XML stuff through the filter. To avoid repetitions, the person that's me will use different words as much as possible (I am obviously not always able to not use the same term again, of course).

    Ok, let's see if now the lameness filter is satisfied.

    No, still not. So let me add some more stuff: fhjks hjfkdlgh dfhjklash fjklsd

    10 20 42 0 8 1 6 7 5 1278

    !"$%&/()=

    I'll give you your red.un.dan.cy, you lame la.a.m.e.n.e.s.s fil.ter!

    $ $$ $$$ $$$$

    Ok, satisfied now?

    Ah, still not. Then let's try some more text. To reduce redundancy, I'll now add some German.

    Nun denn, dann wollen wir mal sehen, ob der Filter sich auf diese Weise beruhigen läßt. (Und für alle Korinthenkacker: Ja, das ist noch alte Rechtschreibung :-)) Flüssigkeiten sollen ja recht inkompressibel sein, vielleicht kann ja die Aufzählung von solchen hilfreich sein :-)
    Also: Wasser, Quecksilber, Ammoniak, Öl, Essig, Schwefelsäure

    --
    The Tao of math: The numbers you can count are not the real numbers.
  301. XML is waaayyyy overblown... by Anonymous Coward · · Score: 0

    I remember, over the course of time, my friends and I (all longterm crack contract programmers) looked over XML to check out the hype. EVERY one of us independently came away going 'What's the big deal?' It's useful for a) trading data between disparate systems or b) storing complex data in a text readable format (but at that point I usually stick it in a database anyway)

    It's like the whole XML database idea. Excuse me? WHY would I want to have my database in text TO BEGIN WITH? So I can REALLY slow down my access? So some MORON opens it in an XML editor and tries to edit it? The reality (as usual) is that 80% of the people that cram in XML to their development never needed it. XML is so much freaking hype. It has VERY specific uses and it's not the global answer to ANYTHING.

    Don't even get me STARTED on how people then proceed to incorretly format it (God, you guys should see the XML I get back from a certain credit card processor - I had to write a custom node scanner for it cause some idiot designed the nodes wrong) BTW, credit card processing is one place with XML makes a LOT of sense.

  302. Ohhh goodie! by pottymouth · · Score: 1

    Another language paradigm....

    OK guys, throw away all that ugly old (insert favorite language here) and (lets code it again in | lets make all our old code talk to ) (insert newest buzzword here). Now what do we make here again??

  303. Good idea by Pan+T.+Hose · · Score: 1

    I think that using XML for programming would be a very good idea, but some redundancy might have to be removed to make writing easier. For example, since things like HTML 123 are no longer valid in XML, it is pointless to write which tag you close, since there is only one unambiguous tag you can close at any given point. So instead of 1 2 we might use 1 2 , or better yet, just >>. Now, that's a nice idea, but those angle brackets look strange, they are too wide and look like X's, so maybe let's just use the ordinary parentheses: (a (b (c 1) (d 2))). Now, that's more like it. Yes, I definitely like this new scheme much better. XML in programming is a great innovative idea, only its syntax needs some polishing.

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  304. CF by brandoncorbin · · Score: 1

    I think they should call it coldfusion

  305. This sample makes it look silly... by PepeGSay · · Score: 1

    but look at the XML decorations in C# (for things like serialization), and look at Aspect Programming and you see ideas that are not "extensible" really, in so far as creating whole new functionality at the language level... but they do allow for a high degree of seperation of individual concerns of the code and the program itself.

  306. Those that do not use... by stefanb · · Score: 1
    LISP are condemned to reinvent it. Badly.

    ./ about four years ago.

  307. Dupe!! by Sajarak · · Score: 1
  308. pseudo? by circusboy · · Score: 1

    actually, this sounds a lot like the general practice of programming in pseudocode, and having (I guess) a translator turn it into the language of your choice...(why?)

    I suppose the one major initial benefit would be to finally expose to most people that all languages essentially do the same thing. only the specific syntax is the difference. although in the interests of job security would we all want everyone to know that?

    although a side effect might be to have languages start to look more like applescript...

    personally, I think it would be kind of neat to have an editor that could, due to the formatting of the underlying code,) be much more clever about highlighting code blocks. and being able to view a representation of the program flow by backing out somewhat and seeing the whole program laid out graphically in front of you... wait, forget I said that, (does anyone know the number to the patent office?)

    --
    -- it's ridiculous how many people misspell ridiculous... (damn, damn, damn...)
  309. Re:1 function per file by tomhudson · · Score: 1
    I only meant it semi-seriously - for those who are REALLY paranoid about monitoring function changes or have some sort of OCD for ultra-organizing.

    Having said that, I *do* like the idea that no single piece of code in a high-level language (including c, as opposed to assembler) should be more than 1-2 pages long.

    As for the "kludgy scripting" to group your files together, that's what #include, cat, and "make" are for :-) (BTW, I actually did this on one project where I used a flow-charting program to outline my code, then embed pseudo-code", then translate it into source code, just to see if it would work, but that was 10 years ago :-).

  310. LISP history by 2901 · · Score: 2, Interesting
    Now, as LISP has shown, programming straight to the AST, while it has its advantages, is a historical loser. But that doesn't make exposing it in a standard fashion a Bad Idea.

    Lisp failed in the early eighties. That is twenty years ago. Things were different back then, and it is important not to learn the wrong lessons. Here are some of the reasons LISP failed.

    Virtual Memory Mysticism Four megabytes was a lot of memory back then. The junor manager could be persuaded to sign off on the purchase of a workstation with that much, but the middle manager would cut it back to two megabytes and the senior manager would cut it back to one megabyte. The fancy Lisp application would have a working set of three megabytes, so the machine would page thrash and run like cold treacle. Eventually management would be pursuaded to buy another megabyte, but it would still be too slow. The basic problem was that people treated virtual memory as magic and were reluctant to accept that there were still hard limits on the ammount of physical memory required. VLSI killed bit slice Back then, everybody and their dog was starting new mini-computer companies, using 4 AMD 2901 four bit slices to make the ALU and a 2910 to sequence the micro-code. The big Lisp vendors had their own hardware. Symbolics had Lisp machines, Xerox had D-machines. As the decade wore on, technology progressed, and VLSI CPU's such as the 68020 and 80386 slaughted the LSI CPU's. DEC's VAX was the biggest losser, but the Lisp vendors suffered greviously from mis-reading the way the hardware market was going. Naive garbage collectors Garbage collectors are hard to write. In the 80's Lisp vendors were proud that their garbage collectors were free of bugs. Unfortunately the old mark and sweep collectors tended to walk swapped out data structures, thrashing the virtual memory system. Modern generational collectors are enormously better. Computer science was young Many programmers were self taught. (I read mathematics at University.) Others had studied computer science, but were learning from academics who were new to computing themselves and thought PASCAL was a good language.

    Why do you want access to the AST? The idea is that you can avoid manual maintainance of repetitous code and boiler plate code by automatically generating it. Well, it is a nice idea but it is also a sophisticated idea.

    Some of the application is written in the base language. Some of the application is automatically generated. The generated code doesn't appear by magic. There have to be source files, in an application specific language. There have to be code generators, written in a meta language, that take the application specific language and expand it to the base language.

    It is a huge win if the meta language is transforming AST's into AST's rather than transforming text files into text files. To obtain this benefit, the programmer must be thinking in terms of the abstract syntax, rather than the surface syntax.At this point it becomes natural to give up on surface syntax and program straight to the AST. It is also natural to insist that the base language is suitable for writing AST to AST transformers, so that a separate meta language is not required. This is what Lispniks are getting at when they say that Lisp is its own meta language.

    This way of thinking about programming went right over the heads of most programmers in the 80s. I think that the most important reason why Lisp failed in the early eighties is that it was 20 years ahead of its time

  311. Harumph! "idea" is TWO syllables by irritating+environme · · Score: 1

    Clearly, that invalidates your entire post.

    --


    Hey, I'm just your average shit and piss factory.
  312. Great! by dcs · · Score: 1

    And now we are reinventing Forth and Lisp in XML!

    Sure, it's 30/40 years later, and sure, it sucks lemons like nothing I have ever seen, but, hey, it's XML!

    --
    (8-DCS)
  313. Fog by Luke-Jr · · Score: 1

    I began such a language (called Fog) a few months ago with a few goals in mind:
    1. Easilly manipulatable by non-programming-aware applications (XML-based accomplishes this to an extent)
    2. Extensible enough to handle future enhancements (based on the MOO programming language)
    3. Designed for visual effects (the XML+MOO combo was to be embedded in its own stream in video files and interpreted on the fly to add special effects)

    I haven't worked much on the project (IIRC, only a few statements are supported) since it is so large and only 3 or 4 people have shown interest in it, but if others are interested, we could possibly get something working in a few months...

    --
    Luke-Jr
  314. C in university? by Anonymous Coward · · Score: 0

    Where did you study CS?
    At my university (Germany) nobody forces you to build software out of Lego i.e. C/C++ ;-)
    Actually, you learn the theoretical background, more or less useful things, and if you code, it's done mostly in Java (not because it's so great, but because it's high-level). In fact, many people here graduate without writing a single line of C code. They never handled pointers in their whole studies. I myself code mostly in C++ (love-hate relationship), but that's only in my spare time.

    1. Re:C in university? by iamacat · · Score: 1

      Great, an alternative to one language not suitable for learning programming is to either use another unsuitable language or don't code at all. If you teach BASIC, you can just say "computer follows your instruction exactly line by line, until you explicitely ask it to go to a different step". How about:

      Computer looks up System class in java.lang package, finds an "out" static member, then selects a correct println method according to overloading rules...

  315. Re: by Anonymous Coward · · Score: 0

    shouldnt that be ?

  316. Because... by Chembryl · · Score: 1
    And why are formulas like that represented with such a poor syntax? Why can't I easily use proper Greek letters and standard math notations such as dots for multiplication, a horizontal line for divisions/fractions, etc.?"

    Ever written a differential equation solver? In a symbolic language like Mathematica or MathCAD you have to provide the 'meat' of the routine yourself. When it doesn't work the way you expected, you only have one token that represents at (its simplest) set a multi-nested loops. Not easy to debug. Its soooo easy to create infinite loops with this stuff unless you restrict input to almost useless levels of output :(

    --
    - This and all my posts are public domain. I am a Physicist. I am not your Physicist. This is not Physically advice
  317. Re:Silly article (Silly Post (Silly Reply)) by dvdeug · · Score: 1

    But the grammars of these languages are virtually required by the complexity of expression they offer the user.

    That's funny; Common Lisp has a virtually trivial grammar and an incrediably complex language. There is really no excuse for the C grammar, and the C++ grammar can't put all its blame on the C grammar. The only reason why they are hard to parse is because the creators didn't think about parsing it.

    and I might remind you that XML parsing in itself isn't all that trivial, which is why we have support libraries just for that

    It doesn't matter how simple XML parsing is, since we have support libraries for that. Note that most programs that deal with C code outside of compiling use adhoc measures; they never completely parse the code.

    is by designing a really horribly inexpressive language.

    Really. Can you show me any evidence that an LALR(1) language can't be every bit as expressive as C++? Common Lisp isn't generally considered horribly inexpressive, either.

  318. Um, no. It's 3. by atomm1024 · · Score: 1

    That invalidates yours.

    --
    Signature.
  319. So are Lisp and Tcl-Standing on the top of Giants by Anonymous Coward · · Score: 0

    Or you could combine the advantages of both LISP on top of Forth

  320. XML's greatest asset is its hype by vikstar · · Score: 1

    Ok, so there are billions of markup languages around. However, I don't see anyone one of them implemented across most imbedded language libraries. The hype of XML has helped XML to infest itself into everything, and now I can parse any XML document using my favourite language with very little work.

    --
    The question of whether a computer can think is no more interesting than the question of whether a submarine can swim.
  321. Wrong. by andr0meda · · Score: 1


    XML is a data directory search path capacity. It allows you to write queries to "find" your data in an organised way, where the app determines the organisation. Try that in c++ across object hierarchies for example, and you`ll find yourself backpointing or giving up encapsulations in any stupid little object in order to be able to access stuff.

    We`ve done 2 console games with the full data backend in XML. This has 2 big benefits: We can write the data for any platform, and we can make importers and exporters in any 3rd party or self written application that we use to build or tweak the games.

    We`ve often heard our artists and programmers say (not least of all myself): "thank god this is readable, finding that data bug would have meant many debug and compile sessions otherwise to find it."

    I know it`s `in` to diss on XML, but it is actually usefull, so take the pointless 'XML is dumb and structureless' rants somewhere else please.

    --
    With great power comes great electricity bills.
  322. Refactoring == old == hard - You are dead wrong by njyoder · · Score: 0

    How incredibly naive... It's supposed to be an intermediary for different languages? If we pretend (in magical happy ideals land) that languages all have equivalent constructs (which they DON'T), it's still a horrible idea. This means people need to write new parsers for all these languages to convert to/from XML in some undoubtedly grotesquely complex XML based language. Yes, new parsers, because existing ones are made to translate to machine or some other non-equivalent code. It's far from a simple modification.

    On to the equivalent constructs thing. What you are proposing is silly for this reason alone. In order to make code work, you need to take the incompatible construct and translate it into so much more complex combination of simple code chunks. Then, when you translate back to the original language again, it will show up as the complex code, not the original incompatible construct. The reason for this is the same reason that decompilers can't properly generate the original code. That's what this is--a combination of an "XML code generator" and a decompiler. Decompilers have failed miserably.

    This is not to mention the fact that intermediate languages like Java byte code and MSIL have been worked on for a long time, and they still haven't got it right. XML is not going to magically fix JACK SHIT.

    Lastly, people have been trying to come up with good refactoring software for decades and it's still sub-par. That's because, as I said, these people at BEST, have some exist open source compiler to start from, but even then it's a huge pain. Have you seen how grotesquely ugly gcc is? The most you can take from it are it's grammar files, everything else is incomprehensible junk unless you've spent quite a while studying gcc.

    1. Re:Refactoring == old == hard - You are dead wrong by njyoder · · Score: 0

      To add: This is like translating a translation of a translation of a translation... Try translating something from language A->language B. Now translate it from language B->C. Now translate language C->A. It's something different. Now rinse, wash and repeat a million times. It just doesn't work.

  323. Re:Silly article (Silly Post (Silly Reply)) by photon317 · · Score: 1


    You'll note I referenced LISP in my original post, I'm not unfamiliar with it. LISP does lack some high level expressiveness, but just like any turing complete language, you can of course invent such expressiveness in your code at the cost of some more characters typed.

    I think we have failed to agree on what "expressiveness" means. I meant expressive in the sense that more information can be conveyed with a minimal code size. By my definition as I was using it, assembler is the least expressive practical language, and some hypothetical 4GL would be the most expressive. C is considerably better than assembler, and C++ and Java fall somewhere in the middle of C and that theoretical peak.

    So by that I'm saying that while you can express anything in LISP that you could express in any other language, LISP is not as "expressive" by virtue of the fact that not as many idioms are embedded into the language design.

    And it wouldn't be that hard to write a C-parsing library like our XML-parsing libraries. Nobody has done it because there isn't a great need. When people write tools that need to parse C, they tend to just roll their own. Might not be a bad project for someone to start up a reusable C-parsing library.

    --
    11*43+456^2
  324. Re:Silly article (Silly Post (Silly Reply)) by dvdeug · · Score: 1

    LISP does lack some high level expressiveness, but just like any turing complete language, you can of course invent such expressiveness in your code at the cost of some more characters typed.

    Why do you say it lacks some high level expressiveness? LISP macros can do things that C macros can't even start to do.

    LISP is not as "expressive" by virtue of the fact that not as many idioms are embedded into the language design.

    Common Lisp can format outputted numbers in Roman letters. However gratitious that feature may be, it leads me to wonder you mean by this statement. It's object-orientated (CLOS), it's functional which is something very, very hard to do in C, it's iterative, Common Lisp will practically walk the dog and feed the cat.

    And it wouldn't be that hard to write a C-parsing library like our XML-parsing libraries.

    Have you ever looked at the problem? Yes, it is a hard problem. You'd need two C parsing libraries, one for CPP and one for C itself. At which point, you'd actually need to understand C, because it's a context-sensitive grammar at points.

    When people write tools that need to parse C, they tend to just roll their own.

    Again, G++ rolled their own C++ parser. They had to spend several months rewriting it. Almost nobody has a full C parser; they have an ad-hoc thing that mostly does what they need.

  325. Spitefulcrow, it sure looks like I was wrong about Iran. Sy Hersh has a remarkable track record.

    --
    It is cowardly, and a betrayal of whatever it means to be a Jew, to act as a white man

    -James Baldwin