Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I find this sort of comparisons dubious. For me, who's a total rust noob, C is 10x faster than rust, because I need to keep looking up rust syntax for basic things like for loop.

If I ever learn rust as well as I know C, I'm sure my speed won't be any faster or slower. For me, the time to think up a solution is the major chunk, writing it out seems to be nothing in comparison. So why would the language affect that in a meaningful way?

Now, the one way rust can really give you time savings is the lack of entire classes of bugs. I spend 90% of my time fixing bugs in the code my coworkers and I have written over the past year. And most of them are really subtle memory and thread safety problems that are difficult to track down. If rust can eliminate that, I am willing to spend a year getting comfortable with the language.



I agree, if you're learning a language you will be slower with it. I wrote this from a perspective of having used them for a reasonable time, and I used most of the above fluently, except C#, Ruby, Perl, functional bunch, which I've only used for small side projects. (And I have not mentioned Fortran which we also used a bit, Borland Pascal, Object Pascal AKA Delphi, Visual Basic, C64 Basic, QBasic, x86 and ARM assembly.)

I also know and are fluent in much weirder, atypical languages, almost esolang, of CRM114 and Faust, and rare ones like Nemerle and Vala.

Rust is pretty pedestrian compared to some of these, rather powerful and generally nice. Writing in Rust feels like writing in a cross of C# and C++20 (less verbose) with a sprinkling of SML/OCaml inspired syntax.

Main slowdown I got was having to write some foreign function interfaces, but it was as nice at it as Python with Cython, nicer than say Vala or Haskell. Much nicer than Java FFI - JNI. Also the common build and package system Cargo was a bit different from what I'm used to, but not altogether bad.




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

Search: