Lambda the Ultimate

inactiveTopic The Essence of Strategic Programming
started 7/23/2002; 12:48:52 AM - last post 7/26/2002; 3:42:33 AM
jon fernquest - The Essence of Strategic Programming  blueArrow
7/23/2002; 12:48:52 AM (reads: 2586, responses: 7)
The Essence of Strategic Programming
Sub-titled "An inquiry into trans-paradigmatic genericity."

...a programming paradigm-independent characterisation of strategic programming (a generic programming idiom where programs are constructed using strategies). The kind of genericity enabled by strategies is geared towards processing heterogeneous data, such as parse trees and documents.

Different combinators allow the idiom to be used in different programming paradigms: term-rewrite, functional, object-oriented, and logical. Includes a comparison with Aspect Oriented Programming and and a critique of XSLT. Many of the ideas seem to be similar to those in Simonyi's writings on Intentional Programming without the biological metaphors, vagueness, and proprietary secrecy.
Posted to functional by jon fernquest on 7/23/02; 12:52:44 AM

Manuel Simoni - Re: The Essence of Strategic Programming  blueArrow
7/24/2002; 1:52:06 PM (reads: 902, responses: 0)
I recently came across this link which collects some Intentional Programming resources: http://www.aisto.com/roeder/active/ (altough I haven't yet had the time to look thru them.)

This paper: http://citeseer.nj.nec.com/smaragdakis97distil.html discusses the DiSTiL language, which is also an IP offspring, and offers an overview over some ideas behind IP.

DiSTiL is a software generator that implements a declarative domain-specific language (DSL) for container data structures. [...] The language of DiSTiL extends the C programming language with domain-specific constructs for specifying complex data structures declaratively.

DiSTiL is compiled to plain C - one of the goals of IP is to have the convenience of domain-specific components but compile them to efficient (native) representations.

What I liked most about IP is that Simonyi explicitly talks about replacing text files with graphics (Guess how many language designers refrained from adding features to their language because a plain-text syntax would be too awkward?)

jon fernquest - Re: The Essence of Strategic Programming  blueArrow
7/25/2002; 3:04:25 AM (reads: 892, responses: 1)
> What I liked most about IP is that Simonyi explicitly
> talks about replacing text files with graphics.

I think this idea is a little frightening. Source code in the form of a text lives forever, is readable, translatable, and resurrectable.

I hope there is both text and graphics which perhaps SVG XML standards might help with.

I recently saw a posting on comp.ai.natlang on a project that resurrects an early AI application written in an extinct dialect of Lisp (MACLISP): SHRDLU ressurrection.

Decoding and reconstructing programs from proprietary VB or Flash files that were created from non-textual IDE's is probably a whole order of magnitude more difficult and will probably never get done -- ergo lost history.

Mathematica's use of mathematical notation is great, but this possibility has been around for a long time with TeX. Perhaps MathML will help push direct programming in mathematical notation into the mainstream further from the visual syntax side of the problem. Haskell set comprehensions are almost there from the semantics side.


Thanks for the name" Smaragdakis". His page is full of useful references like the "The Jakarta Tool Suite (JTS)" that includes the Jak language for "extending Java with new constructs" :

"Jak is an extensible superset of Java. Jak presently supports metaprogramming extensions, which allows one to write Java programs that produce other Java programs. Abstract Syntax Tree (AST) constructors and hygienic macros are provided.

It sure would be nice to see a prototype of Intentional Programming before it arrived whole born on the programming scene. Simonyi's essays are very intriguing, but it's frustrating not to see any source code realization of his ideas, but what I suspect is that IP is a restatement of ideas in a new form with a new emphasis of ideas that have been around for a long time:

Programming languages are really just vehicles to supply abstractions to programmers People think of programming languages as being good or bad for a given purpose, but they are really criticizing the abstractions that a language embodies..... It's called intentional programming because the abstractions really represent the programmers' original computational intent... What you want to maintain invariantly is the computational intent as separated from implementation detail. Source

I think the only thing really new in this particular passage is the vocabulary.

Ehud Lamm - Re: The Essence of Strategic Programming  blueArrow
7/25/2002; 3:17:44 AM (reads: 935, responses: 0)
I think we discussed non-textual languages here a few times. With the exception of truly visual languages, I find this a terrible idea.

Many fail to realize the 1 dimensional nature of language (both written and spoken). Sign languages used by deaf people are supposedly two or even three dimensional. Some say that the reason deaf people manage to really make use of these linguistic elements is that their brains have spare cycles, not having to analyze auditory data. I gave a few links about this in the past, and I admit I haven't checked for more recent research.

jon fernquest - Re: The Essence of Strategic Programming  blueArrow
7/25/2002; 3:53:03 AM (reads: 876, responses: 1)
I think the critical difference is whether the visual notation used in the programming already has a customary use in the DSL domain. Mathematical notation certainly falls into this category as do many different types of diagrams used in engineering disciplines. A DSL might *have to* to go visual to relate to its users and model the domain adequately.

When I wrote the response above I was thinking specifically of Simonyi's striking example of using mathematical notation in a program in the Generative Programming book.

Ehud Lamm - Re: The Essence of Strategic Programming  blueArrow
7/25/2002; 4:37:22 AM (reads: 926, responses: 0)
I tend to agree. But I notice that mathematical notation is er.. a notation. So it is in fact a visual language. Compare this with a programming language for diagraming (e.g., Pic). The output is grpahical, but the language may well be textual.

Mathematical notation is in general 1D and textual. There are local 2d cues (e.g., subscripts), and symbols (e.g., sqrt).

Manuel Simoni - Re: The Essence of Strategic Programming  blueArrow
7/25/2002; 2:13:13 PM (reads: 879, responses: 0)
> > What I liked most about IP is that Simonyi explicitly > > talks about replacing text files with graphics.

> I think this idea is a little frightening. Source code in the > form of a text lives forever, is readable, translatable, and > resurrectable.

We could store anything in plain text (in the native host language's syntax) but still provide drag and drop editting of graphical symbols.

One symbol could be

   Iterator it = INPUT1;
   while(it.hasNext()) {
      INPUT2(it.next());
   }           

Using drag and drop I'd connect variables to the two INPUTs. Gives me text sources but nicer editting. What drives me up the wall is that I am dealing with structured program elements, but the text editor is a dumb row/column matrix of characters.

(I know, I know that I could also quit Java :)

jon fernquest - Re: The Essence of Strategic Programming  blueArrow
7/26/2002; 3:42:33 AM (reads: 863, responses: 0)
> of graphical symbols.......
> Using drag and drop I'd connect variables to the two INPUTs.....
> What drives me up the wall is that I am dealing with structured
> program elements, but the text editor is a dumb row/column
> matrix of characters

Sounds a lot like Prograph which I've always wanted to try out.

I bet if the Java language cleaned up all its warts and was more consistently "everything is a class," a simple and very aesthetically pleasing front-end like Prograph would be a very natural way to program Java.

I'd also like to try out "Hookup" a functional dataflow language for music mentioned in the recent Animism Thesis posting at LTU.

But anything visual is usually so platform specific and finicky... like you need to write the software specifically for Windows or a Mac or X-Windows with Motif....that the user base never becomes very great....I'd nominate Tk GUI as a universal GUI standard... but Winforms (.NET or Mono) looks like a more likely candidate nowadays. A big problem with building anything visual is getting a platform to build it on that will still be around in two or five or ten years.