Eidola Examples
Examples
Comparisons and Metaphors
Growin' Code
Trial by Eidola
Tag Team Coding
Why Eidola Wants to Evolve
About Eidola
Project Status
FAQ
Contact
Eidola Home
 
  Growin' Code
Here are some example of how you might edit code in Eidola, and what you might expect to see while you're doing it. Once again, I apologize for having no pictures. Is your imagination getting sore yet? Good! That just means that it's getting a workout.
  A Notation for Every Occasion
The basic idea of representation independence is that you can see your code in many different visual presentations, or notations in Eidola terminology. This is what modeling tools (like UML) and many IDEs are doing these days -- only with Eidola, the language was actually designed for it from the beginning.

When you're designing a piece of software, you probably want to start out with a high-level view of your code -- something that shows just your classes and packages and their relationships, but no internals. As you start to figure out a class, you could switch to another view showing the interfaces (the public members, with the implementations hidden), or just jump straight into coding in a low-level view. If you're getting some weird error you don't quite understand, you could look at the code under the microscope of a view that shows you exactly what's going on with every little internal.

If you're using a somebody else's code -- a library, for example -- you could look at that code in a documentation-centric view. Donald Knuth had the idea of self-documenting programs, which you could run through a compiler to make the executable, or TeX to make the documentation. In Eidola, it's just a change of notation.

These different high- and low-level notations would be very different in character. The high-level modeling view would probably be very graphical; the low-level coding view would probably be much more textual. It might even look like a normal textual language, if you like it that way. If drag-and-drop appeals to you, or if you much prefer the speed of the keyboard, it's possible to write a notation to suit your taste. Variety is the rule.

  Small Change, Big Consequences
Working with these different views is nothing new, but they interact much more smoothly than they would in a present-day language. There isn't textual source code lurking behind every window on your screen; when you look at a graphics-heavy notation, you're looking at the real program, just as much as when you're looking at a text-heavy notation. If you change the structure of the program in one view, whether by typing in a new name or dragging an arrow to a different box, the change appears in all your other views immediately -- no recompile, no suddenly appearing blocks of /*** GENERATED CODE -- DO NOT EDIT ***/.

These different views aren't just free-form text or widgets. They are tied directly to the kernel, an internal representation of your program in a structured form -- sort of like a parse tree, but much more interactive. Unlike many user interfaces which attempt to hide what's really going on from the user, the purpose of Eidola's notations is to show exactly what's going on -- sometimes just parts, sometimes all of it -- as it's most relevant to what you need at the moment.

So big whoop, there's a kernel. What does this mean? Suppose that you have a frequently used class which somebody called CTimedDev_BreadHtngCoilAC. You decide that the name Toaster would be a little less confusing. So you open up the definition of the class and type in the new name. And as if by magic, the name changes -- everywhere. In every view of the class CTimedDev_BreadHtngCoilAC, in every piece of code that uses CTimedDev_BreadHtngCoilAC, the name Toaster now appears. No recompile, no global search and replace -- it just happens.

  Oh, really? How is that supposed to work?
While you are editing, your program is stored in a structured form in a piece of software called the kernel. In this kernel, there is an object representing CTimedDev_BreadHtngCoilAC. When you change its "name" property to Toaster, it broadcasts an event saying, "Hey! I've changed!" All the different views on your screen which are showing the name CTimedDev_BreadHtngCoilAC are listening for such events, and know to redraw Toaster with its new name.

All those other elements that used CTimedDev_BreadHtngCoilAC weren't referencing it by name; they were pointing to the actual object. So the name change doesn't affect them at all. They are still pointing at the same thing, even though its name has changed. Some of them might need to do some quick error checking, to let the user know if the change created any name conflicts. Other than that, there's no work to be done, no name to be updated to keep the reference valid.

  Poking and Prodding
Text is squishy. If you poke at it, it doesn't respond. If you try typing new text into the middle of some code, it doesn't tell you anything about the program -- the text just goes in. Squish. There's no feedback until the compiler kicks in. Have you ever forgotten some point of syntax, or a name, or a function's arguments, and tried just typing things in to see if they compile?

Because an Eidola program is there in its structured form, it's more responsive when you edit it. The kernel can answer questions about the structure of your program, and will find errors as you introduce them. That doesn't mean that kernel stops you from introducing the errors -- it just lets you know that you're doing it, like a joystick with force feedback. So you can see if that square peg fits in the round hole by picking it up and trying to stick it in.

Because the structure is there in the kernel while you're editing, you can ask structured questions about your code. "Is this legal?" "What are the arguments to this function?" "Is this what that class was called?" "Is anybody using this? Can I delete it?"

All this means that you can poke and prod your code a bit while you're editing it, and be a little less surprised at what the compiler spits at you when you try to build.

Next: Trial by Eidola >>
 
Copyright 2000-2001 Paul Cantrell