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

The first thing I look when working with any language excluding shell scripts is interactive debugging from IDE.



My two cents as a non-professional programmer: i've found hacking on someone else's codebase to be very hard with/without a debugger in dynamic languages like JS/Python where most things are untyped and you get runtime exceptions upon eg. trying to call a method on a nil object.

BUT back on the thread's topic, since i started programming in Rust, the only time i've felt it was hard to wrap my head around the compiler's output was with complex async programming. Otherwise, every single time i felt like a simple text editor was more than enough with rustc's output to understand what's going on, because in Rust everything is very explicit and statically typed with clear lifetimes, and the compiler has very helpful error messages often including suggestions on how to fix the error.

For me, everything (non-async) Rust is a clear win in terms of understandability/hackability, compared to all other languages i've tried before (admittedly not a lot of them). I think complex IDE tooling can ease the pain, but proper language design can help prevent the disease in the first place.

EDIT: i should add, since i started programming in Rust, i've only once or twice seen a runtime panic (due to array indexing error on my side). Otherwise, literally all of the bugs i had written were caught by the compiler before the program ran. For me it was a huge win to spend one more hour to please the compiler in exchange for spending days less debugging stuff afterwards.


While I use scripting languages when needed my main languages were always compiled with static typing. And I did not need debugger for hacking code. I need debugger mostly for tracing my own code when I have some bugs mostly related to algorithmic errors, not with the program blowing up on me.

I did not program in Rust so I can not really judge the language but I doubt that it is so nice and expressive comparatively to modern C++ that suddenly the types of bugs I am hunting will magically disappear.


> I need debugger mostly for tracing my own code when I have some bugs mostly related to algorithmic errors, not with the program blowing up on me.

Then you're a much better programmer than i am! :)

For algo debugging i just use pen and paper. For more surprising results, print statements are usually all i need.

> suddenly the types of bugs I am hunting will magically disappear

Maybe not, but i'd recommend to give it a try, if only to offer a different perspective. For me personally, strict and expressive enums, mandatory error handling and Option/Result types as language core features (among others) have definitely eliminated most bugs i write. Well i still write those bugs, but at least the compiler doesn't compile like everything is fine, and instead lets me know why my program is flawed.


And in languages that try to replace C++, better offer nice IDE tooling as well.

https://devblogs.microsoft.com/cppblog/edit-your-c-code-whil...

https://uecasts.com/courses/unreal-engine-5-introduction/epi...

With VC++ and Unreal catching up with Lucid Energize[0], others will have to up their game.

[0] - https://www.youtube.com/watch?v=pQQTScuApWk




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

Search: