ES6 adds string interpolation and custom string literals! https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings Remarkable for a language requiring backwards compat.
Related Posts
LLMs are a really accessible machine learning technique. I dabbled with text classifiers a few years ago and the APIs were way more involved.
(system_prompt: String, input: String) -> String
I can prototype with this much more easily!
I've been using "Expected Int, but got String" for my type error messages, but I've been wondering if I could do better.
"Expected Int here, but this value has type String" or "This expression requires Int, but the value is String".
Do you have a favourite?
I've added syntax highlighting to the prompt of my programming language!
It's not strictly necessary, but it's nice to have. It caught a bug with lexing incomplete string literals too.