Slashdot Mirror


Extensible Programming for the 21st Century

Anonymous Cowardly Lion writes "An interesting article written by a professor at the University of Toronto argues that next-generation programming systems will combine compilers, linkers, debuggers, and that other tools will be plugin frameworks [mirror], rather than monolithic applications. Programmers will be able to extend the syntax of programming languages, and programs will be stored as XML documents so that programmers can represent and process data and meta-data uniformly. It's a very insightful and thought-provoking read. Is this going to be the next generation of extensible programming?"

31 of 438 comments (clear)

  1. Go Greg! by xcham · · Score: 5, Informative

    The document is mirrored here to help compensate for the bandwidth deluge.

    --
    When life gives you lemons, you CLONE those lemons, and make SUPER-LEMONS. -- Dr. Cinnamon Scudworth, Ph.D
  2. Next generation tools... by Lord+Grey · · Score: 5, Funny

    ... will obviously be "forbidden." Yes, I did RTFA.

    --
    // Beyond Here Lie Dragons
    1. Re:Next generation tools... by Impy+the+Impiuos+Imp · · Score: 4, Insightful

      > Programmers will be able to extend the syntax
      > of programming languages, and programs will be
      > stored as XML documents so that programmers
      > can represent and process data and meta-data
      > uniformly.

      Sounds like they've found a use for future eight trillion teraflop processors. Scripting on top of scripting on top of scripting. :(

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
  3. been done by studboy · · Score: 5, Informative

    programs will be stored ... so that programmers can represent and process data and meta-data uniformly.

    Yup. Back in the day, we called this "Lisp". It was about as readable as XML, but a hella lot more fun.

    1. Re:been done by ron_ivi · · Score: 5, Interesting
      Agreed, and even mentioned in TFA:
      3. You don't need XML to do this.

      Scheme proves by example that everything described in this article could have been done twenty years ago, and could be done today without XML.

      And IMHO lisp's syntax has always had a nicer structure than XML's repetitive redundancy.

      _<whatever>
      __<you> want to do in <xml>xml</xml>
      __</you>
      _</whatever>
      is nothing but a set of s-expressions that read much nicer in a lisp-like syntax:
      (whatever
      _(you want to do in (xml xml)
      _)
      )
      IMveryHO the big failure of the lisp guys of old was that they were so proud of how many ')' they could put next to each other that it made their code harder to read than necessary. I bet XML would have failed too if it were commonly written
      <whatever>
      _<you> want to do in <xml> xml </xml></you></whatever>

      (and yes, the _ are just there for /.'s formatting)

    2. Re:been done by Wolfkin · · Score: 4, Insightful

      Piling up all the closing parens makes the code *easier* to read, not harder. After you've been lisping for a few weeks, the parens just sorta disappear, and you rely on indentation to give you the overall structure of the current function, and then just add however many are left over at the end. Any good editor will let you know when you've put enough, and you can define a "fill out close parens to the top level" command in most.

      --
      Property law should use #'EQ, not #'EQUAL.
    3. Re:been done by Tarantolato · · Score: 4, Insightful

      A cynical take on this article would be that it's sour grapes by a stranded Lisp/Smalltalk guy who never got used to doing things The Unix Way, and still wants to lead the unwashed masses kicking and screaming to the promised land.

      "PUT DOWN THE VIM! WE HAVE YOU SURROUNDED!"

      All cynicism aside, this is a mixed back. Extensible syntax is a great idea; and yeah, Lisp already had it in the 50's. What needs to happen for broader adoption is to do it in a natural Algolish syntax, which basically means limiting functionality. Languages like Python and Ruby (with lambdas and blocks/procs) are starting to do it and I expect to see others follow.

      The whole "seamless translation into XML and back into any language of your choice" is a lovely idea, but even small bugs in implementation would handicap its usefulness considerably. It'd also take a tool oodles more complicated than gcc, which he doesn't seem to like.

      Finally, tight coupling of language and development environment can mean added productivity, but it also tends to mean less flexibility in practice: this is one of several reasons that Smalltalk hasn't caught on.

    4. Re:been done by Anonymous Coward · · Score: 5, Informative
      The S-expression people put the attributes in as arguments; the element data is also just another argument, which is certainly a more uniform treatment.

      Ex:
      <a b="1" c="2" d="4">blahblahblah</a>
      becomes something like:
      (a "blahblahblah" (b 1 c 2 d 4))
      or this:
      (a "blahblahblah" b 1 c 2 d 4)
      or this:
      (a (b 1) (c 2) (d 4) "blahblahblah")
      Take your pick.

      The point stands that you don't need XML's syntax to get these sort of behaviors, and that's not really surprising; any sufficiently general syntax usually can accomodate any paradigm in another sufficiently general syntax. This probably has some metaphysical voodoo link with the Church-Turing thesis, formal languages, and computability, but I'm too lazy to care.

      You could dispense with the element names if you didn't care about such things, although it makes it harder to reorder your arguments, of course. Then again, XML can't support this sort of ordered attribute list, now can it? Not directly, anyway. ;)

      I'm not a Lisp or XML zealot, and I agree with you that if it's machine-generated, it doesn't really matter, but the Lisp people have a point that anything you claim to be able to do now with XML could have been done before with Lisp. Heck, DSSSL is based on Scheme.

      * Note that I didn't quote the arguments; I'm assuming this is being fed to the read procedure, and not the evaluator.
    5. Re:been done by boots@work · · Score: 4, Informative

      This has been proposed and implemented several times as an alternative syntax. I think Arc is meant to have this, but it's hardly the first. I don't think it's ever really caught on.

      Why?

      - Sometimes it's nice to put code into things that don't reliable preserve whitespace, such as, say, comment fields on web sites.

      - Parens are well-established in lisp. If you change it you give an additional barrier to people coming from other lisp dialects, without particularly helping people coming from elsewhere.

      - Whitespace by itself is not enough. Do you want to write (+ 3 (* 4 5)) across 3-5 lines? Python ends up with fairly complex rules about backslashes, open parens, etc.

      - One advantage of lisp is that it's easy to write out from a program. This is really not true of Python.

      - If you accept that we need paren syntax, then you can wonder whether indentation should be supported as an alternative. But having two different syntaxes for one language, though an interesting idea, is likely to cause a lot of practical confusion.

      So I think all you really want is an editor that ensures the indentation is always valid, and that can highlight parens and do other things. emacs goes a long way, but it could be better -- for example by making outer parens larger, as in TeX-printed or handwritten mathematics.

      In my humble opinion what Lisp needs to take from Python is not semantic indentation, but rather a single standard dialect with good OS bindings. The last thing we need is yet another slightly incompatible dialect that can't bind to existing code. Sheesh; I love lisp but lisp implementers really exasperate me.

  4. Just what we need by Anonymous Coward · · Score: 5, Insightful

    Extensible, so that each programmer can use a whole heap of functional and syntatic elements that no other programmer has ever heard of...

    XML, so stuff that doesn't need to be human-readable is human-readable, and the whole mess is a good six times larger than it needs to be...

    Plugins, so that everything can be dependant upon proprietary, bulky, inefficient runtime engines...

    I am all for progress, and not married to old-school solutions by any means. However, some things can sound good in theory without actually representing progress.

  5. Wrong. by Bingo+Foo · · Score: 4, Funny

    XML? Bah. Next generation languages will be written in "WIMNNWIS" (What I mean not necessarily what I say) and will run on processors liberally sprinkled with pixie dust.

    --
    taken! (by Davidleeroth) Thanks Bingo Foo!
  6. Re:Data and metadata by XML by MisterFancypants · · Score: 4, Funny
    This is incredibly stupid. How come XML helps in dealing with data and metadata? Metadata *is* data.

    It goes up to 11, see. That's one higher.

  7. I always remember Master and Margaritta. by SharpFang · · Score: 4, Insightful

    How humans can tell what will be in a few years if they can't tell what will be tomorrow?
    I'd completely agree if the claim wasn't "that next-generation programming systems will combine compilers"... but "should combine...".
    Right, the idea is nice. But where will the market go, how will big corporations guide the development, what will become the new fancy or if there will be a new development that will render XML completely obsolete and feeling ugly comparing to that "new thing" - we don't know.

    --
    45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
  8. Sounds like Forth by Anonymous Coward · · Score: 4, Insightful
    Except for that XML stuff.

    I don't understand this fascination with XML. It's just a generic container for storing data - nothing more. OpenOffice uses it as the underlying format for storing documents, but that doesn't mean I have to deal with it when writing a document. It's transparent to the end user.

    In the same way, , why should I have to deal with it when coding? It's sort of like requiring coders to be able to pop up a hex editor and cruise through the code.

    Remember MVC (model-view-controller)? Being able to disassociate the different parts was considered a good thing. Swing decided it was too cumbersome, ASP.NET joins them at the hip, and now we've come all the around, with Microsoft proclaiming with XAML that everything should be dumped into one big XML box.

    Bleah.

  9. Why XML? by ProfessionalCookie · · Score: 4, Insightful
    XML is great and all but there are a few killer disadvantages. It can be really really slow. It can mean generating huge files. A well documented open format is better than a "human readable" XML template. How many XML files have you looked at that have this kind of thing :

    <DATA>2ED4F64676766DC7B87A76A65B1722303FFF</DATA&g t;


    Sometimes XML is not the answer. That being said there are also so really great uses, but XML was not made for everything.
  10. Re:Can't wait by X · · Score: 5, Insightful

    Now you can do this in C++, but look at what you need to implement to do it

    It would be great, if instead, I could hook into the compiler and tell it exactly how it should handle vectors.

    Umm... what makes you think that programming a compiler is going to be more straight forward than doing generic programming? That seems like a huge assumption to me.

    The closest thing I've seen to what this article talks about was CLOS's MOP, which was great, but once again, a lot of people had a hard time groking it.

    --
    sigs are a waste of space
  11. The laughs keep coming by fuzzy12345 · · Score: 4, Insightful

    So this guy's familiar with UNIX, he's familiar with Lisp, yet he thinks the future is XML and hideous frameworks with ever-changing APIs? Not often you se e someone with a hammer AND a screwdriver using the hammer to pound screws.

    --

    Everybody's a libertarian 'till their neighbour's becomes a crack house.
  12. Extensible Programming == BAD! by Space_Soldier · · Score: 4, Insightful

    We've seen what can happen to languages when countries get conquered. English is one of the best examples. Try to read some old English to see for yourself. With XPL (Extensible Programming Language), you cannot say anymore that I know C++, or I know C#. Someone will ask you to maintain some code, and you'll take a look at it and have no idea what is going on, until you learn the extensions. This will happen over and over again with every project you are supposed to maintain. This is BRAIN FRYING and huge possibilities for mistakes. It is just like waking up everyday and being asked to speak in another human language. Today English, tomorrow French, the day after tomorrow Bengali, can you do it?

  13. Re:Yeah huh... by Tumbleweed · · Score: 4, Funny

    Yep, and around the same time, we'll all be typing on Dvorak keyboards in Esperanto talking about the new flat tax. :)

  14. Let's see here.. by k98sven · · Score: 5, Interesting

    If I recall correctly,
    Fourth-Generation languages was going to be the future of programming back in the early 80's?
    (Machine code, Fortran/Basic-type languages and Pascal/C-type languages being the supposed first, second and third generations, IIRC)

    Then in the early 90's.. OOP was going to save the world. Not that it hasn't had impact, but it certainly hasn't fundamentally changed things.

    And now it's XML that's going to save the programmers, while the old-timers whine that we should all really be using Lisp.

    Not that I'm a computer-language conservative myself, but it's worth pointing out that historically, there has been quite a big discrepancy between which languages the Comp-Sci researchers feel everyone should be using, and the ones which actually are used.

  15. The more things change... by treerex · · Score: 4, Interesting

    that next-generation programming systems will combine compilers, linkers, debuggers,

    ...THINK Pascal (for the Mac) was doing this almost 20 years ago: the editor served as the front end to the compiler --- so the syntax highlighting in the THINK Pascal editor was driven by the lexer (really was the lexer): you knew about syntax errors immediately. The debugger was fully integrated into the environment. It was really sweet, and probably one of the best programming environments ever written.

    and that other tools will be plugin frameworks

    Like Unix pipes and Eclipse?

    Tomorrow arrived yesterday and appears today.

  16. Hmm by AdrianFletcher666 · · Score: 5, Funny

    So basically, we get to combine the speed of Java/.NET with the user friendliness of XML and the security of COM? May god have mercy on our souls...

    --
    Adrian
  17. Now I understand.... by EmbeddedJanitor · · Score: 4, Insightful

    why simple application software needs 2G of RAM and multi-GHz CPUs to get the responsiveness I got on a 100MHz 486 with Win3.11.

    --
    Engineering is the art of compromise.
  18. zombie UNIX haters back from the dead by hak1du · · Score: 4, Insightful

    We have had these kinds of integrated, extensible systems: Smalltalk-80, Lisp, and others. And we have had the same tired, old arguments against UNIX since its original design (you can read up on them in the UNIX Hater's Handbook). Smalltalk-80 and Lisp didn't fail because there was some grand conspiracy against them, they failed because people voted with their feet.

    Most real-world programmers apparently just want to put up a bunch of dialog boxes and windows, interact with the user a little, and interact with a database. They don't want to extend the programming tools or language or modify the optimizer, they want it to just do what they need it to do. And if it doesn't do what they need it to do, they just pick a different language and environment and don't go on a crusade to develop zillions of plug-ins and modifications. Programmers stick with text files not because they believe that they are the best representation, but because they actually work pretty much everywhere.

    Some of the changes Wilson advocates are happening. That's not surprising, given that the features he advocates have been around for decades and many people are familiar with them. But they are happening in an incremental way and people pick and choose carefully which aspects of Lisp and Smalltalk-80 they like and which ones they don't. For example, you can get versions of GNU C that output interface definitions in XML format. IBM VisualAge maintains Java sources inside databases (not text files) and permits incremental recompilation. Many Java development environments have plug-in architectures. Many editors now permit structure-based editing operations ("refactoring") and display "styled" source code, using the raw ASCII text just as a formal (non-XML) representation of the program structure. Aspect-oriented programming adds a great deal of extensibility to languages like C++ and Java. On the other hand, general-purpose macros are out--language designers made deliberate decisions not to include them in Java, C#, and similar languages.

    Altogether, it looks to me like Wilson is merely restating what is already happening and combining that with a good dose of UNIX hatred. If he would like the industry to move in a different direction, there is a simple way of doing that: he should implement what he thinks needs to be done. I think an XML-based programming language (and several have been proposed) has about as much chance at flying as a lead balloon, but, hey, surprise us.

  19. Extensible Schmextensible by blair1q · · Score: 4, Funny

    How about developing Maintainable programming?

  20. dealing with XML by Yobgod+Ababua · · Score: 4, Informative

    That's exactly one of the author's points! You shouldn't (and in his vision won't) have to deal with the XML directly, -unless- you are one of the people actually writing new plugins rather than just using them.

    His suggestion is primarily that we start using editors that transparently present the 'code file' in our choice of format rather than forcing us to edit it byte-by-byte. It's like the syntax-highlighting you probably use now, only effecting more than just colors.

    Using XML for the underlying syntax is mostly irrelevant to his proposal, but he suggests it merely because it is currently popular, well suppoerted, and well suited to it's primary job of presenting data in an easily MACHINE READABLE format.

    His proposal is, in fact, exactly the opposite of requiring coders to pop open a hex editor, and he likens our current ASCII-only coding methods to doing exactly that at one point.

  21. Bad? by Yobgod+Ababua · · Score: 4, Insightful

    That's not how I read the article's proposal at all!

    The code you've been asked to maintain is stored in some standard machine readable format. When you come in you then use the code-editor program to view it using -your- extensions, and the underlying primatives of the code objects are presented in the manner you're used to.

    Whatever extensions and transformations the original author used to create the code would be relatively meaningless, which (for many of the reasons you descibe) is a good thing.

  22. This is so Interlisp by Animats · · Score: 4, Insightful
    Most of what he's talking about was in Interlisp, the first Really Big Integrated Programming Environment. Integrated debugging. EMACS. Program storage as "workspaces". Extensibility. Intelligent assistants ("DWIM", or "Do What I Mean", a set of heuristics for correcting Warren Titelbaum's most common typing errors.)

    The ultimate expression of this was realized with the Symbolics LISP machine. Everything was in LISP. Everything was hackable. The MIT Space Cadet keyboard, with six shift keys (Shift, Ctrl, Meta, Super, Hyper, and Top). All 2^16 keycodes could be bound to any EMACS function.

    I've used both. They sucked. Partly because they didn't work very well, but mostly because all that flexibilty and programmability had negative value. Language and UI design are hard. Evading the problem by making everything changeable does not fix the problem.

    His point about XML being another way to put LISP S-expressions into textual form is well taken, though. They're both trees. The problem with LISP is that while the data structures are valuable, the programming notation really is a pain.

    LISP works well as a web development environment. Viamall, which later became Yahoo Store, was written in LISP. That was one of the first web applications that really did something elaborate on the server. You could create web pages on the server from a web browser. And the overhead was lower than with XML, where you're forever re-parsing text strings into trees.

  23. Compiler extension (was:Can't wait) by real+gumby · · Score: 4, Informative
    It would be great, if instead, I could hook into the compiler and tell it exactly how it should handle vectors.

    Well of course that's what templates are. Yes, their syntax is horrendous but that's what comes of trying to wedge the concept into the existing crannies of C syntax (or when, as Stroustrup remarked to me once, "the ecological niche was already polluted").

    If you hanker for a language in which metasyntactic extension is natural, you need Lisp macros (or here and here for a more complex example), Scheme "hygenic" macros or the CLOS MOP.

    But if you really want to consider "hooking into the compiler" as you say then you should look at the reflective programming work, the ground work for which was laid down almost 25 years ago by Brian Cantwell Smith and was even implemented, by me and others, back then. Although a lot of work continued in this area that vein pretty much got mined: unless you can think up a completely new control structure there's not a huge amount more you can do with such a system than you could with a normal metasyntactic extension mechanism.

    HTH
    -d

  24. Rebuttal by Oestergaard · · Score: 4, Insightful

    compilers, linkers, debuggers, and other tools will be plugin frameworks, rather than monolithic applications

    Uh? My compiler acts as a "plugin" via. make, which is called from emacs. If I want another compiler, I tell make, and voila' it's "plugged in". Welcome to the world of 'NIX Mr. Wilson.

    What is worse, every tool's command-line mini-language is different from every other's

    But this is their strength! Different tools solve different problems - and they use different languages to describe what they do, because they are *fundamentally* different (awk is not sed is not grep is not ls). How would you possibly write up a single language to describe what both sed and awk does, without poorly re-creating perl?

    Attempts to stick to simple on-or-off options lead to monsters like gcc, which now has so many flags that programmers are using genetic algorithms to explore them

    Most CS majors will know that modern CPU architectures are complex beasts, and that it is pretty hard to come up with which combination of optimization methods will yield the best performance on some particular revision of some particular CPU on some particular hardware configuration. Nothing mysterious about that. I completely fail to see what that has to do with command line options.

    And instead of squeezing their intentions through the narrow filter of command-line mini-languages, programmers can specify their desires using loops, conditionals, method calls, and all the other features of familiar languages

    Instead of squeezing my intentions thru the narrow filter of command-line mini-languages, I can specify my desires using what a standard shell (like bash) has to offer. Ladies and gentlemen of the jury, this is not making sense!

    The result is that today's Windows developers can write programs in Visual Basic, C++, or Python that use Visual Studio to compile and run a program, Excel to analyze its performance, and Word to check the spelling of the final report.

    Oh come on, please... So if I develop on windows, I can use VB, C++ and Python. How is this relevant? There are more useful languages available on the dreaded "command line systems" ('NIX), but let's just agree that there are plenty of languages available on most OS'es out there - regardless of the windowiness or commandlineness of the system.

    Using VS to compile and run the application? Well, if your command line absolutely sucks, they I can imagine why you would want to launch your app from your editor - a matter of taste too maybe. But relevant? How?

    Somehow I need COM in order to put numbers into Excel? Ever heard of CSV? You know, new-line terminated lines of T-E-X-T which can be processed by these little all-different tools, like, for example, Excel.

    The part about Word and spell-checking of a final report... What? What's your point? If I use COM for developing software, I can spell-check in Word? If I use a command line, I cannot spell check a report that I write about it in Word?

    A similar API allows the popular memory-checking tool Purify to be used in place of Visual Studio's own debugger, and so on.

    Absolutely! Plusings make perfect sense certain places. Dude - GUD is written in Emacs LISP, it's a plugin for GDB. You could write an elisp file for Purify as well - in fact, Intel actually ships an elisp file for their debugger, even on Windows... Plugins make sense some places, other places they don't. Which, lo and behold, is why they are used certain places and not others.

    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. Compilers and linkers are still monolithic command-line applications: files go in, files come out

    Why does he not see what he's writing?!? A compiler reads a number of input files and generate an output file - this is a perfect match for a command-line too

  25. Not the golden solution... by fikx · · Score: 4, Insightful

    This is not the golden, unifying solution or anything, but there's some ideas in there that could be useful.
    I saw his thougts in the first section of the paper and took the rest as some quick examples on how it might look.
    I can think of plenty of directions this could go. The first thing I got out of it is applying the same level of abstraction we try to implement in programs to the act of programming itself. This is happening in all kinds of areas of computers anyway (like abstracting file systems, GUI's, etc.) why not put programming into the mix?
    It's not about using scripting instead of programming languages, it sounded more like building the same features into our programming tools as we build into the apps we write with 'em.

    why all the negative reactions? If its about loosing your editor to write code, you didn't read the article. If it's about too much abtraction to program, then it seems kinda hypocritical considering all the frameworks we use for other people's tools. Or is it just irritation about having to relearn a bit and keep on coding as before? The complaints about XML are odd too. He choose a machine-parseable, human-readable widely used format as a possible way to store programs at a low level.

    --
    AB HOC POSSUM VIDERE DOMUM TUUM