As the author of the default bc in macOS and FreeBSD, good luck.
Also, while mine is in C, I have tried very hard to eliminate all memory safety bugs, and I think I have done pretty well.
Also, while mine is in C, I have tried very hard to eliminate all memory safety bugs, and I think I have done pretty well.
Do you see this as an unexpectedly challenging task? If so, what do you think makes it challenging?
The reason: parsing.
The bc language is poorly designed for a REPL, which it needs to handle.
I got sick of fixing parse bugs, though, and my source code got a sarcastic comment: https://git.gavinhoward.com/gavin/bc/src/commit/4b83bf07b97f...