String interpolation: make it work #12

Closed
opened 2023-12-15 02:14:12 +00:00 by kredati · 2 comments
kredati commented 2023-12-15 02:14:12 +00:00 (Migrated from github.com)

String interpolation should be a thing.

Here's the model: Rust's friendliest version of string formatting. https://doc.rust-lang.org/std/macro.format.html, e.g. format!("{x} + {y} = 3"); // => "1 + 2 = 3"

Only bare names can go in the interpolation points.

Unusually, here, interpolation strings will have to be parsed, and not simply passed off. But they can't be parsed like normal code. The current strategy of just chunking something into a giant string token may not be the right thing, however.

String interpolation should be a thing. Here's the model: Rust's friendliest version of string formatting. https://doc.rust-lang.org/std/macro.format.html, e.g. `format!("{x} + {y} = 3"); // => "1 + 2 = 3"` Only bare names can go in the interpolation points. Unusually, here, interpolation strings will have to be parsed, and not simply passed off. But they can't be parsed like normal code. The current strategy of just chunking something into a giant string token may not be the right thing, however.
scott self-assigned this 2023-12-15 21:25:22 +00:00
scott removed their assignment 2023-12-27 04:18:16 +00:00
scott added
now
and removed
later
labels 2024-04-05 22:56:03 +00:00

We're going to want this for Eliza! And we need to have a working Eliza in June. Let's goooooo.

We're going to want this for Eliza! And we need to have a working Eliza in June. Let's goooooo.
scott added this to the Computer Class milestone 2024-04-26 21:15:10 +00:00

Stood up, with no glaring bugs, in 265f867a71

Stood up, with no glaring bugs, in https://alea.ludus.dev/twc/ludus/commit/265f867a718d4bc79d0cd4bce42b04edea08ee88
scott closed this issue 2024-05-18 22:24:28 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: twc/ludus#12
No description provided.