Skip to content

Execution Flows Explained

The strength of the Execution Flows paradigm comes from two key principles:

  1. Simplicity: The fy implementation revolves around just three core entities: flows, methods, and properties. A flow defines a particular use case by integrating property and method mixins into a single class. Property mixins supply data, while method mixins provide actions.
  2. Static referencing: Flows, methods, and properties can only use other flows, methods, or properties that they explicitly reference by their identifier.

Static referencing

Static referencing differs from static typing in that it requires not only the type of the entity to match but also its identifier.

In traditional static typing environment values are matched by its type. In the following example a function greet accepts any string.

def hello_world() -> str:
    return "Hello, World!"

def greet(greeting: str) -> None:
    print(greeting)

greet(hello_world())

That means that we could also write something like:

greet(datetime.utcnow().isoformat())

We cannot determine just by looking at the code whether this was an error or intentional.

Here’s an example of a fy flow with a related method and property that greets the user and returns no value.