Softanza
StartFrançais
Softanza
Research · narration

Programming the Future, Litterally, in Softanza

Programming traditionally forces immediate execution - each action happens as soon as you call it. Future Actions let you plan a sequence first, then execute it all at once with natural timing control.

by Mansour Ayouni · in the repository since 2025-09-16 · paradigm essay · no single Atlas area

Classic vs Future Actions

Classic approach - immediate execution:

Haro
oStr = new stzString("ringo")
oStr.Uppercase()     # Executes now: "RINGO"
oStr.Remove("o")     # Executes now: "HARO" 
? oStr.Content()     # Shows: "HARO"

illustration

Future actions - deferred execution:

Haro
? BeforeQ("ringo").IsUppercasedFQ().RemoveFFQ("o").Content()
#--> "HARO"

illustration

The Future Syntax

The power lies in specific suffixes that control when actions happen and how they chain together:

  • F - "Plan this action"
  • FQ - "Plan this action and continue chaining"
  • FF - "Plan this action and execute all now"
  • FFQ - "Plan, execute all, and continue chaining"

Flow control: - BeforeQ(value) - Start with this value - AndThenQ() - Sequence connector - ReturnIt() - Get the final result

How It Works

The fluent syntax is built on basic queue functions:

Haro
# What you write:
BeforeQ("haro").UppercaseFQ().RemoveFFQ("g")

# What happens:
# 1. Queue the Uppercase action
# 2. Queue the Remove action  
# 3. Execute all actions on "haro"
# 4. Return result: "RIN"

illustration

Examples:

Haro
? BeforeQ("ringo").IsUppercasedFQ().
	RemoveFFQ("o").
	AndThenQ().ReturnIt()
#--> HARO

? BeforeQ("ringo").IsUppercasedFQ().AndThenQ().SpacifiedFQ().
	RemoveFFQ(" o").
	BoundItWithQ([ "<< ", :and = " >>" ]).
	AndFinallyQ().ReturnIt()
#--> << H A R O O >>

? BeforeQ('').UppercasingFQ("ringo").
	RemoveFFQ("o").FromItQ().
	SpacifyItQ().
	AndThenQ().ReturnIt()
#--> H A R O

illustration

Why Future Actions?

Future Actions let you express programming intentions naturally - like planning a sequence of steps before executing them. The code reads like human thought: "Before working with 'ringo', I plan to uppercase it, then remove the 'o'."

This transforms programming from mechanical commands into expressive, story-like sequences that execute with precision.

Cite

Mansour Ayouni. "Programming the Future, Litterally, in Softanza". Softanza narrations, 2025. https://mayouni.github.io/stzsite/en/narrations/stz-fututure-actions.html

Not run: its code touches files, the network, the clock or chance. The article is published as written; its blocks are illustrations. The code of the articles is Haro code. Where an article was written before the language took its present name, the name was changed and nothing else. Genre, area and series read from the file's name, the year from its first commit: derived, until the article carries its own header. The file on GitHub(opens in a new tab)