Closed nicopap closed 1 year ago
We'd like a way to define "templates" to re-use while allowing a variable.
We could re-use the rust fn syntax as follow:
fn
fn template_name(arg_1, arg_2, …) { TemplateUiRoot(row) { TemplateUiImage(ui("image.png") width(arg_1) color(arg_2)) } }
Then, such a template could be inserted inline with a use statement:
use
use template_name(100%, coral)
The template would be a simple "find and replace". The only data type would be String (and tuples of strings). Which is already superior to bash.
String
Completed with 0.10
We'd like a way to define "templates" to re-use while allowing a variable.
We could re-use the rust
fn
syntax as follow:Then, such a template could be inserted inline with a
use
statement:The template would be a simple "find and replace". The only data type would be
String
(and tuples of strings). Which is already superior to bash.