Proposals: Allow inserting variable values into strings
Sayakie opened this issue ยท 2 comments
While I am using various languages every day, it should be awesome if we could be insert any values into strings. Other languages support this proposal with the following syntax like:
Javascript
const someFeature = "An Awesome Feature"
console.log(`Proposal Approved: ${someFeature}`) // Outputs: Proposal Approved: An Awesome Feature
Rust
let some_feature = "Another Awesome Feature";
println!("Proposal Approved: {some_feature}"); // Outputs: Proposal Approved: Another Awesome Feature
TriggerReactor in this proposal:
someFeature = "Insert values into strings"
#MESSAGE "Proposal Approved: {someFeature}"
I think it would be great if we use ${} logic. We already parsing ${something} inside a string as $something(Placeholder), which is not that welcome-d (at least for me) because it cannot handle parameter and so the function is already fulfilled with "$something " ($+name+space)
So for me, changing ${} 's job from placeholder injector to code injector would be good option for next major (v4.0.0) update.