-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
questionFurther information is requestedFurther information is requested
Description
TypL looks extremely interesting! Thank you for putting so much work into it already!
I have kind of a surface level question: why were tag functions chosen for the API? I'm sure there are good reasons but from the outside-in perspective, it seems that normal function calls would be a little more ergonomic since there's a good bit less syntax:
Using tag functions:
function isEven(v = number) {
return bool`${ v % 2 == 0 }`;
}
var x = number`42`;
var kind = bool`${ isEven(x) }`;
vs
Using "regular" functions:
function isEven(v = number) {
return bool( v % 2 == 0);
}
var x = number(42);
var kind = bool( isEven(x) );
Thanks!
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested