You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading/writing TEAL, the lack of human readable labels and/or ability to concisely group operations can increase the chance of maintainer error.
To address these concerns, the story requests adding macro expansion support for 1+ direct substitution terms separated by semicolon (examples below).
How a human readable label helps - Consider scratch slot ID identification in the following snippet.
// Allocate scratch slots
loop:
<get next value>
load 0
+
store 0
load 1
int 1
+
store 1
<branch is not done>
load 0
load 1
/
Now imagine replacing IDs with a human readable identifier:
// Allocate scratch slots
#define TOTAL 0
#define COUNT 1
loop:
<get next value>
load TOTAL
+
store TOTAL
load COUNT
int 1
+
store COUNT
<branch is not done>
load TOTAL
load COUNT
/
How grouping operations helps - Consider repetitive operations like incrementing by 1. Imagine defining something like:
#define inc int 1; +
int 5
inc
The example leverages #4363 to delimit lines by semi-colon (;) as a way to concisely, visually group statements.
Solution
Dependencies
Urgency
The text was updated successfully, but these errors were encountered:
Problem
When reading/writing TEAL, the lack of human readable labels and/or ability to concisely group operations can increase the chance of maintainer error.
To address these concerns, the story requests adding macro expansion support for 1+ direct substitution terms separated by semicolon (examples below).
How a human readable label helps - Consider scratch slot ID identification in the following snippet.
Now imagine replacing IDs with a human readable identifier:
How grouping operations helps - Consider repetitive operations like incrementing by 1. Imagine defining something like:
The example leverages #4363 to delimit lines by semi-colon (;) as a way to concisely, visually group statements.
Solution
Dependencies
Urgency
The text was updated successfully, but these errors were encountered: