Programming Language Design: Syntactic Sugar Over Data Streams For Ladies

Programming Language Design: Syntactic Sugar Over Data Streams For Ladies

This is not a subject we can discuss for long, so I must be brief, but this is an important subject for the age of AI.

There is a problem with programming languages, they execute statements line by line.

But that is not how the world works, the world is an information super pipe, not highway.

The languages of today, that go line by line, do nothing for the pipes of data.

Is there data that is not in a pipe, no, because majority is a data pipe.

To have simplicity in our programs, we must push for uniformity, so majority wins.

This means, you don't do line by line programming, even when you click a button to add a user to database.

You have to create an action, that you send in for processing.

As a huge bonus, you can send that action with a reverse action, and that is undo/redo, for free.

Because everything is a stream, you can capture the most recent actions into undo/redo history.


To be honest, what line by line programming is good at, is creating the programming needed to make pipes work.


Now, for those of us who are learning, processing streams of data is not going to be fun.

Because, you can no longer say, here is what I want to do, when I click this button.

You have to send it down a pipeline, that has an action processor.


Pipes have another bonus, they don't have to wait, for lines of code to reach the end.

Pipes are always ready to accept data, and only when you combine them does that data pause.

This means, the user interface can be used by multiple remote users, or you can transparently receive updates from your database.


But there is something we maybe able to do, it is to create new XML based programming languages.

That layer familiar concepts over the pipes, like loops, and workflow steps or actions.

You will be programming line by line enter-name, print-name, but the program beneath will be assembling pipes.

output of enter name, is connected to input of print name.


This type of programming does not stop in your program, it reaches out to iterate over processing ques and remote agents.

I will close by explain to you, how a temporary unpredicatabe stream, becomes a normal variable in such a program, user-name, for example.

Beneath our variable declaration, we simply listen to the stream of data filtering for user-name.

When that data arrives, from a successful database connection, that will give us latest application information.

We capture the latest value, in a reactive variable, it looks normal in our syntactic sugar world.

userName = db.userName, windowTite = userName.

But in the pipe world, we do not assign to window title, that is just the syntactic sugar.

Beneath the windowTitle, having a clearly defined interest in the username.

Subscribes to the reactive userName variable, that subscription, will update window title when userName changes.

And in the end, yet again, another benefit, you never have to check if username has changed to update the window title.

You have now been bitten by the programming bug, and now, slowly, the crafting of your own programming language...

Will grab you, by the button.

Welcome, welcome to the world of programming, goodness knows we need another programming language.todo