News for hackers. Stuff that matters.
Re:Rust’s async isn’t colored by dathinab on Thursday March 11, 2021 @08:26AM (#26423732)
This speaks about a very different kind of coloring which applies to more or less any language (IMHO) but definetly not just statically typed languages.

What it speaks about a "coloring" of the call context!

BLUE => Blocking I/O call context.

RED => Async I/O call context.

And calling a function which expects a blocking I/O call context in a function running under a Async I/O call context (or the other way around) is sub-optimal.

Depending on the language this can cause anything from it works fine over performance problems and increased likelihood of dead locks to compiler errors or even super nasty runtime bugs.

The important part is it's 100% language depended. But people use arguments like "that's colored so it's bad" (because of the color) or "that has a different color so you can't call it here" (because of the color). Even through it might very well not be bad that it's colored and you might very well be perfectly fine calling that there even through it has a different color then the calling function.

I.e. people use the argument in the same way people argue that static typing is fundamentally bad because there is some language where it brings more drawbacks then benefits.

There are no comments on this comment yet.