My first interaction with any runtime which touched the filesystem and paths was in node.js many years ago.
I have to admire the path module in node.js for its simplicity. I had to assume that other languages wouldn't do things much differently.
This year I tried c++ (kind of love it even when it gets really really really verbose and hard to follow).
Last week I picked up Rust, I wanted c++ but with a friendly face. So far I am getting the usual wobbles, "should I give up? change language again? This is also hard, I love the speed though, I can understand some of what I'm writing..." but I stick in there, I am trying to write a simple CLI tool that does nothing more than concat an input path to a current working directory, think pwd + input_path
. In node that would be trivial and I could resolve paths like this:
const userInput = argv // maybe something like this "../";
path.resolve(process.cwd(), userInput); // noice!
But googling brings me no closer, Cargo has no crates (packages) I could understand to have similar resolve functionality.
My options
0: You help me to see Im doing something wrong.
1: So do I concede that rust is not for me.
2: Try V lang
3: Use LuaJit
4: Slow but productive Use Typescript
I am quite unsure.