Skip to content

Rename "Parameter Call" to something that makes sense #9

@mbellotti

Description

@mbellotti

File this under: I don't know why I did this 🤣

Structs (Stocks, Flows, and Components) are basically like objects:

def foo = flow{
		buzz: new bar,
		fizz: func{
			if buzz.a > 2{
				buzz.a -> b;
			}else{
				buzz.a = 10;
			}
			buzz.b -> 1;
		},
	};

def bar = stock{
			a: 10,
			b: 20,
		};

Each has a set of features that are kind of like properties or methods. These features can be accessed via the following construction buzz.a in the parser this construction is called a ParameterCall ... which is a stupid name that doesn't really communicate what it is. These features ARE treated as parameters when represented in LLVM IR, but it's still a pretty confusing name.

A Fault spec works is by connecting Stocks and Flows together to represent resource use in a system (see Thinking In Systems for more about this style of modeling) Struct properties can be static values, instances of connecting structs, or functions. When referenced with the construction [structName].[property] if the feature is a function, Fault will execute the function.

Assuming we can come up with a more sensible name this is basically a find and replace job after that, with the guiding hand of unit tests to help 🤣

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions