Comment

Comment by IshKebab

I do think the difficulty of Rust is brushed aside by its proponents. This week I wrote a little script to read an XML file, get a path from it, read a file at that location, do some regexes on it, and then update the XML and write it back to disk.

I'd estimate it took me about 10 times longer to implement in Rust than Python. And I don't exactly know Python well - it wasn't just extra time Googling how to do things.

A lot of it is just how restrictive the borrow checker is. Often you have to structure your code in a really weird way to satisfy it.

Dealing with strings is another pain point. I get why there is `&str` and `String`. But that doesn't explain why I can't add two `String`s together using +.

Another thing I've found is that because of the type inference it often gets really confusing whether a variable is a reference or not. Doesn't help that code completion basically doesn't work at all at the moment.

I wish there were a simpler language, like Rust (no garbage collector, no runtime), but that was a little more helpful and willing to do implicit things even if they are slightly slower than the most optimised code possible.

parent IshKebab 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton