Hacker News new | past | comments | ask | show | jobs | submit login

This

    request.params.get(&"userid".to_string()).as_slice()
is rather ugly in comparison with Express's `req.params.userid` (or Sinatra's `params[:userid]`). Can something nicer be done here?



Yeah, this cracks me up, too. I'm still learning the basics of Rust and so there is a high chance that it's just me being stupid. Strings are not just Strings in Rust land so there was plenty of room for me to fail :)

I created a ticket to check all usage of Strings in the entire code base. You might want to track it for further progress on that.

https://github.com/cburgdorf/Floor/issues/12


At any given moment, there will exist at least one feature of Rust that is suffering temporary workarounds as a result of flux in the implementation. Strings are such a feature at the moment, and ugly code like the above is the interim solution. It will look nicer for 1.0. :)


Great: I wasn't sure if it was a feature of the framework or the language! Like many others here, I'm looking forward to playing with Rust in earnest once it's a little more mature.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: