HackerTrans
TopNewTrendsCommentsPastAskShowJobs

kawogi

50 karmajoined il y a 4 ans

comments

kawogi
·il y a 10 heures·discuss
IIUC that was meant as an intermediate step (which isn't uncommon), which IMO makes the translation way less exciting.

The interesting part will be whether they can transform that "mechanical Rust" into something idiomatic. I'm waiting ...
kawogi
·il y a 11 heures·discuss
In my experience, it absolutely does (at least if you use it idiomatically). Using the type system (esp. enums, Result and newtypes) makes a good bunch of invalid states irrepresentable.

This also helps to focus on the remaining things that could go wrong.

The integration of unit tests also lowers the barrier to just sprinkle some tests in, if you're unsure that you got an edge case right. Anf clippy (not stricly the language, but still kind of a core component) greaty helps to stay on the idiomatic track.

No silver bullet of course, but I never had so few runtime issues with any other programming language so far.

What logic bugs did you encounter the most?

edit: mobile typos
kawogi
·il y a 14 jours·discuss
I had no troubles targeting an ATTiny13A with Rust.

(had to disable debug symbols, though)

Why should that be any harder than C?
kawogi
·il y a 2 mois·discuss
IIUC only 50k LoC are non-test code, which improves the metric. Whether that's enough tests still depends on the code. If most are getters and setters, the coverage might be ok.
kawogi
·il y a 3 mois·discuss
I often wish this type existed, but didn't find a way to define the niche value for the compiler to optimize the None-case.

Do you know a solution to this?
kawogi
·il y a 6 mois·discuss
Support for Firefox on Linux is still only in nightly (unless that changed "very" recently)

This blocks progress (and motivation) on some of my projects.
kawogi
·il y a 6 mois·discuss
In your specific example `std::convert::Infallible` can be used: https://doc.rust-lang.org/std/convert/enum.Infallible.html