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

When I tried to write my first program in Rust, I failed miserably. With a strong background in C# as well, I tried to write a function that returns an interface (a trait in Rust), which was apparently not something you do in Rust. (With an unboxed trait that is, but there are some proposals to add support for this.) The compiler diagnostics have improved tremendously since then. I don’t think the syntax is that much different. You use `let` instead of `var` and types go after the argument instead of before.

After some time I got the hang of it, and I am sure you can do it too. It is surprising how much I _didn’t_ miss the Visual Studio debugger. The VS debugger is amazing and in my opinion there is no debugger that comes close, but Rust has a much higher “if it compiles it works”-factor than C#. There are still times where I wish for a debugger like that of Visual Studio, but this is relatively rare. Instead of spending time debugging, you spend your time staring at compiler errors in denial until you eventually accept that the compiler is right and your code is wrong.



Apparently Visual Rust [1] is a thing now. VS2015 will support GDB as a debugger, too (!)

[1]: https://github.com/PistonDevelopers/VisualRust




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

Search: