Skip to content

Comment on Async Rust Isn't Bad: You Areparent

Comments

Having grown up on a platform which did not offer preemptive threading, it still feels weird to me that people perceive async IO as being complex. The contortions one must go through to get decent performance while pretending there is any such thing as synchronous IO seem far more troublesome. Reality is an asynchronous, interrupt-driven state machine; the sooner you give up the illusion that you are in control, the sooner you can go with its flow.

What I read into this, is that if you walk into programming 101 and learn async and/or functional day #1, they make total sense.

If you walk into Pascal or Fortran, and have to acquire FP or async programming after, they make no sense.

This is also at the root of emacs-vs-VI and other debates. What you learn defines how you think.

I learned IF-THEN-ELSE flow, and GOTO. I do not find async easy to rationalise about, despite recognising it exists.

My partner says anyone who claims they can multitask "in real life" is lying, and does both things badly.

At an OS level its kind of a sad state of affairs, even on tiny devices the goto solution is an RTOS with threads (they aren't cheap memory or latency wise!)

If you look at what things like RTIC and embassy are doing I have to say its pretty appealing. Make programming the interrupt state machines a little nicer with async rust, and in RTIC's case without a chance of deadlocks.

That's pretty stellar, and at a footprint and memory usage that is far lower than even the smallest RTOS can muster.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.