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?"
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
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.
And suddenly he's propheysing the future?
Editors like Emacs, Visual SlickEdit and even the loved/loathed MS Visual Studio have plug-in frameworks.
As for XML being the "glue" for holding things together... No. It'll be a data neutral "modulator" you emit your data from your program by name in a particular format. Transmitting and receipt by the other programs will be handled by a remodulator. In between it might be XML, it might be binary, it might be whatever you feel like using that day.
(and no I haven't read the artile (FORBIDDEN)
Actually I believe this particular example might well be optimised out by the compiler to the code you mention. But your point is probably valid for trickier problems.
This is not the next generation of programming systems but rather the present one for pretty much everyone except for those using Microsoft tools.
Again, nothing new.
There is no way in hell that would ever happen. Ever.
No.
Now, I will read the entire article, but somehow, I am not holding my breath...
Sincerely,
Pan Tarhei Hosé, PhD.
"Homo sum et cogito ergo odi profanum vulgus et libido."
/greger
that next-generation programming systems will combine compilers, linkers, debuggers, and that other tools will be plugin frameworks, rather than monolithic applications.
yup, it already happened. more than 10 years ago. it's called Rule of modularity and Rule of Composition. In case you don't know. It's the Basics of the Unix Philosophy
#
#\ @ ? Colonize Mars
#
Actually, this example often isn't optimized away which is why the Blitz++ library exists. In fact, the author of the library, Todd Veldhuizen, has written at least one paper spelling out what compiler developers need to do in order to ensure stuff like this is optimized away. I've done lots of experiments myself. As soon as you put something like my example line inside a template that is instantiated from another template etc. I've found compilers start missing what you think ought to be easy optimizations. It's very frustrating, I just want to tell the compiler myself how to do its job because it's often just a mindless application of a bunch of rewrite rules.
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
.NET provides "remoting" and Java provides RMI. These are essentially Remote Objects. CORBA provides this cross-platform. If I understand exactly what you're asking for, it already exists. Clients can instantiate objects remotely, and maintain virtually local control of these remote objects, using the aforementioned technologies.
However, if you're using PHP, the whole concept of remote object has to be patched together (just like in ASP) simply because there is no true "state" in web applications.
Uh... and emacs, that extensible editor/IDE thing written in a Lisp dialect...
Ruby does all this very transparently already with the Distributed Ruby library which is part of the standard Ruby.
Basically all you do is this:
It's as simple as that. You can run the Server and the Client on entirely different computers, thousands of miles away and everything will just work. There are layers that build on top of this which provide master server functionality (clients and servers can find each other via an application server), firewall layers and more. All those however keep in the spirit of the simplicity of the example code above.
There's more information about this available at this article. Just one more quote I would like to highlight:
What maybe a few people have missed is that there will be some incredibly interesting "hardware" out there in the future.
Some people have already demonstrated things like using DNA computers to solve travelling salesman problems, Quantum Computing and Grid Computers.
Perhaps what this article is suggesting is one way for developers of entirely new "hardware" to easily supply operators and types (syntax) to any programming language.
It would be interesting to be able to write program a that talked directly to the nervous system using fairly standard <your language of choice> syntax, that when compiled produced a real piece of nano "machinery".
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.
Why not just use Lisp?
...richie - It is a good day to code.
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
Marxist evolution is just N generations away!
on Lambda the Ultimate.
IMO, this is nothing new. Microsoft's Longhorn presentation, at the PDC in LA last fall, made it pretty clear that Longhorn will be shipped with the compiler and an extensive class framework "installed".
C# is part of the operating system and the file system. The operating system will generate "partial classes" for new file "types" and other functionality on demand.
Since the compiler will be part of the OS, I could write an application that could generate code and run it, leveraging existing classes already on the system.
In the great CONS chain of life, you can either be the CAR or be in the CDR.
"half human-readable" is just a bit too wishy-washy for me. HTML is human readable, and it does its job pretty well (aside from true horizontal positioning control, instead of faking it with Lists and Tables) but that's because the 'T' stands for TEXT and it's intended primarily for human readable text.
For anything that is meant to be machine-processed, like a low level data format, human-readability is a non-issue. For anything that is meant as general purpose, large capacity data storage, human-readability is a liability because the volume of metadata eclipses the volume of data.
As a slightly better example, ASN.1 is sometimes tedious and even overly verbose, but it is far more compact than XML, is at least as expressive, and is trivial to parse with a simple state machine.
What annoys me about "XML" is that a "Markup Language" is supposed to describe data *for presentation*, that's what Markup is all about. Using it as a general purpose database format is truly a misuse of the SGML technology.
-- *My* journal is more interesting than *yours*...